diff options
4 files changed, 7 insertions, 36 deletions
diff --git a/core/java/android/window/SplashScreenView.java b/core/java/android/window/SplashScreenView.java index 000dfb2bfa59..6772afeb0270 100644 --- a/core/java/android/window/SplashScreenView.java +++ b/core/java/android/window/SplashScreenView.java @@ -85,7 +85,6 @@ public final class SplashScreenView extends FrameLayout { | FLAG_TRANSLUCENT_NAVIGATION | FLAG_TRANSLUCENT_STATUS; private boolean mNotCopyable; - private boolean mRevealAnimationSupported = true; private int mInitBackgroundColor; private int mInitIconBackgroundColor; private View mIconView; @@ -353,25 +352,6 @@ public final class SplashScreenView extends FrameLayout { } /** - * If set to true, indicates to the system that this view can be dismissed by playing the - * Reveal animation. - * <p> - * If the exit animation is handled by the client, the animation won't be played anyway. - * @hide - */ - public void setRevealAnimationSupported(boolean support) { - mRevealAnimationSupported = support; - } - - /** - * Whether this view support reveal animation. - * @hide - */ - public boolean isRevealAnimationSupported() { - return mRevealAnimationSupported; - } - - /** * Called when this {@link SplashScreenView} has been copied to be transferred to the client. * * @hide diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java index c303a33afc78..1a365fee3b13 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java @@ -85,7 +85,7 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { } View iconView = view.getIconView(); - if (iconView == null) { + if (iconView == null || iconView.getBackground() == null) { mIconFadeOutDuration = 0; mIconStartAlpha = 0; mAppRevealDelay = 0; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java index bf1f9e431c6a..df3fee043419 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java @@ -407,7 +407,6 @@ public class SplashscreenContentDrawer { } if (mEmptyView) { splashScreenView.setNotCopyable(); - splashScreenView.setRevealAnimationSupported(false); } splashScreenView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { @Override diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java index 8463da6a0ecb..381c3eeaaf32 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/StartingSurfaceDrawer.java @@ -34,7 +34,6 @@ import android.graphics.PixelFormat; import android.graphics.Rect; import android.hardware.display.DisplayManager; import android.os.IBinder; -import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.util.Slog; @@ -107,8 +106,6 @@ public class StartingSurfaceDrawer { final SplashscreenContentDrawer mSplashscreenContentDrawer; private Choreographer mChoreographer; - private static final boolean DEBUG_ENABLE_REVEAL_ANIMATION = - SystemProperties.getBoolean("persist.debug.enable_reveal_animation", true); /** * @param splashScreenExecutor The thread used to control add and remove starting window. */ @@ -445,24 +442,19 @@ public class StartingSurfaceDrawer { if (DEBUG_SPLASH_SCREEN) { Slog.v(TAG, "Removing splash screen window for task: " + taskId); } - if (record.mContentView != null - && record.mContentView.isRevealAnimationSupported()) { + if (record.mContentView != null) { if (playRevealAnimation) { - if (DEBUG_ENABLE_REVEAL_ANIMATION) { - mSplashscreenContentDrawer.applyExitAnimation(record.mContentView, - leash, frame, - () -> removeWindowInner(record.mDecorView, true)); - } else { - // using the default exit animation from framework - removeWindowInner(record.mDecorView, false); - } + mSplashscreenContentDrawer.applyExitAnimation(record.mContentView, + leash, frame, + () -> removeWindowInner(record.mDecorView, true)); } else { // the SplashScreenView has been copied to client, hide the view to skip // default exit animation removeWindowInner(record.mDecorView, true); } } else { - // this is a blank splash screen, don't apply reveal animation + // shouldn't happen + Slog.e(TAG, "Found empty splash screen, remove!"); removeWindowInner(record.mDecorView, false); } } |