OSDN Git Service

Fix broken statusbar disable flags
authorAdrian Roos <roosa@google.com>
Fri, 15 Apr 2016 23:28:03 +0000 (16:28 -0700)
committerAdrian Roos <roosa@google.com>
Fri, 15 Apr 2016 23:28:41 +0000 (16:28 -0700)
Fixes a bug where the disable flags were
always applied to user 0 instead of the current
user because the user switch dispatch from
WindowManager was broken.

Change-Id: Ib2faf0777c5367af5bf07cb2d11c51ed0222d65c
Fixes: 28062568

services/core/java/com/android/server/policy/PhoneWindowManager.java
services/core/java/com/android/server/statusbar/StatusBarManagerService.java

index 5ce451f..518c30e 100644 (file)
@@ -7459,9 +7459,10 @@ public class PhoneWindowManager implements WindowManagerPolicy {
         if (mKeyguardDelegate != null) {
             mKeyguardDelegate.setCurrentUser(newUserId);
         }
-        if (mStatusBarService != null) {
+        IStatusBarService statusBar = getStatusBarService();
+        if (statusBar != null) {
             try {
-                mStatusBarService.setCurrentUser(newUserId);
+                statusBar.setCurrentUser(newUserId);
             } catch (RemoteException e) {
                 // oh well
             }
index dbbaa5e..e18c926 100644 (file)
@@ -68,7 +68,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
     private int mDisabled1 = 0;
     private int mDisabled2 = 0;
 
-    private Object mLock = new Object();
+    private final Object mLock = new Object();
     // encompasses lights-out mode and other flags defined on View
     private int mSystemUiVisibility = 0;
     private int mFullscreenStackSysUiVisibility;
@@ -926,6 +926,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub {
                                 + " pkg=" + tok.pkg
                                 + " token=" + tok.token);
             }
+            pw.println("  mCurrentUserId=" + mCurrentUserId);
         }
     }
 }