From 6950877b7a606bdc8d7bf5f4b03ec191a404af44 Mon Sep 17 00:00:00 2001 From: Yi-Ling Chuang Date: Fri, 20 Mar 2020 17:29:03 +0800 Subject: [PATCH] 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 --- .../contextualcards/slices/ContextualAdaptiveSleepSlice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java b/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java index b9cc202fbc4..4068d7c419f 100644 --- a/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java +++ b/src/com/android/settings/homepage/contextualcards/slices/ContextualAdaptiveSleepSlice.java @@ -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; }