summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2015-07-21 16:54:54 -0700
committerWale Ogunwale <ogunwale@google.com>2015-07-22 00:05:39 +0000
commit25073dd4a8e8efcfe4b0b728ebb98fb7326434c0 (patch)
tree3b9cc54b1f2ef4e537b28a632fa1615642fb5d03
parente6b407b4be0b9c8240d34259b14e324da4d6832b (diff)
downloadframeworks_base-25073dd4a8e8efcfe4b0b728ebb98fb7326434c0.zip
frameworks_base-25073dd4a8e8efcfe4b0b728ebb98fb7326434c0.tar.gz
frameworks_base-25073dd4a8e8efcfe4b0b728ebb98fb7326434c0.tar.bz2
Fixed issue with not finding existing activity for background user
We currently go through the list of existing activities to find a match for the launching intent so we can re-use the activity record if one already exist. However, we exit the search early once we run across an activity record that doesn't belong to the current foreground user. This will cause us to create duplicate activity records if the launching intent is for a backround user and an activity record already exist. Based on https://android-review.googlesource.com/#/c/159131 Bug: 22564256 Change-Id: I4b6d94059c11fd2e621e65c8ec2c99427c15b246
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index e57e3ff..a75cc48 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -617,12 +617,9 @@ final class ActivityStack {
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
ActivityRecord r = activities.get(activityNdx);
if (notCurrentUserTask && (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) == 0) {
- return null;
+ continue;
}
if (!r.finishing && r.intent.getComponent().equals(cls) && r.userId == userId) {
- //Slog.i(TAG, "Found matching class!");
- //dump();
- //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
return r;
}
}