Merge "Add TYPE_TRUSTED_APPLICATION_OVERLAY." into rvc-dev am: 6282ff9bc2
Change-Id: Iaeafccc40006695f9c3471c7c80b26a70e609372
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user