Loading core/java/android/view/IPinnedStackListener.aidl +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.app.RemoteAction; import android.content.ComponentName; import android.content.pm.ParceledListSlice; import android.graphics.Rect; Loading Loading @@ -51,9 +52,9 @@ oneway interface IPinnedStackListener { /** * Called when the set of actions for the current PiP activity changes, or when the listener * is first registered to allow the listener to synchronized its state with the controller. * is first registered to allow the listener to synchronize its state with the controller. */ void onActionsChanged(in ParceledListSlice actions); void onActionsChanged(in ParceledListSlice<RemoteAction> actions); /** * Called by the window manager to notify the listener that Activity (was or is in pinned mode) Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/PinnedStackListenerForwarder.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.shared.system; import android.app.RemoteAction; import android.content.ComponentName; import android.content.pm.ParceledListSlice; import android.view.DisplayInfo; Loading Loading @@ -66,7 +67,7 @@ public class PinnedStackListenerForwarder extends IPinnedStackListener.Stub { } @Override public void onActionsChanged(ParceledListSlice actions) { public void onActionsChanged(ParceledListSlice<RemoteAction> actions) { for (PinnedStackListener listener : mListeners) { listener.onActionsChanged(actions); } Loading Loading @@ -111,7 +112,7 @@ public class PinnedStackListenerForwarder extends IPinnedStackListener.Stub { public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {} public void onActionsChanged(ParceledListSlice actions) {} public void onActionsChanged(ParceledListSlice<RemoteAction> actions) {} public void onActivityHidden(ComponentName componentName) {} Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityTaskManager; import android.app.IActivityManager; import android.app.RemoteAction; import android.content.ComponentName; import android.content.Context; import android.content.pm.ParceledListSlice; Loading Loading @@ -209,7 +210,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio } @Override public void onActionsChanged(ParceledListSlice actions) { public void onActionsChanged(ParceledListSlice<RemoteAction> actions) { mHandler.post(() -> mMenuController.setAppActions(actions)); } Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +4 −3 Original line number Diff line number Diff line Loading @@ -162,9 +162,10 @@ public class PipMenuActivity extends Activity { break; case MESSAGE_UPDATE_ACTIONS: { final Bundle data = (Bundle) msg.obj; final ParceledListSlice actions = data.getParcelable(EXTRA_ACTIONS); final ParceledListSlice<RemoteAction> actions = data.getParcelable( EXTRA_ACTIONS); setActions(data.getParcelable(EXTRA_STACK_BOUNDS), actions != null ? actions.getList() : Collections.EMPTY_LIST); ? actions.getList() : Collections.emptyList()); break; } case MESSAGE_UPDATE_DISMISS_FRACTION: { Loading Loading @@ -496,7 +497,7 @@ public class PipMenuActivity extends Activity { } notifyActivityCallback(mMessenger); ParceledListSlice actions = intent.getParcelableExtra(EXTRA_ACTIONS); ParceledListSlice<RemoteAction> actions = intent.getParcelableExtra(EXTRA_ACTIONS); if (actions != null) { mActions.clear(); mActions.addAll(actions.getList()); Loading packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +5 −5 Original line number Diff line number Diff line Loading @@ -115,8 +115,8 @@ public class PipMenuActivityController { private InputConsumerController mInputConsumerController; private ArrayList<Listener> mListeners = new ArrayList<>(); private ParceledListSlice mAppActions; private ParceledListSlice mMediaActions; private ParceledListSlice<RemoteAction> mAppActions; private ParceledListSlice<RemoteAction> mMediaActions; private int mMenuState; // The dismiss fraction update is sent frequently, so use a temporary bundle for the message Loading Loading @@ -429,7 +429,7 @@ public class PipMenuActivityController { /** * Sets the menu actions to the actions provided by the current PiP activity. */ public void setAppActions(ParceledListSlice appActions) { public void setAppActions(ParceledListSlice<RemoteAction> appActions) { mAppActions = appActions; updateMenuActions(); } Loading @@ -437,7 +437,7 @@ public class PipMenuActivityController { /** * @return the best set of actions to show in the PiP menu. */ private ParceledListSlice resolveMenuActions() { private ParceledListSlice<RemoteAction> resolveMenuActions() { if (isValidActions(mAppActions)) { return mAppActions; } Loading Loading @@ -515,7 +515,7 @@ public class PipMenuActivityController { /** * Returns whether the set of actions are valid. */ private boolean isValidActions(ParceledListSlice actions) { private static boolean isValidActions(ParceledListSlice<?> actions) { return actions != null && actions.getList().size() > 0; } Loading Loading
core/java/android/view/IPinnedStackListener.aidl +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.app.RemoteAction; import android.content.ComponentName; import android.content.pm.ParceledListSlice; import android.graphics.Rect; Loading Loading @@ -51,9 +52,9 @@ oneway interface IPinnedStackListener { /** * Called when the set of actions for the current PiP activity changes, or when the listener * is first registered to allow the listener to synchronized its state with the controller. * is first registered to allow the listener to synchronize its state with the controller. */ void onActionsChanged(in ParceledListSlice actions); void onActionsChanged(in ParceledListSlice<RemoteAction> actions); /** * Called by the window manager to notify the listener that Activity (was or is in pinned mode) Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/PinnedStackListenerForwarder.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.shared.system; import android.app.RemoteAction; import android.content.ComponentName; import android.content.pm.ParceledListSlice; import android.view.DisplayInfo; Loading Loading @@ -66,7 +67,7 @@ public class PinnedStackListenerForwarder extends IPinnedStackListener.Stub { } @Override public void onActionsChanged(ParceledListSlice actions) { public void onActionsChanged(ParceledListSlice<RemoteAction> actions) { for (PinnedStackListener listener : mListeners) { listener.onActionsChanged(actions); } Loading Loading @@ -111,7 +112,7 @@ public class PinnedStackListenerForwarder extends IPinnedStackListener.Stub { public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {} public void onActionsChanged(ParceledListSlice actions) {} public void onActionsChanged(ParceledListSlice<RemoteAction> actions) {} public void onActivityHidden(ComponentName componentName) {} Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityTaskManager; import android.app.IActivityManager; import android.app.RemoteAction; import android.content.ComponentName; import android.content.Context; import android.content.pm.ParceledListSlice; Loading Loading @@ -209,7 +210,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio } @Override public void onActionsChanged(ParceledListSlice actions) { public void onActionsChanged(ParceledListSlice<RemoteAction> actions) { mHandler.post(() -> mMenuController.setAppActions(actions)); } Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +4 −3 Original line number Diff line number Diff line Loading @@ -162,9 +162,10 @@ public class PipMenuActivity extends Activity { break; case MESSAGE_UPDATE_ACTIONS: { final Bundle data = (Bundle) msg.obj; final ParceledListSlice actions = data.getParcelable(EXTRA_ACTIONS); final ParceledListSlice<RemoteAction> actions = data.getParcelable( EXTRA_ACTIONS); setActions(data.getParcelable(EXTRA_STACK_BOUNDS), actions != null ? actions.getList() : Collections.EMPTY_LIST); ? actions.getList() : Collections.emptyList()); break; } case MESSAGE_UPDATE_DISMISS_FRACTION: { Loading Loading @@ -496,7 +497,7 @@ public class PipMenuActivity extends Activity { } notifyActivityCallback(mMessenger); ParceledListSlice actions = intent.getParcelableExtra(EXTRA_ACTIONS); ParceledListSlice<RemoteAction> actions = intent.getParcelableExtra(EXTRA_ACTIONS); if (actions != null) { mActions.clear(); mActions.addAll(actions.getList()); Loading
packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +5 −5 Original line number Diff line number Diff line Loading @@ -115,8 +115,8 @@ public class PipMenuActivityController { private InputConsumerController mInputConsumerController; private ArrayList<Listener> mListeners = new ArrayList<>(); private ParceledListSlice mAppActions; private ParceledListSlice mMediaActions; private ParceledListSlice<RemoteAction> mAppActions; private ParceledListSlice<RemoteAction> mMediaActions; private int mMenuState; // The dismiss fraction update is sent frequently, so use a temporary bundle for the message Loading Loading @@ -429,7 +429,7 @@ public class PipMenuActivityController { /** * Sets the menu actions to the actions provided by the current PiP activity. */ public void setAppActions(ParceledListSlice appActions) { public void setAppActions(ParceledListSlice<RemoteAction> appActions) { mAppActions = appActions; updateMenuActions(); } Loading @@ -437,7 +437,7 @@ public class PipMenuActivityController { /** * @return the best set of actions to show in the PiP menu. */ private ParceledListSlice resolveMenuActions() { private ParceledListSlice<RemoteAction> resolveMenuActions() { if (isValidActions(mAppActions)) { return mAppActions; } Loading Loading @@ -515,7 +515,7 @@ public class PipMenuActivityController { /** * Returns whether the set of actions are valid. */ private boolean isValidActions(ParceledListSlice actions) { private static boolean isValidActions(ParceledListSlice<?> actions) { return actions != null && actions.getList().size() > 0; } Loading