OSDN Git Service

Fix issue with PiP callbacks not being handled for secondary users.
authorWinson Chung <winsonc@google.com>
Mon, 7 Aug 2017 22:28:44 +0000 (15:28 -0700)
committerWinson Chung <winsonc@google.com>
Tue, 8 Aug 2017 21:41:07 +0000 (14:41 -0700)
- With ag/1767862, we do not persist PiP across users, so there is no
  need for additional logic in SystemUI to dedupe these calls. Since
  PiP is managed in the primary user's SystemUI process, this logic
  was prevening the relaunching of the activity.

Bug: 64316002
Test: Launch PiP from a secondary user, restart the activity and
      ensure that it is brought to fullscreen.

Change-Id: I49db5cab9f0be7366390d1e36edcaf4d6b05717a

packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java

index 6c6054c..b3f992d 100644 (file)
@@ -71,10 +71,6 @@ public class PipManager implements BasePipManager {
     TaskStackListener mTaskStackListener = new TaskStackListener() {
         @Override
         public void onActivityPinned(String packageName, int taskId) {
-            if (!checkCurrentUserId(mContext, false /* debug */)) {
-                return;
-            }
-
             mTouchHandler.onActivityPinned();
             mMediaController.onActivityPinned();
             mMenuController.onActivityPinned();
@@ -86,10 +82,6 @@ public class PipManager implements BasePipManager {
 
         @Override
         public void onActivityUnpinned() {
-            if (!checkCurrentUserId(mContext, false /* debug */)) {
-                return;
-            }
-
             ComponentName topPipActivity = PipUtils.getTopPinnedActivity(mContext,
                     mActivityManager);
             mMenuController.onActivityUnpinned(topPipActivity);
@@ -116,10 +108,6 @@ public class PipManager implements BasePipManager {
 
         @Override
         public void onPinnedActivityRestartAttempt(boolean clearedTask) {
-            if (!checkCurrentUserId(mContext, false /* debug */)) {
-                return;
-            }
-
             mTouchHandler.getMotionHelper().expandPip(clearedTask /* skipAnimation */);
         }
     };