Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −2 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_DREAM; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; Loading Loading @@ -2088,11 +2089,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { case TYPE_VOICE_INTERACTION: case TYPE_ACCESSIBILITY_OVERLAY: case TYPE_QS_DIALOG: case TYPE_NAVIGATION_BAR_PANEL: // The window manager will check these. return ADD_OKAY; } return mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED ? ADD_OKAY : ADD_PERMISSION_DENIED; return (mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED) ? ADD_OKAY : ADD_PERMISSION_DENIED; } // Things get a little more interesting for alert windows... Loading services/core/java/com/android/server/wm/DisplayPolicy.java +7 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.hardware.input.InputManager; import android.hardware.power.V1_0.PowerHint; import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -968,6 +969,12 @@ public class DisplayPolicy { } break; case TYPE_NAVIGATION_BAR_PANEL: // Check for permission if the caller is not the recents component. if (!mService.mAtmInternal.isCallerRecents(Binder.getCallingUid())) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.STATUS_BAR_SERVICE, "DisplayPolicy"); } break; case TYPE_STATUS_BAR_PANEL: case TYPE_STATUS_BAR_SUB_PANEL: case TYPE_VOICE_INTERACTION_STARTING: Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −2 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_DREAM; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; Loading Loading @@ -2088,11 +2089,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { case TYPE_VOICE_INTERACTION: case TYPE_ACCESSIBILITY_OVERLAY: case TYPE_QS_DIALOG: case TYPE_NAVIGATION_BAR_PANEL: // The window manager will check these. return ADD_OKAY; } return mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED ? ADD_OKAY : ADD_PERMISSION_DENIED; return (mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW) == PERMISSION_GRANTED) ? ADD_OKAY : ADD_PERMISSION_DENIED; } // Things get a little more interesting for alert windows... Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +7 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.hardware.input.InputManager; import android.hardware.power.V1_0.PowerHint; import android.os.Binder; import android.os.Handler; import android.os.Looper; import android.os.Message; Loading Loading @@ -968,6 +969,12 @@ public class DisplayPolicy { } break; case TYPE_NAVIGATION_BAR_PANEL: // Check for permission if the caller is not the recents component. if (!mService.mAtmInternal.isCallerRecents(Binder.getCallingUid())) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.STATUS_BAR_SERVICE, "DisplayPolicy"); } break; case TYPE_STATUS_BAR_PANEL: case TYPE_STATUS_BAR_SUB_PANEL: case TYPE_VOICE_INTERACTION_STARTING: Loading