Fix ContextualAdaptiveSleepSliceTest

ADAPTIVE_SLEEP has been moved from Settings.System to Settings.Secure
but the main logic hasn't synced with the change which leads to the
failure.

Fixes: 139319542
Test: robotests
Change-Id: I56f58cc3da5a4034e2bf2ed5a63ae3bc2fec2a21
This commit is contained in:
Yi-Ling Chuang
2020-03-20 17:29:03 +08:00
parent 750ff89856
commit 6950877b7a

View File

@@ -129,7 +129,7 @@ public class ContextualAdaptiveSleepSlice implements CustomSliceable {
* @return {@code true} if the feature is turned on for the device, otherwise {@code false}
*/
private boolean isTurnedOn() {
return Settings.System.getInt(
return Settings.Secure.getInt(
mContext.getContentResolver(), Settings.Secure.ADAPTIVE_SLEEP, 0) != 0;
}