Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class PipMenuActivity extends Activity { public static final int MESSAGE_ANIMATION_ENDED = 6; public static final int MESSAGE_POINTER_EVENT = 7; public static final int MESSAGE_MENU_EXPANDED = 8; public static final int MESSAGE_FADE_OUT_MENU = 9; private static final int INITIAL_DISMISS_DELAY = 3500; private static final int POST_INTERACTION_DISMISS_DELAY = 2000; Loading Loading @@ -182,6 +183,10 @@ public class PipMenuActivity extends Activity { mMenuContainerAnimator.start(); break; } case MESSAGE_FADE_OUT_MENU: { fadeOutMenu(); break; } } } }; Loading Loading @@ -409,6 +414,18 @@ public class PipMenuActivity extends Activity { } } /** * Different from {@link #hideMenu()}, this function does not try to finish this menu activity * and instead, it fades out the controls by setting the alpha to 0 directly without menu * visibility callbacks invoked. */ private void fadeOutMenu() { mMenuContainer.setAlpha(0f); mSettingsButton.setAlpha(0f); mDismissButton.setAlpha(0f); mResizeHandle.setAlpha(0f); } private void hideMenu() { hideMenu(null); } Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +22 −1 Original line number Diff line number Diff line Loading @@ -262,6 +262,9 @@ public class PipMenuActivityController { */ public void showMenuWithDelay(int menuState, Rect stackBounds, boolean allowMenuTimeout, boolean willResizeMenu, boolean showResizeHandle) { // hide all visible controls including close button and etc. first, this is to ensure // menu is totally invisible during the transition to eliminate unpleasant artifacts fadeOutMenu(); showMenuInternal(menuState, stackBounds, allowMenuTimeout, willResizeMenu, true /* withDelay */, showResizeHandle); } Loading Loading @@ -347,6 +350,23 @@ public class PipMenuActivityController { } } private void fadeOutMenu() { if (DEBUG) { Log.d(TAG, "fadeOutMenu() state=" + mMenuState + " hasActivity=" + (mToActivityMessenger != null) + " callers=\n" + Debug.getCallers(5, " ")); } if (mToActivityMessenger != null) { Message m = Message.obtain(); m.what = PipMenuActivity.MESSAGE_FADE_OUT_MENU; try { mToActivityMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "Could not notify menu to fade out", e); } } } /** * Hides the menu activity. */ Loading Loading @@ -513,7 +533,8 @@ public class PipMenuActivityController { private void onMenuStateChanged(int menuState, boolean resize, Runnable callback) { if (DEBUG) { Log.d(TAG, "onMenuStateChanged() mMenuState=" + mMenuState + " menuState=" + menuState + " resize=" + resize); + " menuState=" + menuState + " resize=" + resize + " callers=\n" + Debug.getCallers(5, " ")); } if (menuState != mMenuState) { Loading Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ public class PipMenuActivity extends Activity { public static final int MESSAGE_ANIMATION_ENDED = 6; public static final int MESSAGE_POINTER_EVENT = 7; public static final int MESSAGE_MENU_EXPANDED = 8; public static final int MESSAGE_FADE_OUT_MENU = 9; private static final int INITIAL_DISMISS_DELAY = 3500; private static final int POST_INTERACTION_DISMISS_DELAY = 2000; Loading Loading @@ -182,6 +183,10 @@ public class PipMenuActivity extends Activity { mMenuContainerAnimator.start(); break; } case MESSAGE_FADE_OUT_MENU: { fadeOutMenu(); break; } } } }; Loading Loading @@ -409,6 +414,18 @@ public class PipMenuActivity extends Activity { } } /** * Different from {@link #hideMenu()}, this function does not try to finish this menu activity * and instead, it fades out the controls by setting the alpha to 0 directly without menu * visibility callbacks invoked. */ private void fadeOutMenu() { mMenuContainer.setAlpha(0f); mSettingsButton.setAlpha(0f); mDismissButton.setAlpha(0f); mResizeHandle.setAlpha(0f); } private void hideMenu() { hideMenu(null); } Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +22 −1 Original line number Diff line number Diff line Loading @@ -262,6 +262,9 @@ public class PipMenuActivityController { */ public void showMenuWithDelay(int menuState, Rect stackBounds, boolean allowMenuTimeout, boolean willResizeMenu, boolean showResizeHandle) { // hide all visible controls including close button and etc. first, this is to ensure // menu is totally invisible during the transition to eliminate unpleasant artifacts fadeOutMenu(); showMenuInternal(menuState, stackBounds, allowMenuTimeout, willResizeMenu, true /* withDelay */, showResizeHandle); } Loading Loading @@ -347,6 +350,23 @@ public class PipMenuActivityController { } } private void fadeOutMenu() { if (DEBUG) { Log.d(TAG, "fadeOutMenu() state=" + mMenuState + " hasActivity=" + (mToActivityMessenger != null) + " callers=\n" + Debug.getCallers(5, " ")); } if (mToActivityMessenger != null) { Message m = Message.obtain(); m.what = PipMenuActivity.MESSAGE_FADE_OUT_MENU; try { mToActivityMessenger.send(m); } catch (RemoteException e) { Log.e(TAG, "Could not notify menu to fade out", e); } } } /** * Hides the menu activity. */ Loading Loading @@ -513,7 +533,8 @@ public class PipMenuActivityController { private void onMenuStateChanged(int menuState, boolean resize, Runnable callback) { if (DEBUG) { Log.d(TAG, "onMenuStateChanged() mMenuState=" + mMenuState + " menuState=" + menuState + " resize=" + resize); + " menuState=" + menuState + " resize=" + resize + " callers=\n" + Debug.getCallers(5, " ")); } if (menuState != mMenuState) { Loading