Place launcher above the target app in live tile mode
Fixes: 160361464 Test: manual Change-Id: Id9d012fb71c6817ce82aa048d3dd56ea4d456f01
This commit is contained in:
1 parent
fdfe61071b
commit
611fe76180
2 files changed
+27
No files matched your search
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.states.RotationHelper.deltaRotation;
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.MATRIX_POST_TRANSLATE;
|
||||
import static com.android.quickstep.util.RecentsOrientedState.postDisplayRotation;
|
||||
@@ -304,6 +305,10 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
builder.withMatrix(mMatrix)
|
||||
.withWindowCrop(mTmpCropRect)
|
||||
.withCornerRadius(getCurrentCornerRadius());
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && params.getRecentsSurface() != null) {
|
||||
builder.withRelativeLayerTo(params.getRecentsSurface(), Integer.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import android.util.FloatProperty;
|
||||
import android.view.SurfaceControl;
|
||||
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
@@ -58,6 +59,7 @@ public class TransformParams {
|
||||
private float mCornerRadius;
|
||||
private RemoteAnimationTargets mTargetSet;
|
||||
private SurfaceTransactionApplier mSyncTransactionApplier;
|
||||
private SurfaceControl mRecentsSurface;
|
||||
|
||||
private BuilderProxy mHomeBuilderProxy = BuilderProxy.ALWAYS_VISIBLE;
|
||||
private BuilderProxy mBaseBuilderProxy = BuilderProxy.ALWAYS_VISIBLE;
|
||||
@@ -138,6 +140,8 @@ public class TransformParams {
|
||||
public SurfaceParams[] createSurfaceParams(BuilderProxy proxy) {
|
||||
RemoteAnimationTargets targets = mTargetSet;
|
||||
SurfaceParams[] surfaceParams = new SurfaceParams[targets.unfilteredApps.length];
|
||||
mRecentsSurface = getRecentsSurface(targets);
|
||||
|
||||
for (int i = 0; i < targets.unfilteredApps.length; i++) {
|
||||
RemoteAnimationTargetCompat app = targets.unfilteredApps[i];
|
||||
SurfaceParams.Builder builder = new SurfaceParams.Builder(app.leash);
|
||||
@@ -165,6 +169,20 @@ public class TransformParams {
|
||||
return surfaceParams;
|
||||
}
|
||||
|
||||
private static SurfaceControl getRecentsSurface(RemoteAnimationTargets targets) {
|
||||
for (int i = 0; i < targets.unfilteredApps.length; i++) {
|
||||
RemoteAnimationTargetCompat app = targets.unfilteredApps[i];
|
||||
if (app.mode == targets.targetMode) {
|
||||
if (app.activityType == RemoteAnimationTargetCompat.ACTIVITY_TYPE_RECENTS) {
|
||||
return app.leash.getSurfaceControl();
|
||||
}
|
||||
} else {
|
||||
return app.leash.getSurfaceControl();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Pubic getters so outside packages can read the values.
|
||||
|
||||
public float getProgress() {
|
||||
@@ -179,6 +197,10 @@ public class TransformParams {
|
||||
return mCornerRadius;
|
||||
}
|
||||
|
||||
public SurfaceControl getRecentsSurface() {
|
||||
return mRecentsSurface;
|
||||
}
|
||||
|
||||
public RemoteAnimationTargets getTargetSet() {
|
||||
return mTargetSet;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user