Initial changes to support expanded PiP
- Prior to this CL, the input consumer and size of the PiP was tightly
coupled with the visibility of the menu, but with the expanded state,
the PiP should still move while the menu is visible.
Bug: 35358488
Test: Click on the PiP to expand it
Change-Id: If52208f19af516b2455bde26855c80f44bc9021a
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index 714b263..4c5d8a1 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -53,6 +53,7 @@
private final PinnedStackListener mPinnedStackListener = new PinnedStackListener();
+ private InputConsumerController mInputConsumerController;
private PipMenuActivityController mMenuController;
private PipMediaController mMediaController;
private PipTouchHandler mTouchHandler;
@@ -68,6 +69,7 @@
}
mTouchHandler.onActivityPinned();
mMediaController.onActivityPinned();
+ mMenuController.onActivityPinned();
}
@Override
@@ -151,11 +153,12 @@
}
SystemServicesProxy.getInstance(mContext).registerTaskStackListener(mTaskStackListener);
+ mInputConsumerController = new InputConsumerController(mWindowManager);
mMediaController = new PipMediaController(context, mActivityManager);
- mMenuController = new PipMenuActivityController(context, mActivityManager, mWindowManager,
- mMediaController);
- mTouchHandler = new PipTouchHandler(context, mMenuController, mActivityManager,
- mWindowManager);
+ mMenuController = new PipMenuActivityController(context, mActivityManager, mMediaController,
+ mInputConsumerController);
+ mTouchHandler = new PipTouchHandler(context, mActivityManager, mMenuController,
+ mInputConsumerController);
}
/**
@@ -178,6 +181,7 @@
public void dump(PrintWriter pw) {
final String innerPrefix = " ";
pw.println(TAG);
+ mInputConsumerController.dump(pw, innerPrefix);
mMenuController.dump(pw, innerPrefix);
mTouchHandler.dump(pw, innerPrefix);
}