diff options
author | Mahesh Kumar <mahesh.kumar@mediatek.com> | 2018-10-17 21:08:31 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-10-17 21:08:31 -0700 |
commit | 12e3e04ccd392825065ce3283609b81a6b9630bf (patch) | |
tree | d6d44fd67d9798bb8309ca62169a7a050d144e4b | |
parent | e70b637f7c07e1916b5a0738a1745ce9a4eb3c47 (diff) | |
parent | 8f74ba97f8cb69567162c00b4ba264356e2d4602 (diff) | |
download | cts-12e3e04ccd392825065ce3283609b81a6b9630bf.tar.gz |
Merge "App Standby Settings key is set incorrectly" into pie-cts-dev
am: 8f74ba97f8
Change-Id: I4b397dc03e24a4ee553b6b42256daad309d9d8fd
-rw-r--r-- | common/device-side/util/src/com/android/compatibility/common/util/AppStandbyUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/device-side/util/src/com/android/compatibility/common/util/AppStandbyUtils.java b/common/device-side/util/src/com/android/compatibility/common/util/AppStandbyUtils.java index a1adc023f75..eb94b609718 100644 --- a/common/device-side/util/src/com/android/compatibility/common/util/AppStandbyUtils.java +++ b/common/device-side/util/src/com/android/compatibility/common/util/AppStandbyUtils.java @@ -59,7 +59,8 @@ public class AppStandbyUtils { public static boolean isAppStandbyEnabledAtRuntime() { final String result = SystemUtil.runShellCommand("settings get global app_standby_enabled").trim(); - final boolean boolResult = result.equals("1"); + // framework considers null value as enabled. + final boolean boolResult = result.equals("1") || result.equals("null"); Log.d(TAG, "AppStandby is " + (boolResult ? "enabled" : "disabled") + " at runtime."); return boolResult; } |