diff options
author | tao.pei <tao.pei@ck-telecom.com> | 2016-06-15 16:26:59 +0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2016-08-14 21:56:44 -0700 |
commit | 1a83b36cbb2a1b8951b1e31812debcdb54c0d56e (patch) | |
tree | dcb948e20a13e21eba839e14de8985a6f6d5df72 /services/core | |
parent | 8b088b693c43923b549cc9e51c068258e244e191 (diff) | |
download | frameworks_base-1a83b36cbb2a1b8951b1e31812debcdb54c0d56e.zip frameworks_base-1a83b36cbb2a1b8951b1e31812debcdb54c0d56e.tar.gz frameworks_base-1a83b36cbb2a1b8951b1e31812debcdb54c0d56e.tar.bz2 |
am: Account for time changes when showing recent activities
[Procedures]
1. Go to Settings->Date&Time
Set time backwards, eg. 2016.6.15 -> 2016.6.10
2. Tap recent apps button to show recent activities.
There will be no activities shown.
Change-Id: Ifd860c0d08fac49f9d3c8eac590b6db9e6afb09d
Diffstat (limited to 'services/core')
-rw-r--r-- | services/core/java/com/android/server/am/ActivityStack.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index cefa3c0..f676db9 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -4230,7 +4230,8 @@ final class ActivityStack { if (focusedStack && topTask) { // Give the latest time to ensure foreground task can be sorted // at the first, because lastActiveTime of creating task is 0. - ci.lastActiveTime = System.currentTimeMillis(); + // Only do this if the clock didn't run backwards, though. + ci.lastActiveTime = Math.max(ci.lastActiveTime, System.currentTimeMillis()); topTask = false; } |