Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4132620f authored by Craig Mautner's avatar Craig Mautner
Browse files

Fix index out of bounds exception

When removing the last activity in a stack.

Fixes bug 15776859.

Change-Id: Id507aa7864482ff1ff769833445d937b19de2bcd
parent a7838754
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -335,11 +335,14 @@ final class TaskRecord extends ThumbnailHolder {
            // Was previously in list.
            numFullscreen--;
        }
        updateEffectiveIntent();
        if (r.isPersistable()) {
            mService.notifyTaskPersisterLocked(this, false);
        }
        return mActivities.size() == 0;
        if (mActivities.isEmpty()) {
            return true;
        }
        updateEffectiveIntent();
        return false;
    }

    boolean autoRemoveFromRecents() {