From 0da6e9039a41b13c2d26cf8845c6535c1d986788 Mon Sep 17 00:00:00 2001 From: Kevin Han Date: Thu, 11 Feb 2021 21:05:11 -0800 Subject: Support dynamic feature flag config For CTS testing purposes, have the DeviceConfig feature flag control whether app hibernation behavior is stubbed rather than whether the service itself is started. This allows us to change the feature flag in tests without restarting system_server Bug: 175830282 Test: atest AppHibernationServiceTest Change-Id: Id9ea16345cac84a069ff53939cef1564a585c466 --- services/java/com/android/server/SystemServer.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'services/java/com/android/server/SystemServer.java') diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 62c3f43d2676..d6ddbb1f0685 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -97,7 +97,6 @@ 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; @@ -1873,11 +1872,9 @@ 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(); - } + t.traceBegin("StartAppHibernationService"); + mSystemServiceManager.startService(APP_HIBERNATION_SERVICE_CLASS); + t.traceEnd(); if (GestureLauncherService.isGestureLauncherEnabled(context.getResources())) { t.traceBegin("StartGestureLauncher"); -- cgit v1.2.3