Fix AlwaysOnTop stack may covered by RemoteAnimation
Now with hierarachical animation, the layer of
RecentsAnimation / RemoteAnimation are controlled by system.
Now Launcher side don't need to have other way to set layer for ZBoost
case, so remove setLayer & withLayer related logics for cleaning up.
Fix: 151024899
Test: manual, launch google map app -> enter PiP mode,
swipe up to overview screen or launch activity from shortcut,
make sure the PiP window is not covered by other apps.
Change-Id: I8028cd50d66f7d77e5d1ec6514e953c8be9935d6
This commit is contained in:
-3
@@ -214,7 +214,6 @@ public class AppWindowAnimationHelper {
|
||||
float alpha;
|
||||
float cornerRadius = 0f;
|
||||
float scale = Math.max(mCurrentRect.width(), mTargetRect.width()) / crop.width();
|
||||
int layer = RemoteAnimationProvider.getLayer(app, mBoostModeTargetLayers);
|
||||
if (app.mode == params.mTargetSet.targetMode) {
|
||||
alpha = mTaskAlphaCallback.getAlpha(app, params.mTargetAlpha);
|
||||
if (app.activityType != RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) {
|
||||
@@ -251,13 +250,11 @@ public class AppWindowAnimationHelper {
|
||||
alpha = mBaseAlphaCallback.getAlpha(app, progress);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && params.mLauncherOnTop) {
|
||||
crop = null;
|
||||
layer = Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
builder.withAlpha(alpha)
|
||||
.withMatrix(mTmpMatrix)
|
||||
.withWindowCrop(crop)
|
||||
.withLayer(layer)
|
||||
// Since radius is in Surface space, but we draw the rounded corners in screen
|
||||
// space, we have to undo the scale
|
||||
.withCornerRadius(cornerRadius / scale);
|
||||
|
||||
@@ -602,7 +602,6 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
.withWindowCrop(target.screenSpaceBounds)
|
||||
.withAlpha(1f);
|
||||
}
|
||||
builder.withLayer(RemoteAnimationProvider.getLayer(target, MODE_OPENING));
|
||||
params[i] = builder.build();
|
||||
}
|
||||
surfaceApplier.scheduleApply(params);
|
||||
@@ -709,7 +708,6 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
params[i] = new SurfaceParams.Builder(target.leash)
|
||||
.withAlpha(1f)
|
||||
.withWindowCrop(target.screenSpaceBounds)
|
||||
.withLayer(RemoteAnimationProvider.getLayer(target, MODE_OPENING))
|
||||
.withCornerRadius(cornerRadius)
|
||||
.build();
|
||||
}
|
||||
@@ -766,7 +764,6 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
|
||||
}
|
||||
params[i] = builder
|
||||
.withWindowCrop(target.screenSpaceBounds)
|
||||
.withLayer(RemoteAnimationProvider.getLayer(target, MODE_CLOSING))
|
||||
.build();
|
||||
}
|
||||
surfaceApplier.scheduleApply(params);
|
||||
|
||||
@@ -62,15 +62,12 @@ public abstract class RemoteAnimationProvider {
|
||||
static void prepareTargetsForFirstFrame(RemoteAnimationTargetCompat[] targets,
|
||||
TransactionCompat t, int boostModeTargets) {
|
||||
for (RemoteAnimationTargetCompat target : targets) {
|
||||
t.setLayer(target.leash, getLayer(target, boostModeTargets));
|
||||
t.show(target.leash);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getLayer(RemoteAnimationTargetCompat target, int boostModeTarget) {
|
||||
return target.mode == boostModeTarget
|
||||
? Z_BOOST_BASE + target.prefixOrderIndex
|
||||
: target.prefixOrderIndex;
|
||||
return target.prefixOrderIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user