Fix AlwaysOnTop stack may covered by RemoteAnimation

Merging changes from Change-Id: I8028cd50d66f7d77e5d1ec6514e953c8be9935d6
in TaskViewSimulator

Bug: 151024899
Change-Id: Id41e5af227be2557032387bdaa61cac3458baf32
This commit is contained in:
Sunny Goyal committed 2020-05-06 02:41:15 -07:00
1 parent 0dbbd8951d
commit d67569eac8
4 files changed
+7 -36

No files matched your search

@@ -25,12 +25,10 @@ import com.android.launcher3.WrappedLauncherAnimationRunner;
import com.android.systemui.shared.system.ActivityOptionsCompat;
import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.TransactionCompat;
public abstract class RemoteAnimationProvider {
LauncherAnimationRunner mAnimationRunner;
static final int Z_BOOST_BASE = 800570000;
public abstract AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets,
RemoteAnimationTargetCompat[] wallpaperTargets);
@@ -52,24 +50,6 @@ public abstract class RemoteAnimationProvider {
new RemoteAnimationAdapterCompat(wrapper, duration, 0));
}
/**
* Prepares the given {@param targets} for a remote animation, and should be called with the
* transaction from the first frame of animation.
*
* @param boostModeTargets The mode indicating which targets to boost in z-order above other
* targets.
*/
static void prepareTargetsForFirstFrame(RemoteAnimationTargetCompat[] targets,
TransactionCompat t, int boostModeTargets) {
for (RemoteAnimationTargetCompat target : targets) {
t.show(target.leash);
}
}
public static int getLayer(RemoteAnimationTargetCompat target, int boostModeTarget) {
return target.prefixOrderIndex;
}
/**
* @return the target with the lowest opaque layer for a certain app animation, or null.
*/
@@ -80,7 +60,7 @@ public abstract class RemoteAnimationProvider {
for (int i = appTargets.length - 1; i >= 0; i--) {
RemoteAnimationTargetCompat target = appTargets[i];
if (target.mode == mode && !target.isTranslucent) {
int layer = getLayer(target, mode);
int layer = target.prefixOrderIndex;
if (layer < lowestLayer) {
lowestLayer = layer;
lowestLayerIndex = i;
@@ -15,7 +15,6 @@
*/
package com.android.quickstep.util;
import static com.android.quickstep.util.RemoteAnimationProvider.prepareTargetsForFirstFrame;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
import android.animation.ValueAnimator;
@@ -42,7 +41,9 @@ public class RemoteFadeOutAnimationListener implements AnimatorUpdateListener {
public void onAnimationUpdate(ValueAnimator valueAnimator) {
TransactionCompat t = new TransactionCompat();
if (mFirstFrame) {
prepareTargetsForFirstFrame(mTarget.unfilteredApps, t, MODE_CLOSING);
for (RemoteAnimationTargetCompat target : mTarget.unfilteredApps) {
t.show(target.leash);
}
mFirstFrame = false;
}