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

Commit 9eea9297 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove secure_window_state flag" into main

parents c889e1b1 6f0684a0
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -27,14 +27,6 @@ flag {
    bug: "262477923"
}

flag {
    namespace: "window_surfaces"
    name: "secure_window_state"
    description: "Move SC secure flag to WindowState level"
    is_fixed_read_only: true
    bug: "308662081"
}

flag {
    namespace: "window_surfaces"
    name: "trusted_presentation_listener_for_window"
+4 −15
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ import static com.android.server.wm.WindowStateProto.UNRESTRICTED_KEEP_CLEAR_ARE
import static com.android.server.wm.WindowStateProto.VIEW_VISIBILITY;
import static com.android.server.wm.WindowStateProto.WINDOW_CONTAINER;
import static com.android.server.wm.WindowStateProto.WINDOW_FRAMES;
import static com.android.window.flags.Flags.secureWindowState;
import static com.android.window.flags.Flags.surfaceTrustedOverlay;

import android.annotation.CallSuper;
@@ -1187,9 +1186,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        if (surfaceTrustedOverlay() && isWindowTrustedOverlay()) {
            getPendingTransaction().setTrustedOverlay(mSurfaceControl, true);
        }
        if (secureWindowState()) {
        getPendingTransaction().setSecure(mSurfaceControl, isSecureLocked());
        }
        // All apps should be considered as occluding when computing TrustedPresentation Thresholds.
        final boolean canOccludePresentation = !mSession.mCanAddInternalSystemWindow;
        getPendingTransaction().setCanOccludePresentation(mSurfaceControl, canOccludePresentation);
@@ -6174,18 +6171,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    void setSecureLocked(boolean isSecure) {
        ProtoLog.i(WM_SHOW_TRANSACTIONS, "SURFACE isSecure=%b: %s", isSecure, getName());
        if (secureWindowState()) {
        if (mSurfaceControl == null) {
            return;
        }
        getPendingTransaction().setSecure(mSurfaceControl, isSecure);
        } else {
            if (mWinAnimator.mSurfaceControl == null) {
                return;
            }
            getPendingTransaction().setSecure(mWinAnimator.mSurfaceControl,
                    isSecure);
        }
        if (mDisplayContent != null) {
            mDisplayContent.refreshImeSecureFlag(getSyncTransaction());
        }
+0 −7
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ import static com.android.server.wm.WindowStateAnimatorProto.DRAW_STATE;
import static com.android.server.wm.WindowStateAnimatorProto.SURFACE;
import static com.android.server.wm.WindowStateAnimatorProto.SYSTEM_DECOR_RECT;
import static com.android.server.wm.WindowSurfaceControllerProto.SHOWN;
import static com.android.window.flags.Flags.secureWindowState;
import static com.android.window.flags.Flags.setScPropertiesInClient;

import android.content.Context;
@@ -310,12 +309,6 @@ class WindowStateAnimator {
        int flags = SurfaceControl.HIDDEN;
        final WindowManager.LayoutParams attrs = w.mAttrs;

        if (!secureWindowState()) {
            if (w.isSecureLocked()) {
                flags |= SurfaceControl.SECURE;
            }
        }

        if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) {
            flags |= SurfaceControl.SKIP_SCREENSHOT;
        }