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

Commit 1be545d8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't let PIP window control system bars"

parents 8093ecc1 c4e6f318
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5115,6 +5115,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        return mDeferHidingClient;
    }

    boolean canAffectSystemUiFlags() {
        return task != null && task.canAffectSystemUiFlags() && isVisible()
                && !inPinnedWindowingMode();
    }

    @Override
    boolean isVisible() {
        // If the activity isn't hidden then it is considered visible and there is no need to check
+3 −5
Original line number Diff line number Diff line
@@ -2067,9 +2067,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
            final boolean exiting = mAnimatingExit || mDestroying;
            return shown && !exiting;
        } else {
            final Task task = getTask();
            final boolean canFromTask = task != null && task.canAffectSystemUiFlags();
            return canFromTask && mActivityRecord.isVisible()
            return mActivityRecord.canAffectSystemUiFlags()
                    // Do not let snapshot window control the bar
                    && (mAttrs.type != TYPE_APPLICATION_STARTING
                            || !(mStartingData instanceof SnapshotStartingData));