diff options
| author | wilsonshih <wilsonshih@google.com> | 2020-11-16 13:21:46 +0800 |
|---|---|---|
| committer | Wei Sheng Shih <wilsonshih@google.com> | 2021-03-12 03:46:15 +0000 |
| commit | d52e491d2f13acae00a8397ccebf156634da4466 (patch) | |
| tree | ddb303914fa510a21a36ac765a17578a631d13a7 /core/java/android/window/SplashScreenView.java | |
| parent | 2f3e141580ac403efc0d2327d154bc5848bda557 (diff) | |
Implement default exit animation for splash screen.(9/N)
Implement default exit animation on the view of splash screen, there
will be a two layers switch happen when playing exit animation. For
the detail please reference
go/improved_app_launch_animations and go/app-startup
Note: For this version we skip shift-up animation, need to fix the
flicker test so we can enable it.
Note2: Fix the possible missing splash screen view issue, but could
make the first window draw slower, keep tracking.
Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests ShellTaskOrganizerTests
WindowOrganizerTests SplashscreenTests
Change-Id: I796811d010ac70f256169dd03d5e05ef0ed79d28
Diffstat (limited to 'core/java/android/window/SplashScreenView.java')
| -rw-r--r-- | core/java/android/window/SplashScreenView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/window/SplashScreenView.java b/core/java/android/window/SplashScreenView.java index 35ccfca101d3..da445b8b9f33 100644 --- a/core/java/android/window/SplashScreenView.java +++ b/core/java/android/window/SplashScreenView.java @@ -46,6 +46,8 @@ import android.widget.FrameLayout; import com.android.internal.R; import com.android.internal.policy.DecorView; +import java.util.function.Consumer; + /** * <p>The view which allows an activity to customize its splash screen exit animation.</p> * @@ -77,7 +79,8 @@ public final class SplashScreenView extends FrameLayout { private Animatable mAnimatableIcon; private ValueAnimator mAnimator; - + private Runnable mAnimationFinishListener; + private Consumer<Canvas> mOnDrawCallback; // cache original window and status private Window mWindow; private boolean mDrawBarBackground; @@ -85,7 +88,7 @@ public final class SplashScreenView extends FrameLayout { private int mNavigationBarColor; /** - * Internal builder to create a SplashScreenWindowView object. + * Internal builder to create a SplashScreenView object. * @hide */ public static class Builder { @@ -391,7 +394,7 @@ public final class SplashScreenView extends FrameLayout { * Get the initial background color of this view. * @hide */ - @ColorInt int getInitBackgroundColor() { + public @ColorInt int getInitBackgroundColor() { return mInitBackgroundColor; } |
