diff options
author | Craig Mautner <cmautner@google.com> | 2013-09-06 11:59:38 -0700 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2013-09-10 07:39:51 -0700 |
commit | 5c494547af1e4558aea5994b60afaadefef971e1 (patch) | |
tree | b6a71e24c8b38ea4dbb57434cb5b8b29722a0193 /services | |
parent | bdd61696c6720faa14ca9fdf180e519138b3d087 (diff) | |
download | frameworks_base-5c494547af1e4558aea5994b60afaadefef971e1.zip frameworks_base-5c494547af1e4558aea5994b60afaadefef971e1.tar.gz frameworks_base-5c494547af1e4558aea5994b60afaadefef971e1.tar.bz2 |
When waiting for activity to finish don't reset
In cases where the client is waiting for an activity to launch
(startActivityMayWait()) it is a bad idea to clear
ActivityRecord.displayStartTime when going into the pause state. If
displayStartTime is cleared before the activity is displayed,
the client will never be released.
This fix keeps pause from clearing displayStartTime if any client
is waiting for the activity to be displayed.
Fixes bug 10095558. But not a permanent fix, startActivityMayWait()
should not be called by any production code.
Change-Id: I7cbdcb04256f4a26233867c52aedd3bc4151adc3
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityStack.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 8d27c5c..3571b40 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -620,7 +620,13 @@ final class ActivityStack { } void clearLaunchTime(ActivityRecord r) { - r.displayStartTime = r.fullyDrawnStartTime = 0; + // Make sure that there is no activity waiting for this to launch. + if (mStackSupervisor.mWaitingActivityLaunched.isEmpty()) { + r.displayStartTime = r.fullyDrawnStartTime = 0; + } else { + mStackSupervisor.removeTimeoutsForActivityLocked(r); + mStackSupervisor.scheduleIdleTimeoutLocked(r); + } } void awakeFromSleepingLocked() { |