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

Commit fca32a78 authored by Evan Rosky's avatar Evan Rosky
Browse files

Don't include invisible transientlaunches in transitions

Logic was assuming that transient-launches actually launch,
but in multi-user situations its possible that a launch is
attempted for a user and then blocked thus not actually
visible. So, if the activity isn't visible, don't assume it
is "changed"

Bug: 368334295
Test: launch activity into non-running user with transient-launch
Flag: EXEMPT bugfix
Change-Id: Ib00bea76572ca027793f948a30e227d8f1c878c0
parent 6214c4ea
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3495,14 +3495,14 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        }

        boolean hasChanged() {
            final boolean currVisible = mContainer.isVisibleRequested();
            // the task including transient launch must promote to root task
            if ((mFlags & ChangeInfo.FLAG_TRANSIENT_LAUNCH) != 0
                    || (mFlags & ChangeInfo.FLAG_ABOVE_TRANSIENT_LAUNCH) != 0) {
            if (currVisible && ((mFlags & ChangeInfo.FLAG_TRANSIENT_LAUNCH) != 0
                    || (mFlags & ChangeInfo.FLAG_ABOVE_TRANSIENT_LAUNCH) != 0)) {
                return true;
            }
            // If it's invisible and hasn't changed visibility, always return false since even if
            // something changed, it wouldn't be a visible change.
            final boolean currVisible = mContainer.isVisibleRequested();
            if (currVisible == mVisible && !mVisible) return false;
            return currVisible != mVisible
                    || mKnownConfigChanges != 0