Loading core/java/android/app/EnterTransitionCoordinator.java +13 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.app.SharedElementCallback.OnSharedElementsReadyListener; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.ResultReceiver; Loading Loading @@ -61,6 +63,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator { private Transition mEnterViewsTransition; private OneShotPreDrawListener mViewsReadyListener; private final boolean mIsCrossTask; private Drawable mReplacedBackground; public EnterTransitionCoordinator(Activity activity, ResultReceiver resultReceiver, ArrayList<String> sharedElementNames, boolean isReturning, boolean isCrossTask) { Loading Loading @@ -332,12 +335,15 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator { if (!mIsReturning) { mWasOpaque = mActivity.convertToTranslucent(null, null); Drawable background = decorView.getBackground(); if (background != null) { if (background == null) { background = new ColorDrawable(Color.TRANSPARENT); mReplacedBackground = background; } else { getWindow().setBackgroundDrawable(null); background = background.mutate(); background.setAlpha(0); getWindow().setBackgroundDrawable(background); } getWindow().setBackgroundDrawable(background); } else { mActivity = null; // all done with it now. } Loading Loading @@ -553,6 +559,11 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator { final ViewGroup decorView = getDecor(); if (decorView != null) { decorView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED); Window window = getWindow(); if (window != null && mReplacedBackground == decorView.getBackground()) { window.setBackgroundDrawable(null); } } } Loading core/java/android/app/ExitTransitionCoordinator.java +1 −1 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator { delayCancel(); moveSharedElementsToOverlay(); if (decorView != null && decorView.getBackground() == null) { getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK)); getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); } final boolean targetsM = decorView == null || decorView.getContext() .getApplicationInfo().targetSdkVersion >= VERSION_CODES.M; Loading Loading
core/java/android/app/EnterTransitionCoordinator.java +13 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.app.SharedElementCallback.OnSharedElementsReadyListener; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.ResultReceiver; Loading Loading @@ -61,6 +63,7 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator { private Transition mEnterViewsTransition; private OneShotPreDrawListener mViewsReadyListener; private final boolean mIsCrossTask; private Drawable mReplacedBackground; public EnterTransitionCoordinator(Activity activity, ResultReceiver resultReceiver, ArrayList<String> sharedElementNames, boolean isReturning, boolean isCrossTask) { Loading Loading @@ -332,12 +335,15 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator { if (!mIsReturning) { mWasOpaque = mActivity.convertToTranslucent(null, null); Drawable background = decorView.getBackground(); if (background != null) { if (background == null) { background = new ColorDrawable(Color.TRANSPARENT); mReplacedBackground = background; } else { getWindow().setBackgroundDrawable(null); background = background.mutate(); background.setAlpha(0); getWindow().setBackgroundDrawable(background); } getWindow().setBackgroundDrawable(background); } else { mActivity = null; // all done with it now. } Loading Loading @@ -553,6 +559,11 @@ class EnterTransitionCoordinator extends ActivityTransitionCoordinator { final ViewGroup decorView = getDecor(); if (decorView != null) { decorView.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED); Window window = getWindow(); if (window != null && mReplacedBackground == decorView.getBackground()) { window.setBackgroundDrawable(null); } } } Loading
core/java/android/app/ExitTransitionCoordinator.java +1 −1 Original line number Diff line number Diff line Loading @@ -236,7 +236,7 @@ class ExitTransitionCoordinator extends ActivityTransitionCoordinator { delayCancel(); moveSharedElementsToOverlay(); if (decorView != null && decorView.getBackground() == null) { getWindow().setBackgroundDrawable(new ColorDrawable(Color.BLACK)); getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); } final boolean targetsM = decorView == null || decorView.getContext() .getApplicationInfo().targetSdkVersion >= VERSION_CODES.M; Loading