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

Commit bbe80a03 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Check if recents exists before trying to relz to it"

parents 47c3baab dc3ef629
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -497,13 +497,17 @@ final class InputMonitor {

            resetInputConsumers(mInputTransaction);
            // Update recents input consumer layer if active
            if (mAddRecentsAnimationInputConsumerHandle
                    && getWeak(mActiveRecentsActivity) != null) {
                final WindowContainer layer = getWeak(mActiveRecentsLayerRef);
                mRecentsAnimationInputConsumer.show(mInputTransaction,
                        layer != null ? layer : getWeak(mActiveRecentsActivity));
            final ActivityRecord activeRecents = getWeak(mActiveRecentsActivity);
            if (mAddRecentsAnimationInputConsumerHandle && activeRecents != null
                    && activeRecents.getSurfaceControl() != null) {
                WindowContainer layer = getWeak(mActiveRecentsLayerRef);
                layer = layer != null ? layer : activeRecents;
                // Handle edge-case for SUW where windows don't exist yet
                if (layer.getSurfaceControl() != null) {
                    mRecentsAnimationInputConsumer.show(mInputTransaction, layer);
                    mAddRecentsAnimationInputConsumerHandle = false;
                }
            }
            mDisplayContent.forAllWindows(this, true /* traverseTopToBottom */);
            updateInputFocusRequest(mRecentsAnimationInputConsumer);