summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-10-22 17:40:23 -0700
committerDianne Hackborn <hackbod@google.com>2015-10-22 17:40:23 -0700
commit7730cd2740a68ecd58fa2c0d2daf45b500d50fa1 (patch)
tree9ae7924b7fb9f3686f784a072155044bac7dcbd2 /services
parent33e1d376ebd643cba5b507d0005b87d49e246bb5 (diff)
downloadframeworks_base-7730cd2740a68ecd58fa2c0d2daf45b500d50fa1.zip
frameworks_base-7730cd2740a68ecd58fa2c0d2daf45b500d50fa1.tar.gz
frameworks_base-7730cd2740a68ecd58fa2c0d2daf45b500d50fa1.tar.bz2
DO NOT MERGE Fix issue #24118803: The screen doesn't turn off...
...after more than 60 minutes left The sensing timeout alarm was being cancelled immediately after it was scheduled it. Now only cancel it when we are done sensing or have reset activity. Change-Id: Id0440cda7dd1b81bf871f16dfb015df6284cf6af
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/DeviceIdleController.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java
index d2d4b7b..b88658b 100644
--- a/services/core/java/com/android/server/DeviceIdleController.java
+++ b/services/core/java/com/android/server/DeviceIdleController.java
@@ -1280,7 +1280,6 @@ public class DeviceIdleController extends SystemService
if (DEBUG) Slog.d(TAG, "Moved from STATE_IDLE_PENDING to STATE_SENSING.");
EventLogTags.writeDeviceIdle(mState, "step");
scheduleSensingAlarmLocked(mConstants.SENSING_TIMEOUT);
- cancelSensingAlarmLocked();
cancelLocatingLocked();
mAnyMotionDetector.checkForAnyMotion();
mNotMoving = false;
@@ -1292,7 +1291,6 @@ public class DeviceIdleController extends SystemService
mState = STATE_LOCATING;
if (DEBUG) Slog.d(TAG, "Moved from STATE_SENSING to STATE_LOCATING.");
EventLogTags.writeDeviceIdle(mState, "step");
- cancelSensingAlarmLocked();
scheduleSensingAlarmLocked(mConstants.LOCATING_TIMEOUT);
mLocating = true;
mLocationManager.requestLocationUpdates(mLocationRequest, mGenericLocationListener,
@@ -1350,6 +1348,7 @@ public class DeviceIdleController extends SystemService
mState = STATE_ACTIVE;
mInactiveTimeout = timeout;
EventLogTags.writeDeviceIdle(mState, type);
+ cancelSensingAlarmLocked();
becomeInactiveIfAppropriateLocked();
}
}