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

Commit dd18a8d9 authored by Ahaan Ugale's avatar Ahaan Ugale Committed by Android (Google) Code Review
Browse files

Merge "Fix sensitive content Toast for multiple windows in same activity" into main

parents ea738bfa 15428cc8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2446,6 +2446,9 @@ public class WindowManagerService extends IWindowManager.Stub
            ProtoLog.i(WM_DEBUG_SCREEN_ON,
                    "Relayout %s: oldVis=%d newVis=%d. %s", win, oldVisibility,
                            viewVisibility, new RuntimeException().fillInStackTrace());
            if (becameVisible) {
                onWindowVisible(win);
            }

            win.setDisplayLayoutNeeded();
            win.mGivenInsetsPending = (flags & WindowManagerGlobal.RELAYOUT_INSETS_PENDING) != 0;
@@ -10168,7 +10171,7 @@ public class WindowManagerService extends IWindowManager.Stub
     * Called to notify WMS that the specified window has become visible. This shows a Toast if the
     * window is deemed to hold sensitive content.
     */
    void onWindowVisible(@NonNull WindowState w) {
    private void onWindowVisible(@NonNull WindowState w) {
        showToastIfBlockingScreenCapture(w);
    }

+0 −4
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import static android.graphics.GraphicsProtos.dumpPointProto;
import static android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
import static android.os.PowerManager.DRAW_WAKE_LOCK;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;
import static android.permission.flags.Flags.sensitiveContentImprovements;
import static android.view.SurfaceControl.Transaction;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_FRAME;
@@ -2139,9 +2138,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
                }
            }
            setDisplayLayoutNeeded();
            if (sensitiveContentImprovements() && visible) {
                mWmService.onWindowVisible(this);
            }
        }
    }