From 93cf3e34e2acc5406f7910b9b07ea23f6ac1d57c Mon Sep 17 00:00:00 2001 From: Tej Singh Date: Thu, 7 Dec 2017 13:05:38 -0800 Subject: Bug fix for device idle mode light Before, 'adb shell dumpsys deviceidle force-idle light' would always fail because it would call stepIdleStateLocked, which does not affect mLightState. It now calls stepLightIdleStateLocked, which modifies mLightState andputs the device in doze mode light. Test: ran 'adb shell dumpsys deviceidle force-idle light' and verified device entered doze mode light. Change-Id: If8e6a1a0355c71c01727cdc64fa8e2ac82203e98 --- services/core/java/com/android/server/DeviceIdleController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java index 4f1e335a2d50..6f697c46098b 100644 --- a/services/core/java/com/android/server/DeviceIdleController.java +++ b/services/core/java/com/android/server/DeviceIdleController.java @@ -2828,7 +2828,7 @@ public class DeviceIdleController extends SystemService becomeInactiveIfAppropriateLocked(); int curLightState = mLightState; while (curLightState != LIGHT_STATE_IDLE) { - stepIdleStateLocked("s:shell"); + stepLightIdleStateLocked("s:shell"); if (curLightState == mLightState) { pw.print("Unable to go light idle; stopped at "); pw.println(lightStateToString(mLightState)); -- cgit v1.2.3-59-g8ed1b