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

Commit a0d71acf authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [15975848, 15975849, 15975850, 16502615, 16502616] into...

Merge cherrypicks of [15975848, 15975849, 15975850, 16502615, 16502616] into security-aosp-rvc-release.

Change-Id: Ib3031d5122c8e2ca8a2e9e8cccb892baaf254dea
parents 2126b5a0 b272d38e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ filegroup {
        ":framework_native_aidl",
        ":gatekeeper_aidl",
        ":gsiservice_aidl",
        ":guiconstants_aidl",
        ":incidentcompanion_aidl",
        ":installd_aidl",
        ":keystore_aidl",
+3 −2
Original line number Diff line number Diff line
@@ -336,11 +336,12 @@ interface IWindowSession {
    * an input channel where the client can receive input.
    */
    void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window,
            in IBinder hostInputToken, int flags, int type, out InputChannel outInputChannel);
            in IBinder hostInputToken, int flags, int privateFlags, int type,
            out InputChannel outInputChannel);

    /**
     * Update the flags on an input channel associated with a particular surface.
     */
    void updateInputChannel(in IBinder channelToken, int displayId, in SurfaceControl surface,
            int flags, in Region region);
            int flags, int privateFlags, in Region region);
}
+3 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ public final class InputWindowHandle {
    // Input event dispatching is paused.
    public boolean paused;

    // Window is trusted overlay.
    public boolean trustedOverlay;

    // Id of process and user that owns the window.
    public int ownerPid;
    public int ownerUid;
+27 −2
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
import android.gui.DropInputMode;
import android.hardware.display.DeviceProductInfo;
import android.hardware.display.DisplayedContentSample;
import android.hardware.display.DisplayedContentSamplingAttributes;
@@ -49,7 +50,6 @@ import android.os.Build;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Trace;
import android.util.ArrayMap;
import android.util.Log;
import android.util.SparseIntArray;
@@ -139,7 +139,10 @@ public final class SurfaceControl implements Parcelable {
            int blurRadius);
    private static native void nativeSetLayerStack(long transactionObj, long nativeObject,
            int layerStack);

    private static native void nativeSetTrustedOverlay(long transactionObj, long nativeObject,
            boolean isTrustedOverlay);
    private static native void nativeSetDropInputMode(
            long transactionObj, long nativeObject, int flags);
    private static native boolean nativeClearContentFrameStats(long nativeObject);
    private static native boolean nativeGetContentFrameStats(long nativeObject, WindowContentFrameStats outStats);
    private static native boolean nativeClearAnimationFrameStats();
@@ -3037,6 +3040,28 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * Sets the trusted overlay state on this SurfaceControl and it is inherited to all the
         * children. The caller must hold the ACCESS_SURFACE_FLINGER permission.
         * @hide
         */
        public Transaction setTrustedOverlay(SurfaceControl sc, boolean isTrustedOverlay) {
            checkPreconditions(sc);
            nativeSetTrustedOverlay(mNativeObject, sc.mNativeObject, isTrustedOverlay);
            return this;
        }

        /**
         * Sets the input event drop mode on this SurfaceControl and its children. The caller must
         * hold the ACCESS_SURFACE_FLINGER permission. See {@code InputEventDropMode}.
         * @hide
         */
        public Transaction setDropInputMode(SurfaceControl sc, @DropInputMode int mode) {
            checkPreconditions(sc);
            nativeSetDropInputMode(mNativeObject, sc.mNativeObject, mode);
            return this;
        }

        /**
         * Merge the other transaction into this transaction, clearing the
         * other transaction as if it had been applied.
+19 −8
Original line number Diff line number Diff line
@@ -1216,14 +1216,6 @@ public interface WindowManager extends ViewManager {
         */
        public static final int TYPE_STATUS_BAR_ADDITIONAL = FIRST_SYSTEM_WINDOW + 41;

        /**
         * Similar to TYPE_APPLICATION_OVERLAY, but trusted to overlay other windows since it is
         * is coming from the system.
         * @hide
         */
        // TODO(b/155781676): Remove and replace call points with trustedOverlay when that is ready.
        public static final int TYPE_TRUSTED_APPLICATION_OVERLAY = FIRST_SYSTEM_WINDOW + 42;

        /**
         * End of types of system windows.
         */
@@ -2032,6 +2024,11 @@ public interface WindowManager extends ViewManager {
         */
        public static final int PRIVATE_FLAG_FIT_INSETS_CONTROLLED = 0x10000000;

        /**
         * Flag to indicate that the window is a trusted overlay.
         * @hide
         */
        public static final int PRIVATE_FLAG_TRUSTED_OVERLAY = 0x20000000;
        /**
         * An internal annotation for flags that can be specified to {@link #softInputMode}.
         *
@@ -2940,6 +2937,20 @@ public interface WindowManager extends ViewManager {
            privateFlags |= PRIVATE_FLAG_FIT_INSETS_CONTROLLED;
        }

        /**
         * Specifies that the window should be considered a trusted system overlay. Trusted system
         * overlays are ignored when considering whether windows are obscured during input
         * dispatch. Requires the {@link android.Manifest.permission.INTERNAL_SYSTEM_WINDOW}
         * permission.
         *
         * {@see android.view.MotionEvent#FLAG_WINDOW_IS_OBSCURED}
         * {@see android.view.MotionEvent#FLAG_WINDOW_IS_PARTIALLY_OBSCURED}
         * @hide
         */
        public void setTrustedOverlay() {
            privateFlags |= PRIVATE_FLAG_TRUSTED_OVERLAY;
        }

        /**
         * @return the insets types that this window is avoiding overlapping.
         */
Loading