Loading quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -1211,6 +1211,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, TaskInfoCompat.getWindowConfigurationBounds(taskInfo), startBounds, destinationBounds, mRecentsView.getPipCornerRadius(), mRecentsView); // We would assume home and app window always in the same rotation While homeRotation // is not ROTATION_0 (which implies the rotation is turned on in launcher settings). Loading quickstep/src/com/android/quickstep/SystemUiProxy.java +26 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,12 @@ public class SystemUiProxy implements ISystemUiProxy, MAIN_EXECUTOR.execute(() -> clearProxy()); }; // Save the listeners passed into the proxy since when set/register these listeners, // setProxy may not have been called, eg. OverviewProxyService is not connected yet. private IPipAnimationListener mPendingPipAnimationListener; private ISplitScreenListener mPendingSplitScreenListener; private IStartingWindowListener mPendingStartingWindowListener; // Used to dedupe calls to SystemUI private int mLastShelfHeight; private boolean mLastShelfVisible; Loading Loading @@ -116,6 +122,19 @@ public class SystemUiProxy implements ISystemUiProxy, mShellTransitions = shellTransitions; mStartingWindow = startingWindow; linkToDeath(); // re-attach the listeners once missing due to setProxy has not been initialized yet. if (mPendingPipAnimationListener != null && mPip != null) { setPinnedStackAnimationListener(mPendingPipAnimationListener); mPendingPipAnimationListener = null; } if (mPendingSplitScreenListener != null && mSplitScreen != null) { registerSplitScreenListener(mPendingSplitScreenListener); mPendingSplitScreenListener = null; } if (mPendingStartingWindowListener != null && mStartingWindow != null) { setStartingWindowListener(mPendingStartingWindowListener); mPendingStartingWindowListener = null; } } public void clearProxy() { Loading Loading @@ -390,6 +409,8 @@ public class SystemUiProxy implements ISystemUiProxy, } catch (RemoteException e) { Log.w(TAG, "Failed call setPinnedStackAnimationListener", e); } } else { mPendingPipAnimationListener = listener; } } Loading Loading @@ -427,6 +448,8 @@ public class SystemUiProxy implements ISystemUiProxy, } catch (RemoteException e) { Log.w(TAG, "Failed call registerSplitScreenListener"); } } else { mPendingSplitScreenListener = listener; } } Loading @@ -438,6 +461,7 @@ public class SystemUiProxy implements ISystemUiProxy, Log.w(TAG, "Failed call unregisterSplitScreenListener"); } } mPendingSplitScreenListener = null; } public void setSideStageVisibility(boolean visible) { Loading Loading @@ -590,6 +614,8 @@ public class SystemUiProxy implements ISystemUiProxy, } catch (RemoteException e) { Log.w(TAG, "Failed call setStartingWindowListener", e); } } else { mPendingStartingWindowListener = listener; } } } quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +3 −1 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator { * different from the appBounds if user has swiped a certain distance and * Launcher has performed transform on the leash. * @param destinationBounds Bounds of the destination this animator ends to * @param cornerRadius Corner radius in pixel value for PiP window */ public SwipePipToHomeAnimator(int taskId, @NonNull ComponentName componentName, Loading @@ -97,6 +98,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator { @NonNull Rect appBounds, @NonNull Rect startBounds, @NonNull Rect destinationBounds, int cornerRadius, @NonNull View view) { mTaskId = taskId; mComponentName = componentName; Loading @@ -106,7 +108,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator { mDestinationBounds.set(destinationBounds); mDestinationBoundsTransformed.set(mDestinationBounds); mDestinationBoundsAnimation.set(mDestinationBounds); mSurfaceTransactionHelper = new PipSurfaceTransactionHelper(); mSurfaceTransactionHelper = new PipSurfaceTransactionHelper(cornerRadius); if (sourceRectHint == null) { mSourceHintRectInsets = null; Loading quickstep/src/com/android/quickstep/views/RecentsView.java +21 −3 Original line number Diff line number Diff line Loading @@ -494,6 +494,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private final PinnedStackAnimationListener mIPipAnimationListener = new PinnedStackAnimationListener(); private int mPipCornerRadius; // Used to keep track of the last requested task list id, so that we do not request to load the // tasks again if we have already requested it and the task list has not changed Loading Loading @@ -795,7 +796,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T mSyncTransactionApplier = new SurfaceTransactionApplier(this); mLiveTileParams.setSyncTransactionApplier(mSyncTransactionApplier); RecentsModel.INSTANCE.get(getContext()).addThumbnailChangeListener(this); mIPipAnimationListener.setActivity(mActivity); mIPipAnimationListener.setActivityAndRecentsView(mActivity, this); SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener( mIPipAnimationListener); mOrientationState.initListeners(); Loading @@ -815,7 +816,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T RecentsModel.INSTANCE.get(getContext()).removeThumbnailChangeListener(this); SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener(null); SplitScreenBounds.INSTANCE.removeOnChangeListener(this); mIPipAnimationListener.setActivity(null); mIPipAnimationListener.setActivityAndRecentsView(null, null); mOrientationState.destroyListeners(); mTaskOverlayFactory.removeListeners(); } Loading Loading @@ -3760,6 +3761,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T mScrollListeners.remove(listener); } /** * @return Corner radius in pixel value for PiP window, which is updated via * {@link #mIPipAnimationListener} */ public int getPipCornerRadius() { return mPipCornerRadius; } @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); Loading @@ -3776,9 +3785,11 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private static class PinnedStackAnimationListener<T extends BaseActivity> extends IPipAnimationListener.Stub { private T mActivity; private RecentsView mRecentsView; public void setActivity(T activity) { public void setActivityAndRecentsView(T activity, RecentsView recentsView) { mActivity = activity; mRecentsView = recentsView; } @Override Loading @@ -3791,6 +3802,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } }); } @Override public void onPipCornerRadiusChanged(int cornerRadius) { if (mRecentsView != null) { mRecentsView.mPipCornerRadius = cornerRadius; } } } /** Get the color used for foreground scrimming the RecentsView for sharing. */ Loading Loading
quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +1 −0 Original line number Diff line number Diff line Loading @@ -1211,6 +1211,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, TaskInfoCompat.getWindowConfigurationBounds(taskInfo), startBounds, destinationBounds, mRecentsView.getPipCornerRadius(), mRecentsView); // We would assume home and app window always in the same rotation While homeRotation // is not ROTATION_0 (which implies the rotation is turned on in launcher settings). Loading
quickstep/src/com/android/quickstep/SystemUiProxy.java +26 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,12 @@ public class SystemUiProxy implements ISystemUiProxy, MAIN_EXECUTOR.execute(() -> clearProxy()); }; // Save the listeners passed into the proxy since when set/register these listeners, // setProxy may not have been called, eg. OverviewProxyService is not connected yet. private IPipAnimationListener mPendingPipAnimationListener; private ISplitScreenListener mPendingSplitScreenListener; private IStartingWindowListener mPendingStartingWindowListener; // Used to dedupe calls to SystemUI private int mLastShelfHeight; private boolean mLastShelfVisible; Loading Loading @@ -116,6 +122,19 @@ public class SystemUiProxy implements ISystemUiProxy, mShellTransitions = shellTransitions; mStartingWindow = startingWindow; linkToDeath(); // re-attach the listeners once missing due to setProxy has not been initialized yet. if (mPendingPipAnimationListener != null && mPip != null) { setPinnedStackAnimationListener(mPendingPipAnimationListener); mPendingPipAnimationListener = null; } if (mPendingSplitScreenListener != null && mSplitScreen != null) { registerSplitScreenListener(mPendingSplitScreenListener); mPendingSplitScreenListener = null; } if (mPendingStartingWindowListener != null && mStartingWindow != null) { setStartingWindowListener(mPendingStartingWindowListener); mPendingStartingWindowListener = null; } } public void clearProxy() { Loading Loading @@ -390,6 +409,8 @@ public class SystemUiProxy implements ISystemUiProxy, } catch (RemoteException e) { Log.w(TAG, "Failed call setPinnedStackAnimationListener", e); } } else { mPendingPipAnimationListener = listener; } } Loading Loading @@ -427,6 +448,8 @@ public class SystemUiProxy implements ISystemUiProxy, } catch (RemoteException e) { Log.w(TAG, "Failed call registerSplitScreenListener"); } } else { mPendingSplitScreenListener = listener; } } Loading @@ -438,6 +461,7 @@ public class SystemUiProxy implements ISystemUiProxy, Log.w(TAG, "Failed call unregisterSplitScreenListener"); } } mPendingSplitScreenListener = null; } public void setSideStageVisibility(boolean visible) { Loading Loading @@ -590,6 +614,8 @@ public class SystemUiProxy implements ISystemUiProxy, } catch (RemoteException e) { Log.w(TAG, "Failed call setStartingWindowListener", e); } } else { mPendingStartingWindowListener = listener; } } }
quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +3 −1 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator { * different from the appBounds if user has swiped a certain distance and * Launcher has performed transform on the leash. * @param destinationBounds Bounds of the destination this animator ends to * @param cornerRadius Corner radius in pixel value for PiP window */ public SwipePipToHomeAnimator(int taskId, @NonNull ComponentName componentName, Loading @@ -97,6 +98,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator { @NonNull Rect appBounds, @NonNull Rect startBounds, @NonNull Rect destinationBounds, int cornerRadius, @NonNull View view) { mTaskId = taskId; mComponentName = componentName; Loading @@ -106,7 +108,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator { mDestinationBounds.set(destinationBounds); mDestinationBoundsTransformed.set(mDestinationBounds); mDestinationBoundsAnimation.set(mDestinationBounds); mSurfaceTransactionHelper = new PipSurfaceTransactionHelper(); mSurfaceTransactionHelper = new PipSurfaceTransactionHelper(cornerRadius); if (sourceRectHint == null) { mSourceHintRectInsets = null; Loading
quickstep/src/com/android/quickstep/views/RecentsView.java +21 −3 Original line number Diff line number Diff line Loading @@ -494,6 +494,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private final PinnedStackAnimationListener mIPipAnimationListener = new PinnedStackAnimationListener(); private int mPipCornerRadius; // Used to keep track of the last requested task list id, so that we do not request to load the // tasks again if we have already requested it and the task list has not changed Loading Loading @@ -795,7 +796,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T mSyncTransactionApplier = new SurfaceTransactionApplier(this); mLiveTileParams.setSyncTransactionApplier(mSyncTransactionApplier); RecentsModel.INSTANCE.get(getContext()).addThumbnailChangeListener(this); mIPipAnimationListener.setActivity(mActivity); mIPipAnimationListener.setActivityAndRecentsView(mActivity, this); SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener( mIPipAnimationListener); mOrientationState.initListeners(); Loading @@ -815,7 +816,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T RecentsModel.INSTANCE.get(getContext()).removeThumbnailChangeListener(this); SystemUiProxy.INSTANCE.get(getContext()).setPinnedStackAnimationListener(null); SplitScreenBounds.INSTANCE.removeOnChangeListener(this); mIPipAnimationListener.setActivity(null); mIPipAnimationListener.setActivityAndRecentsView(null, null); mOrientationState.destroyListeners(); mTaskOverlayFactory.removeListeners(); } Loading Loading @@ -3760,6 +3761,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T mScrollListeners.remove(listener); } /** * @return Corner radius in pixel value for PiP window, which is updated via * {@link #mIPipAnimationListener} */ public int getPipCornerRadius() { return mPipCornerRadius; } @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); Loading @@ -3776,9 +3785,11 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T private static class PinnedStackAnimationListener<T extends BaseActivity> extends IPipAnimationListener.Stub { private T mActivity; private RecentsView mRecentsView; public void setActivity(T activity) { public void setActivityAndRecentsView(T activity, RecentsView recentsView) { mActivity = activity; mRecentsView = recentsView; } @Override Loading @@ -3791,6 +3802,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T } }); } @Override public void onPipCornerRadiusChanged(int cornerRadius) { if (mRecentsView != null) { mRecentsView.mPipCornerRadius = cornerRadius; } } } /** Get the color used for foreground scrimming the RecentsView for sharing. */ Loading