summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java32
1 files changed, 18 insertions, 14 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 836a19c..b61ba5c 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -2806,18 +2806,10 @@ public class WindowManagerService extends IWindowManager.Stub
boolean configChanged;
boolean surfaceChanged = false;
boolean animating;
+ boolean hasStatusBarPermission =
+ mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
+ == PackageManager.PERMISSION_GRANTED;
- // if they don't have this permission, mask out the status bar bits
- int systemUiVisibility = 0;
- if (attrs != null) {
- systemUiVisibility = (attrs.systemUiVisibility|attrs.subtreeSystemUiVisibility);
- if ((systemUiVisibility & StatusBarManager.DISABLE_MASK) != 0) {
- if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
- != PackageManager.PERMISSION_GRANTED) {
- systemUiVisibility &= ~StatusBarManager.DISABLE_MASK;
- }
- }
- }
long origId = Binder.clearCallingIdentity();
synchronized(mWindowMap) {
@@ -2832,14 +2824,26 @@ public class WindowManagerService extends IWindowManager.Stub
win.mRequestedWidth = requestedWidth;
win.mRequestedHeight = requestedHeight;
}
- if (attrs != null && seq == win.mSeq) {
- win.mSystemUiVisibility = systemUiVisibility;
- }
if (attrs != null) {
mPolicy.adjustWindowParamsLw(attrs);
}
+ // if they don't have the permission, mask out the status bar bits
+ int systemUiVisibility = 0;
+ if (attrs != null) {
+ systemUiVisibility = (attrs.systemUiVisibility|attrs.subtreeSystemUiVisibility);
+ if ((systemUiVisibility & StatusBarManager.DISABLE_MASK) != 0) {
+ if (!hasStatusBarPermission) {
+ systemUiVisibility &= ~StatusBarManager.DISABLE_MASK;
+ }
+ }
+ }
+
+ if (attrs != null && seq == win.mSeq) {
+ win.mSystemUiVisibility = systemUiVisibility;
+ }
+
winAnimator.mSurfaceDestroyDeferred =
(flags&WindowManagerGlobal.RELAYOUT_DEFER_SURFACE_DESTROY) != 0;