diff options
author | Kevin Han <kevhan@google.com> | 2021-02-11 21:05:11 -0800 |
---|---|---|
committer | Kevin Han <kevhan@google.com> | 2021-02-16 15:14:44 -0800 |
commit | 0da6e9039a41b13c2d26cf8845c6535c1d986788 (patch) | |
tree | 9faeb532ad52f789573001f18d38ad5cd23544c4 /services/tests | |
parent | c2d6240642852362dc6e255d6396b9065e79762c (diff) |
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
Diffstat (limited to 'services/tests')
-rw-r--r-- | services/tests/servicestests/src/com/android/server/apphibernation/AppHibernationServiceTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/tests/servicestests/src/com/android/server/apphibernation/AppHibernationServiceTest.java b/services/tests/servicestests/src/com/android/server/apphibernation/AppHibernationServiceTest.java index 1328b91d03f9..07f67327b2bf 100644 --- a/services/tests/servicestests/src/com/android/server/apphibernation/AppHibernationServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/apphibernation/AppHibernationServiceTest.java @@ -110,6 +110,8 @@ public final class AppHibernationServiceTest { UserInfo userInfo = addUser(USER_ID_1); mAppHibernationService.onUserUnlocking(new SystemService.TargetUser(userInfo)); doReturn(true).when(mUserManager).isUserUnlockingOrUnlocked(USER_ID_1); + + mAppHibernationService.mIsServiceEnabled = true; } @Test |