Loading core/java/android/view/InputWindowHandle.java +1 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.view; import static com.android.window.flags.Flags.surfaceTrustedOverlay; import android.annotation.IntDef; import android.annotation.Nullable; import android.graphics.Matrix; Loading Loading @@ -298,10 +296,6 @@ public final class InputWindowHandle { public void setTrustedOverlay(SurfaceControl.Transaction t, SurfaceControl sc, boolean isTrusted) { if (surfaceTrustedOverlay()) { t.setTrustedOverlay(sc, isTrusted); } else if (isTrusted) { inputConfig |= InputConfig.TRUSTED_OVERLAY; } } } core/java/android/window/flags/window_surfaces.aconfig +0 −8 Original line number Diff line number Diff line Loading @@ -3,14 +3,6 @@ container: "system" # Project link: https://gantry.corp.google.com/projects/android_platform_window_surfaces/changes flag { namespace: "window_surfaces" name: "surface_trusted_overlay" description: "Whether to add trusted overlay flag on the SurfaceControl or the InputWindow" is_fixed_read_only: true bug: "292032926" } flag { namespace: "window_surfaces" name: "allow_disable_activity_record_input_sink" Loading services/core/java/com/android/server/wm/WindowState.java +4 −14 Original line number Diff line number Diff line Loading @@ -182,7 +182,6 @@ import static com.android.server.wm.WindowStateAnimator.DRAW_PENDING; import static com.android.server.wm.WindowStateAnimator.HAS_DRAWN; import static com.android.server.wm.WindowStateAnimator.PRESERVED_SURFACE_LAYER; import static com.android.server.wm.WindowStateAnimator.READY_TO_SHOW; import static com.android.window.flags.Flags.surfaceTrustedOverlay; import android.annotation.CallSuper; import android.annotation.NonNull; Loading Loading @@ -1077,9 +1076,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mInputWindowHandle.setName(getName()); mInputWindowHandle.setPackageName(mAttrs.packageName); mInputWindowHandle.setLayoutParamsType(mAttrs.type); if (!surfaceTrustedOverlay()) { mInputWindowHandle.setTrustedOverlay(isWindowTrustedOverlay()); } if (DEBUG) { Slog.v(TAG, "Window " + this + " client=" + c.asBinder() + " token=" + token + " (" + mAttrs.token + ")" + " params=" + a); Loading Loading @@ -1142,9 +1138,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP @Override void setInitialSurfaceControlProperties(SurfaceControl.Builder b) { super.setInitialSurfaceControlProperties(b); if (surfaceTrustedOverlay() && isWindowTrustedOverlay()) { getPendingTransaction().setTrustedOverlay(mSurfaceControl, true); } getPendingTransaction().setTrustedOverlay(mSurfaceControl, isWindowTrustedOverlay()); getPendingTransaction().setSecure(mSurfaceControl, isSecureLocked()); // All apps should be considered as occluding when computing TrustedPresentation Thresholds. final boolean canOccludePresentation = !mSession.mCanAddInternalSystemWindow; Loading Loading @@ -6059,13 +6053,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } boolean isTrustedOverlay() { if (surfaceTrustedOverlay()) { WindowState parentWindow = getParentWindow(); return isWindowTrustedOverlay() || (parentWindow != null && parentWindow.isWindowTrustedOverlay()); } else { return mInputWindowHandle.isTrustedOverlay(); } } public boolean receiveFocusFromTapOutside() { Loading services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java +0 −10 Original line number Diff line number Diff line Loading @@ -27,8 +27,6 @@ import android.app.Activity; import android.app.Instrumentation; import android.os.IBinder; import android.platform.test.annotations.Presubmit; import android.platform.test.annotations.RequiresFlagsDisabled; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; import android.server.wm.BuildUtils; Loading @@ -41,7 +39,6 @@ import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.platform.app.InstrumentationRegistry; import com.android.server.wm.utils.CommonUtils; import com.android.window.flags.Flags; import org.junit.After; import org.junit.Before; Loading Loading @@ -85,14 +82,7 @@ public class TrustedOverlayTests { CommonUtils.waitUntilActivityRemoved(mActivity); } @RequiresFlagsDisabled(Flags.FLAG_SURFACE_TRUSTED_OVERLAY) @Test public void setTrustedOverlayInputWindow() throws InterruptedException { testTrustedOverlayChildHelper(false); } @Test @RequiresFlagsEnabled(Flags.FLAG_SURFACE_TRUSTED_OVERLAY) public void setTrustedOverlayChildLayer() throws InterruptedException { testTrustedOverlayChildHelper(true); } Loading Loading
core/java/android/view/InputWindowHandle.java +1 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.view; import static com.android.window.flags.Flags.surfaceTrustedOverlay; import android.annotation.IntDef; import android.annotation.Nullable; import android.graphics.Matrix; Loading Loading @@ -298,10 +296,6 @@ public final class InputWindowHandle { public void setTrustedOverlay(SurfaceControl.Transaction t, SurfaceControl sc, boolean isTrusted) { if (surfaceTrustedOverlay()) { t.setTrustedOverlay(sc, isTrusted); } else if (isTrusted) { inputConfig |= InputConfig.TRUSTED_OVERLAY; } } }
core/java/android/window/flags/window_surfaces.aconfig +0 −8 Original line number Diff line number Diff line Loading @@ -3,14 +3,6 @@ container: "system" # Project link: https://gantry.corp.google.com/projects/android_platform_window_surfaces/changes flag { namespace: "window_surfaces" name: "surface_trusted_overlay" description: "Whether to add trusted overlay flag on the SurfaceControl or the InputWindow" is_fixed_read_only: true bug: "292032926" } flag { namespace: "window_surfaces" name: "allow_disable_activity_record_input_sink" Loading
services/core/java/com/android/server/wm/WindowState.java +4 −14 Original line number Diff line number Diff line Loading @@ -182,7 +182,6 @@ import static com.android.server.wm.WindowStateAnimator.DRAW_PENDING; import static com.android.server.wm.WindowStateAnimator.HAS_DRAWN; import static com.android.server.wm.WindowStateAnimator.PRESERVED_SURFACE_LAYER; import static com.android.server.wm.WindowStateAnimator.READY_TO_SHOW; import static com.android.window.flags.Flags.surfaceTrustedOverlay; import android.annotation.CallSuper; import android.annotation.NonNull; Loading Loading @@ -1077,9 +1076,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mInputWindowHandle.setName(getName()); mInputWindowHandle.setPackageName(mAttrs.packageName); mInputWindowHandle.setLayoutParamsType(mAttrs.type); if (!surfaceTrustedOverlay()) { mInputWindowHandle.setTrustedOverlay(isWindowTrustedOverlay()); } if (DEBUG) { Slog.v(TAG, "Window " + this + " client=" + c.asBinder() + " token=" + token + " (" + mAttrs.token + ")" + " params=" + a); Loading Loading @@ -1142,9 +1138,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP @Override void setInitialSurfaceControlProperties(SurfaceControl.Builder b) { super.setInitialSurfaceControlProperties(b); if (surfaceTrustedOverlay() && isWindowTrustedOverlay()) { getPendingTransaction().setTrustedOverlay(mSurfaceControl, true); } getPendingTransaction().setTrustedOverlay(mSurfaceControl, isWindowTrustedOverlay()); getPendingTransaction().setSecure(mSurfaceControl, isSecureLocked()); // All apps should be considered as occluding when computing TrustedPresentation Thresholds. final boolean canOccludePresentation = !mSession.mCanAddInternalSystemWindow; Loading Loading @@ -6059,13 +6053,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } boolean isTrustedOverlay() { if (surfaceTrustedOverlay()) { WindowState parentWindow = getParentWindow(); return isWindowTrustedOverlay() || (parentWindow != null && parentWindow.isWindowTrustedOverlay()); } else { return mInputWindowHandle.isTrustedOverlay(); } } public boolean receiveFocusFromTapOutside() { Loading
services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java +0 −10 Original line number Diff line number Diff line Loading @@ -27,8 +27,6 @@ import android.app.Activity; import android.app.Instrumentation; import android.os.IBinder; import android.platform.test.annotations.Presubmit; import android.platform.test.annotations.RequiresFlagsDisabled; import android.platform.test.annotations.RequiresFlagsEnabled; import android.platform.test.flag.junit.CheckFlagsRule; import android.platform.test.flag.junit.DeviceFlagsValueProvider; import android.server.wm.BuildUtils; Loading @@ -41,7 +39,6 @@ import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.platform.app.InstrumentationRegistry; import com.android.server.wm.utils.CommonUtils; import com.android.window.flags.Flags; import org.junit.After; import org.junit.Before; Loading Loading @@ -85,14 +82,7 @@ public class TrustedOverlayTests { CommonUtils.waitUntilActivityRemoved(mActivity); } @RequiresFlagsDisabled(Flags.FLAG_SURFACE_TRUSTED_OVERLAY) @Test public void setTrustedOverlayInputWindow() throws InterruptedException { testTrustedOverlayChildHelper(false); } @Test @RequiresFlagsEnabled(Flags.FLAG_SURFACE_TRUSTED_OVERLAY) public void setTrustedOverlayChildLayer() throws InterruptedException { testTrustedOverlayChildHelper(true); } Loading