Fix icon flash on app launch
Flag: com.android.launcher3.enable_additional_home_animations Fixes: 343051344 Test: temp logs, launched apps from home, quickly swiped home while quick switching Change-Id: I91071d53f753eb7bc99305c46241de203bcfdc98
This commit is contained in:
1 parent
5a4b813d38
commit
9fb1f80435
4 files changed
+28
-8
No files matched your search
@@ -18,6 +18,7 @@ package com.android.launcher3.views;
|
||||
import static android.view.Gravity.LEFT;
|
||||
|
||||
import static com.android.app.animation.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.Flags.enableAdditionalHomeAnimations;
|
||||
import static com.android.launcher3.Utilities.getFullDrawable;
|
||||
import static com.android.launcher3.Utilities.mapToRange;
|
||||
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
|
||||
@@ -164,7 +165,12 @@ public class FloatingIconView extends FrameLayout implements
|
||||
*/
|
||||
public void update(float alpha, RectF rect, float progress, float shapeProgressStart,
|
||||
float cornerRadius, boolean isOpening, int taskViewDrawAlpha) {
|
||||
setAlpha(isLaidOut() ? alpha : 0f);
|
||||
// The non-running task home animation has some very funky first few frames because this
|
||||
// FIV hasn't fully laid out. During those frames, hide this FIV and continue drawing the
|
||||
// TaskView directly while transforming it in the place of this FIV. However, if we fade
|
||||
// the TaskView at all, we need to display this FIV regardless.
|
||||
setAlpha(!enableAdditionalHomeAnimations() || isLaidOut() || taskViewDrawAlpha < 255
|
||||
? alpha : 0f);
|
||||
mClipIconView.update(rect, progress, shapeProgressStart, cornerRadius, isOpening, this,
|
||||
mLauncher.getDeviceProfile(), taskViewDrawAlpha);
|
||||
|
||||
|
||||
Reference in new issue
Block a user