Loading core/res/res/layout/splash_screen_view.xml +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ android:layout_marginBottom="60dp" android:padding="0dp" android:background="@null" android:forceHasOverlappingRendering="false" android:contentDescription="@string/splash_screen_view_branding_description"/> </android.window.SplashScreenView> No newline at end of file libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java +21 −4 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { private final int mAppRevealDuration; private final int mAnimationDuration; private final float mIconStartAlpha; private final float mBrandingStartAlpha; private final TransactionPool mTransactionPool; private ValueAnimator mMainAnimator; Loading @@ -94,9 +95,17 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { || iconView.getLayoutParams().height == 0) { mIconFadeOutDuration = 0; mIconStartAlpha = 0; mBrandingStartAlpha = 0; mAppRevealDelay = 0; } else { iconView.setLayerType(View.LAYER_TYPE_HARDWARE, null); // The branding view could only exists when the icon is present. final View brandingView = view.getBrandingView(); if (brandingView != null) { mBrandingStartAlpha = brandingView.getAlpha(); } else { mBrandingStartAlpha = 0; } mIconFadeOutDuration = context.getResources().getInteger( R.integer.starting_window_app_reveal_icon_fade_out_duration); mAppRevealDelay = context.getResources().getInteger( Loading Loading @@ -334,13 +343,21 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { // ignore } private void onAnimationProgress(float linearProgress) { View iconView = mSplashScreenView.getIconView(); if (iconView != null) { private void onFadeOutProgress(float linearProgress) { final float iconProgress = ICON_INTERPOLATOR.getInterpolation( getProgress(linearProgress, 0 /* delay */, mIconFadeOutDuration)); final View iconView = mSplashScreenView.getIconView(); final View brandingView = mSplashScreenView.getBrandingView(); if (iconView != null) { iconView.setAlpha(mIconStartAlpha * (1 - iconProgress)); } if (brandingView != null) { brandingView.setAlpha(mBrandingStartAlpha * (1 - iconProgress)); } } private void onAnimationProgress(float linearProgress) { onFadeOutProgress(linearProgress); final float revealLinearProgress = getProgress(linearProgress, mAppRevealDelay, mAppRevealDuration); Loading Loading
core/res/res/layout/splash_screen_view.xml +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ android:layout_marginBottom="60dp" android:padding="0dp" android:background="@null" android:forceHasOverlappingRendering="false" android:contentDescription="@string/splash_screen_view_branding_description"/> </android.window.SplashScreenView> No newline at end of file
libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashScreenExitAnimation.java +21 −4 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { private final int mAppRevealDuration; private final int mAnimationDuration; private final float mIconStartAlpha; private final float mBrandingStartAlpha; private final TransactionPool mTransactionPool; private ValueAnimator mMainAnimator; Loading @@ -94,9 +95,17 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { || iconView.getLayoutParams().height == 0) { mIconFadeOutDuration = 0; mIconStartAlpha = 0; mBrandingStartAlpha = 0; mAppRevealDelay = 0; } else { iconView.setLayerType(View.LAYER_TYPE_HARDWARE, null); // The branding view could only exists when the icon is present. final View brandingView = view.getBrandingView(); if (brandingView != null) { mBrandingStartAlpha = brandingView.getAlpha(); } else { mBrandingStartAlpha = 0; } mIconFadeOutDuration = context.getResources().getInteger( R.integer.starting_window_app_reveal_icon_fade_out_duration); mAppRevealDelay = context.getResources().getInteger( Loading Loading @@ -334,13 +343,21 @@ public class SplashScreenExitAnimation implements Animator.AnimatorListener { // ignore } private void onAnimationProgress(float linearProgress) { View iconView = mSplashScreenView.getIconView(); if (iconView != null) { private void onFadeOutProgress(float linearProgress) { final float iconProgress = ICON_INTERPOLATOR.getInterpolation( getProgress(linearProgress, 0 /* delay */, mIconFadeOutDuration)); final View iconView = mSplashScreenView.getIconView(); final View brandingView = mSplashScreenView.getBrandingView(); if (iconView != null) { iconView.setAlpha(mIconStartAlpha * (1 - iconProgress)); } if (brandingView != null) { brandingView.setAlpha(mBrandingStartAlpha * (1 - iconProgress)); } } private void onAnimationProgress(float linearProgress) { onFadeOutProgress(linearProgress); final float revealLinearProgress = getProgress(linearProgress, mAppRevealDelay, mAppRevealDuration); Loading