Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public class PipManager implements BasePipManager { // Re-enable touches after the animation completes mTouchHandler.setTouchEnabled(true); mTouchHandler.onPinnedStackAnimationEnded(); mMenuController.onPinnedStackAnimationEnded(); } @Override Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +13 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ public class PipMenuActivity extends Activity { public static final int MESSAGE_HIDE_MENU = 3; public static final int MESSAGE_UPDATE_ACTIONS = 4; public static final int MESSAGE_UPDATE_DISMISS_FRACTION = 5; public static final int MESSAGE_ANIMATION_ENDED = 6; private static final long INITIAL_DISMISS_DELAY = 3500; private static final long POST_INTERACTION_DISMISS_DELAY = 2000; Loading @@ -92,6 +93,7 @@ public class PipMenuActivity extends Activity { private int mMenuState; private boolean mAllowMenuTimeout = true; private boolean mAllowTouches = true; private final List<RemoteAction> mActions = new ArrayList<>(); Loading Loading @@ -149,6 +151,10 @@ public class PipMenuActivity extends Activity { updateDismissFraction(data.getFloat(EXTRA_DISMISS_FRACTION)); break; } case MESSAGE_ANIMATION_ENDED: { mAllowTouches = true; break; } } } }); Loading Loading @@ -245,6 +251,10 @@ public class PipMenuActivity extends Activity { @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (!mAllowTouches) { return super.dispatchTouchEvent(ev); } // On the first action outside the window, hide the menu switch (ev.getAction()) { case MotionEvent.ACTION_OUTSIDE: Loading Loading @@ -284,6 +294,9 @@ public class PipMenuActivity extends Activity { boolean allowMenuTimeout) { mAllowMenuTimeout = allowMenuTimeout; if (mMenuState != menuState) { boolean deferTouchesUntilAnimationEnds = (mMenuState == MENU_STATE_FULL) || (menuState == MENU_STATE_FULL); mAllowTouches = !deferTouchesUntilAnimationEnds; cancelDelayedFinish(); updateActionViews(stackBounds); if (mMenuContainerAnimator != null) { Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +13 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,19 @@ public class PipMenuActivityController { } } public void onPinnedStackAnimationEnded() { // Note: Only active menu activities care about this event if (mToActivityMessenger != null) { Message m = Message.obtain(); m.what = PipMenuActivity.MESSAGE_ANIMATION_ENDED; try { mToActivityMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "Could not notify menu pinned animation ended", e); } } } /** * Adds a new menu activity listener. */ Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ public class PipManager implements BasePipManager { // Re-enable touches after the animation completes mTouchHandler.setTouchEnabled(true); mTouchHandler.onPinnedStackAnimationEnded(); mMenuController.onPinnedStackAnimationEnded(); } @Override Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +13 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ public class PipMenuActivity extends Activity { public static final int MESSAGE_HIDE_MENU = 3; public static final int MESSAGE_UPDATE_ACTIONS = 4; public static final int MESSAGE_UPDATE_DISMISS_FRACTION = 5; public static final int MESSAGE_ANIMATION_ENDED = 6; private static final long INITIAL_DISMISS_DELAY = 3500; private static final long POST_INTERACTION_DISMISS_DELAY = 2000; Loading @@ -92,6 +93,7 @@ public class PipMenuActivity extends Activity { private int mMenuState; private boolean mAllowMenuTimeout = true; private boolean mAllowTouches = true; private final List<RemoteAction> mActions = new ArrayList<>(); Loading Loading @@ -149,6 +151,10 @@ public class PipMenuActivity extends Activity { updateDismissFraction(data.getFloat(EXTRA_DISMISS_FRACTION)); break; } case MESSAGE_ANIMATION_ENDED: { mAllowTouches = true; break; } } } }); Loading Loading @@ -245,6 +251,10 @@ public class PipMenuActivity extends Activity { @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (!mAllowTouches) { return super.dispatchTouchEvent(ev); } // On the first action outside the window, hide the menu switch (ev.getAction()) { case MotionEvent.ACTION_OUTSIDE: Loading Loading @@ -284,6 +294,9 @@ public class PipMenuActivity extends Activity { boolean allowMenuTimeout) { mAllowMenuTimeout = allowMenuTimeout; if (mMenuState != menuState) { boolean deferTouchesUntilAnimationEnds = (mMenuState == MENU_STATE_FULL) || (menuState == MENU_STATE_FULL); mAllowTouches = !deferTouchesUntilAnimationEnds; cancelDelayedFinish(); updateActionViews(stackBounds); if (mMenuContainerAnimator != null) { Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +13 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,19 @@ public class PipMenuActivityController { } } public void onPinnedStackAnimationEnded() { // Note: Only active menu activities care about this event if (mToActivityMessenger != null) { Message m = Message.obtain(); m.what = PipMenuActivity.MESSAGE_ANIMATION_ENDED; try { mToActivityMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "Could not notify menu pinned animation ended", e); } } } /** * Adds a new menu activity listener. */ Loading