diff options
author | Kevin Han <kevhan@google.com> | 2021-01-05 14:03:58 -0800 |
---|---|---|
committer | Kevin Han <kevhan@google.com> | 2021-01-13 16:43:11 -0800 |
commit | 63576ff7d376a7db8acc84fbd50f3f46c5a0171c (patch) | |
tree | 75bc1995ce804236abbddd3dc6630aacddc59bde /services/java/com | |
parent | 7ae76a2f3f2635457568411cd9e13ae5a73a5595 (diff) |
Add app hibernation service stubs
Add app hibernation system service and manager class and start it when
app hibernation flag is enabled.
The actual API is currently stubbed and will be implemented in further
CLs.
Bug: 175829330
Test: adb shell device_config put app_hibernation
app_hibernation_enabled true
adb reboot
adb shell services list
Change-Id: Ide2758d3eaabae7d3df6356d4b6435c5137c554d
Diffstat (limited to 'services/java/com')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 4cd1348a0f7a..92f7bb7195b1 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -93,6 +93,7 @@ import com.android.internal.util.FrameworkStatsLog; import com.android.internal.widget.ILockSettings; import com.android.server.am.ActivityManagerService; import com.android.server.appbinding.AppBindingService; +import com.android.server.apphibernation.AppHibernationService; import com.android.server.attention.AttentionManagerService; import com.android.server.audio.AudioService; import com.android.server.biometrics.AuthService; @@ -215,6 +216,8 @@ public final class SystemServer { "com.android.server.appwidget.AppWidgetService"; private static final String VOICE_RECOGNITION_MANAGER_SERVICE_CLASS = "com.android.server.voiceinteraction.VoiceInteractionManagerService"; + private static final String APP_HIBERNATION_SERVICE_CLASS = + "com.android.server.apphibernation.AppHibernationService"; private static final String PRINT_MANAGER_SERVICE_CLASS = "com.android.server.print.PrintManagerService"; private static final String COMPANION_DEVICE_MANAGER_SERVICE_CLASS = @@ -1798,6 +1801,12 @@ public final class SystemServer { mSystemServiceManager.startService(VOICE_RECOGNITION_MANAGER_SERVICE_CLASS); t.traceEnd(); + if (AppHibernationService.isAppHibernationEnabled()) { + t.traceBegin("StartAppHibernationService"); + mSystemServiceManager.startService(APP_HIBERNATION_SERVICE_CLASS); + t.traceEnd(); + } + if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) { t.traceBegin("StartGestureLauncher"); mSystemServiceManager.startService(GestureLauncherService.class); |