Loading packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java +12 −0 Original line number Diff line number Diff line Loading @@ -551,6 +551,11 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize return; } if (mLeash == null) { Log.e(TAG, "PiP Leash is not yet ready."); return; } if (Looper.getMainLooper() != Looper.myLooper()) { throw new RuntimeException("PipMenuView needs to be attached on the main thread."); } Loading Loading @@ -580,6 +585,13 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize } } /** * Return whether the PiP Menu has been attached to the leash yet. */ public boolean isPipMenuViewHostAttached() { return mPipViewHost != null; } /** * Note that dismissing PiP is now originated from SystemUI, see {@link #exitPip(int)}. Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +13 −9 Original line number Diff line number Diff line Loading @@ -118,12 +118,7 @@ public class PipMenuActivityController { } public void onActivityPinned() { if (mPipMenuView == null) { WindowManager.LayoutParams lp = getPipMenuLayoutParams(0, 0); mPipMenuView = new PipMenuView(mContext, this); mPipTaskOrganizer.attachPipMenuViewHost(mPipMenuView, lp); } attachPipMenuView(); mInputConsumerController.registerInputConsumer(true /* withSfVsync */); } Loading @@ -140,6 +135,14 @@ public class PipMenuActivityController { } } private void attachPipMenuView() { if (mPipMenuView == null) { mPipMenuView = new PipMenuView(mContext, this); } mPipTaskOrganizer.attachPipMenuViewHost(mPipMenuView, getPipMenuLayoutParams(0, 0)); } /** * Adds a new menu activity listener. */ Loading Loading @@ -197,10 +200,11 @@ public class PipMenuActivityController { + " callers=\n" + Debug.getCallers(5, " ")); } if (mPipMenuView == null) { Log.e(TAG, "PipMenu has not been attached yet."); return; if (!mPipTaskOrganizer.isPipMenuViewHostAttached()) { Log.d(TAG, "PipMenu has not been attached yet. Attaching now at showMenuInternal()."); attachPipMenuView(); } mPipMenuView.showMenu(menuState, stackBounds, allowMenuTimeout, willResizeMenu, withDelay, showResizeHandle); } Loading Loading
packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java +12 −0 Original line number Diff line number Diff line Loading @@ -551,6 +551,11 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize return; } if (mLeash == null) { Log.e(TAG, "PiP Leash is not yet ready."); return; } if (Looper.getMainLooper() != Looper.myLooper()) { throw new RuntimeException("PipMenuView needs to be attached on the main thread."); } Loading Loading @@ -580,6 +585,13 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize } } /** * Return whether the PiP Menu has been attached to the leash yet. */ public boolean isPipMenuViewHostAttached() { return mPipViewHost != null; } /** * Note that dismissing PiP is now originated from SystemUI, see {@link #exitPip(int)}. Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +13 −9 Original line number Diff line number Diff line Loading @@ -118,12 +118,7 @@ public class PipMenuActivityController { } public void onActivityPinned() { if (mPipMenuView == null) { WindowManager.LayoutParams lp = getPipMenuLayoutParams(0, 0); mPipMenuView = new PipMenuView(mContext, this); mPipTaskOrganizer.attachPipMenuViewHost(mPipMenuView, lp); } attachPipMenuView(); mInputConsumerController.registerInputConsumer(true /* withSfVsync */); } Loading @@ -140,6 +135,14 @@ public class PipMenuActivityController { } } private void attachPipMenuView() { if (mPipMenuView == null) { mPipMenuView = new PipMenuView(mContext, this); } mPipTaskOrganizer.attachPipMenuViewHost(mPipMenuView, getPipMenuLayoutParams(0, 0)); } /** * Adds a new menu activity listener. */ Loading Loading @@ -197,10 +200,11 @@ public class PipMenuActivityController { + " callers=\n" + Debug.getCallers(5, " ")); } if (mPipMenuView == null) { Log.e(TAG, "PipMenu has not been attached yet."); return; if (!mPipTaskOrganizer.isPipMenuViewHostAttached()) { Log.d(TAG, "PipMenu has not been attached yet. Attaching now at showMenuInternal()."); attachPipMenuView(); } mPipMenuView.showMenu(menuState, stackBounds, allowMenuTimeout, willResizeMenu, withDelay, showResizeHandle); } Loading