Skip to content

Commit bfc1be1

Browse files
author
Amith Yamasani
committed
Fix a problem in finish affinity in Activity Manager.
Finishing tasks with an activity affinity was failing if the activity was found at index 0. This fixes the loop condition. Change-Id: If2e0d294e3e4493bca8b7efd40f24adaf2eb0b6f
1 parent 8ce2d78 commit bfc1be1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/java/com/android/server/am/ActivityStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3543,7 +3543,7 @@ final boolean finishActivityAffinityLocked(IBinder token) {
35433543
}
35443544
ActivityRecord r = mHistory.get(index);
35453545

3546-
while (index > 0) {
3546+
while (index >= 0) {
35473547
ActivityRecord cur = mHistory.get(index);
35483548
if (cur.task != r.task) {
35493549
break;

0 commit comments

Comments
 (0)