From ce15e157a6cf56fc73961ccb8c5ab18b1bf70280 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Thu, 19 Sep 2013 12:30:32 -0700 Subject: [PATCH] Fix a regression in pausing activity immediately on sleep At some point during refactoring of ActivityStack, the code to pause the current activity got deleted. Added back that line of code. Activity will now pause as soon as the screen is turned off, rather than after 5 seconds (sleep timeout). Bug: 10632898 Change-Id: If3cc8708d692d29a13dbd8cfd9edda8883b38c2e --- .../java/com/android/server/am/ActivityStackSupervisor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/java/com/android/server/am/ActivityStackSupervisor.java b/services/java/com/android/server/am/ActivityStackSupervisor.java index 219cb851adb83..9ae049ff47805 100644 --- a/services/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/java/com/android/server/am/ActivityStackSupervisor.java @@ -2076,12 +2076,12 @@ public final class ActivityStackSupervisor { mService.mHandler.removeMessages(LAUNCH_TIMEOUT_MSG); } } + checkReadyForSleepLocked(); } boolean shutdownLocked(int timeout) { boolean timedout = false; goingToSleepLocked(); - checkReadyForSleepLocked(); final long endTime = System.currentTimeMillis() + timeout; while (true) {