Handle shadow radius for auto-pip in Launcher

Bug: 206508708
Test: Verify the auto-enter-pip transition
Change-Id: I1e99c3e1ce890885d95006293a1469491c5c6672
This commit is contained in:
Hongwei Wang
2022-03-28 15:51:22 -07:00
parent ca9f9ebec5
commit b46d6ebc01
3 changed files with 22 additions and 3 deletions
@@ -539,6 +539,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private final PinnedStackAnimationListener mIPipAnimationListener =
new PinnedStackAnimationListener();
private int mPipCornerRadius;
private int mPipShadowRadius;
// 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
@@ -5004,6 +5005,14 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
return mPipCornerRadius;
}
/**
* @return Shadow radius in pixel value for PiP window, which is updated via
* {@link #mIPipAnimationListener}
*/
public int getPipShadowRadius() {
return mPipShadowRadius;
}
@Override
public boolean scrollLeft() {
if (!showAsGrid()) {
@@ -5099,9 +5108,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
}
@Override
public void onPipCornerRadiusChanged(int cornerRadius) {
public void onPipResourceDimensionsChanged(int cornerRadius, int shadowRadius) {
if (mRecentsView != null) {
mRecentsView.mPipCornerRadius = cornerRadius;
mRecentsView.mPipShadowRadius = shadowRadius;
}
}