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

Commit 271e29d1 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fixed pinned stack lockscreen interaction" into oc-dev am:...

Merge "Merge "Fixed pinned stack lockscreen interaction" into oc-dev am: 681a28d5" into oc-dev-plus-aosp
parents 584f9747 fce2c772
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -204,12 +204,11 @@ class KeyguardController {
        mOccluded = false;
        mOccluded = false;
        mDismissingKeyguardActivity = null;
        mDismissingKeyguardActivity = null;
        final ArrayList<ActivityStack> stacks = mStackSupervisor.getStacksOnDefaultDisplay();
        final ArrayList<ActivityStack> stacks = mStackSupervisor.getStacksOnDefaultDisplay();
        final int topStackNdx = stacks.size() - 1;
        for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
        for (int stackNdx = topStackNdx; stackNdx >= 0; --stackNdx) {
            final ActivityStack stack = stacks.get(stackNdx);
            final ActivityStack stack = stacks.get(stackNdx);


            // Only the very top activity may control occluded state
            // Only the focused stack top activity may control occluded state
            if (stackNdx == topStackNdx) {
            if (mStackSupervisor.isFocusedStack(stack)) {


                // A dismissing activity occludes Keyguard in the insecure case for legacy reasons.
                // A dismissing activity occludes Keyguard in the insecure case for legacy reasons.
                final ActivityRecord topDismissing = stack.getTopDismissingKeyguardActivity();
                final ActivityRecord topDismissing = stack.getTopDismissingKeyguardActivity();
+23 −2
Original line number Original line Diff line number Diff line
@@ -95,6 +95,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
    // change.
    // change.
    private boolean mReparenting;
    private boolean mReparenting;


    // True if we are current in the process of removing this app token from the display
    private boolean mRemovingFromDisplay = false;

    // The input dispatching timeout for this application token in nanoseconds.
    // The input dispatching timeout for this application token in nanoseconds.
    long mInputDispatchingTimeoutNanos;
    long mInputDispatchingTimeoutNanos;


@@ -464,6 +467,12 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        return !hidden;
        return !hidden;
    }
    }


    @Override
    void removeImmediately() {
        onRemovedFromDisplay();
        super.removeImmediately();
    }

    @Override
    @Override
    void removeIfPossible() {
    void removeIfPossible() {
        mIsExiting = false;
        mIsExiting = false;
@@ -480,6 +489,11 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
    }
    }


    void onRemovedFromDisplay() {
    void onRemovedFromDisplay() {
        if (mRemovingFromDisplay) {
            return;
        }
        mRemovingFromDisplay = true;

        if (DEBUG_APP_TRANSITIONS) Slog.v(TAG_WM, "Removing app token: " + this);
        if (DEBUG_APP_TRANSITIONS) Slog.v(TAG_WM, "Removing app token: " + this);


        boolean delayed = setVisibility(null, false, TRANSIT_UNSET, true, mVoiceInteraction);
        boolean delayed = setVisibility(null, false, TRANSIT_UNSET, true, mVoiceInteraction);
@@ -512,12 +526,14 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
            mService.mNoAnimationNotifyOnTransitionFinished.add(token);
            mService.mNoAnimationNotifyOnTransitionFinished.add(token);
        }
        }


        final TaskStack stack = getTask().mStack;
        final TaskStack stack = getStack();
        if (delayed && !isEmpty()) {
        if (delayed && !isEmpty()) {
            // set the token aside because it has an active animation to be finished
            // set the token aside because it has an active animation to be finished
            if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM,
            if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM,
                    "removeAppToken make exiting: " + this);
                    "removeAppToken make exiting: " + this);
            if (stack != null) {
                stack.mExitingAppTokens.add(this);
                stack.mExitingAppTokens.add(this);
            }
            mIsExiting = true;
            mIsExiting = true;
        } else {
        } else {
            // Make sure there is no animation running on this token, so any windows associated
            // Make sure there is no animation running on this token, so any windows associated
@@ -540,6 +556,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        if (!delayed) {
        if (!delayed) {
            updateReportedVisibilityLocked();
            updateReportedVisibilityLocked();
        }
        }

        mRemovingFromDisplay = false;
    }
    }


    void clearAnimatingFlags() {
    void clearAnimatingFlags() {
@@ -1558,6 +1576,9 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        if (getController() != null) {
        if (getController() != null) {
            pw.print(prefix); pw.print("controller="); pw.println(getController());
            pw.print(prefix); pw.print("controller="); pw.println(getController());
        }
        }
        if (mRemovingFromDisplay) {
            pw.println(prefix + "mRemovingFromDisplay=" + mRemovingFromDisplay);
        }
    }
    }


    @Override
    @Override
+6 −9
Original line number Original line Diff line number Diff line
@@ -5606,22 +5606,19 @@ public class WindowManagerService extends IWindowManager.Stub
        WindowState win = mWindowMap.get(client);
        WindowState win = mWindowMap.get(client);
        if (localLOGV) Slog.v(TAG_WM, "Looking up client " + client + ": " + win);
        if (localLOGV) Slog.v(TAG_WM, "Looking up client " + client + ": " + win);
        if (win == null) {
        if (win == null) {
            RuntimeException ex = new IllegalArgumentException(
                    "Requested window " + client + " does not exist");
            if (throwOnError) {
            if (throwOnError) {
                throw ex;
                throw new IllegalArgumentException(
                        "Requested window " + client + " does not exist");
            }
            }
            Slog.w(TAG_WM, "Failed looking up window", ex);
            Slog.w(TAG_WM, "Failed looking up window callers=" + Debug.getCallers(3));
            return null;
            return null;
        }
        }
        if (session != null && win.mSession != session) {
        if (session != null && win.mSession != session) {
            RuntimeException ex = new IllegalArgumentException(
                    "Requested window " + client + " is in session " +
                    win.mSession + ", not " + session);
            if (throwOnError) {
            if (throwOnError) {
                throw ex;
                throw new IllegalArgumentException("Requested window " + client + " is in session "
                        + win.mSession + ", not " + session);
            }
            }
            Slog.w(TAG_WM, "Failed looking up window", ex);
            Slog.w(TAG_WM, "Failed looking up window callers=" + Debug.getCallers(3));
            return null;
            return null;
        }
        }