Merge "VisD update for the PipAppIconOverlay 2/N" into tm-qpr-dev am: 452e014caa am: e83a3e29d4 am: 48844c89cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22107736 Change-Id: Ic92390f84d29fedf12b8f0d3324bff0f47a1781d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1221,11 +1221,18 @@ public class QuickstepLauncher extends Launcher {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDeviceProfileInitiated() {
|
||||||
|
super.onDeviceProfileInitiated();
|
||||||
|
SystemUiProxy.INSTANCE.get(this).setLauncherAppIconSize(mDeviceProfile.iconSizePx);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispatchDeviceProfileChanged() {
|
public void dispatchDeviceProfileChanged() {
|
||||||
super.dispatchDeviceProfileChanged();
|
super.dispatchDeviceProfileChanged();
|
||||||
Trace.instantForTrack(TRACE_TAG_APP, "QuickstepLauncher#DeviceProfileChanged",
|
Trace.instantForTrack(TRACE_TAG_APP, "QuickstepLauncher#DeviceProfileChanged",
|
||||||
getDeviceProfile().toSmallString());
|
getDeviceProfile().toSmallString());
|
||||||
|
SystemUiProxy.INSTANCE.get(this).setLauncherAppIconSize(mDeviceProfile.iconSizePx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1599,6 +1599,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
.setContext(mContext)
|
.setContext(mContext)
|
||||||
.setTaskId(runningTaskTarget.taskId)
|
.setTaskId(runningTaskTarget.taskId)
|
||||||
.setActivityInfo(taskInfo.topActivityInfo)
|
.setActivityInfo(taskInfo.topActivityInfo)
|
||||||
|
.setAppIconSizePx(mDp.iconSizePx)
|
||||||
.setLeash(runningTaskTarget.leash)
|
.setLeash(runningTaskTarget.leash)
|
||||||
.setSourceRectHint(
|
.setSourceRectHint(
|
||||||
runningTaskTarget.taskInfo.pictureInPictureParams.getSourceRectHint())
|
runningTaskTarget.taskInfo.pictureInPictureParams.getSourceRectHint())
|
||||||
|
|||||||
@@ -550,6 +550,19 @@ public class SystemUiProxy implements ISystemUiProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the app icon size in pixel used by Launcher all apps.
|
||||||
|
*/
|
||||||
|
public void setLauncherAppIconSize(int iconSizePx) {
|
||||||
|
if (mPip != null) {
|
||||||
|
try {
|
||||||
|
mPip.setLauncherAppIconSize(iconSizePx);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.w(TAG, "Failed call setLauncherAppIconSize", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Splitscreen
|
// Splitscreen
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
|||||||
* @param taskId Task id associated with this animator, see also {@link #getTaskId()}
|
* @param taskId Task id associated with this animator, see also {@link #getTaskId()}
|
||||||
* @param activityInfo {@link ActivityInfo} associated with this animator,
|
* @param activityInfo {@link ActivityInfo} associated with this animator,
|
||||||
* see also {@link #getComponentName()}
|
* see also {@link #getComponentName()}
|
||||||
|
* @param appIconSizePx The size in pixel for the app icon in content overlay
|
||||||
* @param leash {@link SurfaceControl} this animator operates on
|
* @param leash {@link SurfaceControl} this animator operates on
|
||||||
* @param sourceRectHint See the definition in {@link android.app.PictureInPictureParams}
|
* @param sourceRectHint See the definition in {@link android.app.PictureInPictureParams}
|
||||||
* @param appBounds Bounds of the application, sourceRectHint is based on this bounds
|
* @param appBounds Bounds of the application, sourceRectHint is based on this bounds
|
||||||
@@ -111,6 +112,7 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
|||||||
private SwipePipToHomeAnimator(@NonNull Context context,
|
private SwipePipToHomeAnimator(@NonNull Context context,
|
||||||
int taskId,
|
int taskId,
|
||||||
@NonNull ActivityInfo activityInfo,
|
@NonNull ActivityInfo activityInfo,
|
||||||
|
int appIconSizePx,
|
||||||
@NonNull SurfaceControl leash,
|
@NonNull SurfaceControl leash,
|
||||||
@Nullable Rect sourceRectHint,
|
@Nullable Rect sourceRectHint,
|
||||||
@NonNull Rect appBounds,
|
@NonNull Rect appBounds,
|
||||||
@@ -153,7 +155,8 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
|||||||
if (SystemProperties.getBoolean(
|
if (SystemProperties.getBoolean(
|
||||||
"persist.wm.debug.enable_pip_app_icon_overlay", true)) {
|
"persist.wm.debug.enable_pip_app_icon_overlay", true)) {
|
||||||
mPipContentOverlay = new PipContentOverlay.PipAppIconOverlay(view.getContext(),
|
mPipContentOverlay = new PipContentOverlay.PipAppIconOverlay(view.getContext(),
|
||||||
mAppBounds, () -> new IconProvider(context).getIcon(mActivityInfo));
|
mAppBounds, new IconProvider(context).getIcon(mActivityInfo),
|
||||||
|
appIconSizePx);
|
||||||
} else {
|
} else {
|
||||||
mPipContentOverlay = new PipContentOverlay.PipColorOverlay(view.getContext());
|
mPipContentOverlay = new PipContentOverlay.PipColorOverlay(view.getContext());
|
||||||
}
|
}
|
||||||
@@ -317,6 +320,7 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
|||||||
private Context mContext;
|
private Context mContext;
|
||||||
private int mTaskId;
|
private int mTaskId;
|
||||||
private ActivityInfo mActivityInfo;
|
private ActivityInfo mActivityInfo;
|
||||||
|
private int mAppIconSizePx;
|
||||||
private SurfaceControl mLeash;
|
private SurfaceControl mLeash;
|
||||||
private Rect mSourceRectHint;
|
private Rect mSourceRectHint;
|
||||||
private Rect mDisplayCutoutInsets;
|
private Rect mDisplayCutoutInsets;
|
||||||
@@ -345,6 +349,11 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder setAppIconSizePx(int appIconSizePx) {
|
||||||
|
mAppIconSizePx = appIconSizePx;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder setLeash(SurfaceControl leash) {
|
public Builder setLeash(SurfaceControl leash) {
|
||||||
mLeash = leash;
|
mLeash = leash;
|
||||||
return this;
|
return this;
|
||||||
@@ -425,8 +434,8 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim {
|
|||||||
mAppBounds.inset(mDisplayCutoutInsets);
|
mAppBounds.inset(mDisplayCutoutInsets);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new SwipePipToHomeAnimator(mContext, mTaskId, mActivityInfo, mLeash,
|
return new SwipePipToHomeAnimator(mContext, mTaskId, mActivityInfo, mAppIconSizePx,
|
||||||
mSourceRectHint, mAppBounds,
|
mLeash, mSourceRectHint, mAppBounds,
|
||||||
mHomeToWindowPositionMap, mStartBounds, mDestinationBounds,
|
mHomeToWindowPositionMap, mStartBounds, mDestinationBounds,
|
||||||
mFromRotation, mDestinationBoundsTransformed,
|
mFromRotation, mDestinationBoundsTransformed,
|
||||||
mCornerRadius, mShadowRadius, mAttachedView);
|
mCornerRadius, mShadowRadius, mAttachedView);
|
||||||
|
|||||||
Reference in New Issue
Block a user