OSDN Git Service

Fixing issue with checking the docked stack state for the wrong user.
authorWinson <winsonc@google.com>
Tue, 12 Jan 2016 23:59:29 +0000 (15:59 -0800)
committerWinson <winsonc@google.com>
Thu, 14 Jan 2016 23:31:47 +0000 (15:31 -0800)
Bug: 26256285

Change-Id: I068ee8250dc75bda984092300d75031422fbbd11

packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java

index e05a6f8..01de60c 100644 (file)
@@ -367,7 +367,7 @@ public class SystemServicesProxy {
     }
 
     /**
-     * @return whether there are any docked tasks.
+     * @return whether there are any docked tasks for the current user.
      */
     public boolean hasDockedTask() {
         if (mIam == null) return false;
@@ -375,6 +375,9 @@ public class SystemServicesProxy {
         ActivityManager.StackInfo stackInfo = null;
         try {
             stackInfo = mIam.getStackInfo(DOCKED_STACK_ID);
+            if (stackInfo != null && stackInfo.userId != getCurrentUser()) {
+                return false;
+            }
         } catch (RemoteException e) {
             e.printStackTrace();
         }