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

Commit 362c83f7 authored by Chris Li's avatar Chris Li Committed by Automerger Merge Worker
Browse files

Merge "getActivityTokenBelow should exclude finishing activity" into sc-v2-dev...

Merge "getActivityTokenBelow should exclude finishing activity" into sc-v2-dev am: 6a458ebd am: 05a96f6a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15650745

Change-Id: I2643c746773d3b3bbce73ffbd1b8a8ea97dfa29d
parents 719079be 05a96f6a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -207,7 +207,8 @@ public class ActivityClient {
    }

    /**
     * Returns the activity token below in the same task if it belongs to the same process.
     * Returns the non-finishing activity token below in the same task if it belongs to the same
     * process.
     */
    @Nullable
    public IBinder getActivityTokenBelow(IBinder activityToken) {
+3 −1
Original line number Diff line number Diff line
@@ -554,7 +554,9 @@ class ActivityClientController extends IActivityClientController.Stub {
                if (ar == null) {
                    return null;
                }
                final ActivityRecord below = ar.getTask().getActivityBelow(ar);
                // Exclude finishing activity.
                final ActivityRecord below = ar.getTask().getActivity((r) -> !r.finishing,
                        ar, false /*includeBoundary*/, true /*traverseTopToBottom*/);
                if (below != null && below.getUid() == ar.getUid()) {
                    return below.appToken.asBinder();
                }