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

Commit ccaab92b authored by Josh Tsuji's avatar Josh Tsuji Committed by Automerger Merge Worker
Browse files

Merge "Add TYPE_TRUSTED_APPLICATION_OVERLAY." into rvc-dev am: 6282ff9b am:...

Merge "Add TYPE_TRUSTED_APPLICATION_OVERLAY." into rvc-dev am: 6282ff9b am: 934882c8 am: 5483aba9

Change-Id: I71c2695984989a95932c10bd482d39c6fef91070
parents 68a2caad 5483aba9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1216,6 +1216,14 @@ 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.
         */
+1 −1
Original line number Diff line number Diff line
@@ -634,7 +634,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi
                // themselves.
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT,
                WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
                WindowManager.LayoutParams.TYPE_TRUSTED_APPLICATION_OVERLAY,
                // Start not focusable - we'll become focusable when expanded so the ActivityView
                // can use the IME.
                WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+2 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
import static android.view.WindowManager.LayoutParams.TYPE_TRUSTED_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
@@ -790,6 +791,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
                // in a higher layer than TYPE_APPLICATION_OVERLAY.
                return  canAddInternalSystemWindow ? 13 : 10;
            case TYPE_APPLICATION_OVERLAY:
            case TYPE_TRUSTED_APPLICATION_OVERLAY:
                return  12;
            case TYPE_INPUT_METHOD:
                // on-screen keyboards and other such input method user interfaces go here.
+6 −0
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_TOAST;
import static android.view.WindowManager.LayoutParams.TYPE_TRUSTED_APPLICATION_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION;
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
@@ -996,6 +997,11 @@ public class DisplayPolicy {
                        android.Manifest.permission.STATUS_BAR_SERVICE, callingPid, callingUid,
                        "DisplayPolicy");
                break;
            case TYPE_TRUSTED_APPLICATION_OVERLAY:
                mContext.enforcePermission(
                        android.Manifest.permission.INTERNAL_SYSTEM_WINDOW, callingPid, callingUid,
                        "DisplayPolicy");
                break;
            case TYPE_STATUS_BAR_PANEL:
                return WindowManagerGlobal.ADD_INVALID_TYPE;
        }