Loading api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -50337,7 +50337,7 @@ package android.view.animation { method public long computeDurationHint(); method protected void ensureInterpolator(); method public int getBackgroundColor(); method public boolean getDetachWallpaper(); method public deprecated boolean getDetachWallpaper(); method public long getDuration(); method public boolean getFillAfter(); method public boolean getFillBefore(); Loading @@ -50361,7 +50361,7 @@ package android.view.animation { method public void scaleCurrentDuration(float); method public void setAnimationListener(android.view.animation.Animation.AnimationListener); method public void setBackgroundColor(int); method public void setDetachWallpaper(boolean); method public deprecated void setDetachWallpaper(boolean); method public void setDuration(long); method public void setFillAfter(boolean); method public void setFillBefore(boolean); core/java/android/view/animation/Animation.java +5 −7 Original line number Diff line number Diff line Loading @@ -203,11 +203,6 @@ public abstract class Animation implements Cloneable { */ private float mScaleFactor = 1f; /** * Don't animate the wallpaper. */ private boolean mDetachWallpaper = false; private boolean mShowWallpaper; private boolean mMore = true; Loading Loading @@ -667,9 +662,10 @@ public abstract class Animation implements Cloneable { * * @param detachWallpaper true if the wallpaper should be detached from the animation * @attr ref android.R.styleable#Animation_detachWallpaper * * @deprecated All window animations are running with detached wallpaper. */ public void setDetachWallpaper(boolean detachWallpaper) { mDetachWallpaper = detachWallpaper; } /** Loading Loading @@ -793,9 +789,11 @@ public abstract class Animation implements Cloneable { /** * Return value of {@link #setDetachWallpaper(boolean)}. * @attr ref android.R.styleable#Animation_detachWallpaper * * @deprecated All window animations are running with detached wallpaper. */ public boolean getDetachWallpaper() { return mDetachWallpaper; return false; } /** Loading services/core/java/com/android/server/wm/AnimationAdapter.java +0 −6 Original line number Diff line number Diff line Loading @@ -34,12 +34,6 @@ interface AnimationAdapter { long STATUS_BAR_TRANSITION_DURATION = 120L; /** * @return Whether we should detach the wallpaper during the animation. * @see Animation#setDetachWallpaper */ boolean getDetachWallpaper(); /** * @return Whether we should show the wallpaper during the animation. * @see Animation#getShowWallpaper() Loading services/core/java/com/android/server/wm/AppWindowToken.java +1 −13 Original line number Diff line number Diff line Loading @@ -1632,17 +1632,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return null; } int getLowestAnimLayer() { for (int i = 0; i < mChildren.size(); i++) { final WindowState w = mChildren.get(i); if (w.mRemoved) { continue; } return w.mWinAnimator.mAnimLayer; } return Integer.MAX_VALUE; } WindowState getHighestAnimLayerWindow(WindowState currentTarget) { WindowState candidate = null; for (int i = mChildren.indexOf(currentTarget); i >= 0; i--) { Loading @@ -1650,8 +1639,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (w.mRemoved) { continue; } if (candidate == null || w.mWinAnimator.mAnimLayer > candidate.mWinAnimator.mAnimLayer) { if (candidate == null) { candidate = w; } } Loading services/core/java/com/android/server/wm/DisplayContent.java +12 −70 Original line number Diff line number Diff line Loading @@ -439,16 +439,11 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo return; } final int flags = w.mAttrs.flags; // If this window is animating, make a note that we have an animating window and take // care of a request to run a detached wallpaper animation. if (winAnimator.isAnimationSet()) { final AnimationAdapter anim = w.getAnimation(); // If this window is animating, ensure the animation background is set. final AnimationAdapter anim = w.mAppToken != null ? w.mAppToken.getAnimation() : w.getAnimation(); if (anim != null) { if ((flags & FLAG_SHOW_WALLPAPER) != 0 && anim.getDetachWallpaper()) { mTmpWindow = w; } final int color = anim.getBackgroundColor(); if (color != 0) { final TaskStack stack = w.getStack(); Loading @@ -457,25 +452,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo } } } } // If this window's app token is running a detached wallpaper animation, make a note so // we can ensure the wallpaper is displayed behind it. final AppWindowToken atoken = winAnimator.mWin.mAppToken; final AnimationAdapter animation = atoken != null ? atoken.getAnimation() : null; if (animation != null) { if ((flags & FLAG_SHOW_WALLPAPER) != 0 && animation.getDetachWallpaper()) { mTmpWindow = w; } final int color = animation.getBackgroundColor(); if (color != 0) { final TaskStack stack = w.getStack(); if (stack != null) { stack.setAnimationBackground(winAnimator, color); } } } }; private final Consumer<WindowState> mScheduleToastTimeout = w -> { Loading Loading @@ -2307,21 +2283,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo mPinnedStackControllerLocked.setAdjustedForIme(imeVisible, imeHeight); } /** * If a window that has an animation specifying a colored background and the current wallpaper * is visible, then the color goes *below* the wallpaper so we don't cause the wallpaper to * suddenly disappear. */ int getLayerForAnimationBackground(WindowStateAnimator winAnimator) { final WindowState visibleWallpaper = mBelowAppWindowsContainers.getWindow( w -> w.mIsWallpaper && w.isVisibleNow()); if (visibleWallpaper != null) { return visibleWallpaper.mWinAnimator.mAnimLayer; } return winAnimator.mAnimLayer; } void prepareFreezingTaskBounds() { for (int stackNdx = mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; --stackNdx) { final TaskStack stack = mTaskStackContainers.getChildAt(stackNdx); Loading Loading @@ -2746,22 +2707,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo if (highestTarget != null) { final AppTransition appTransition = mService.mAppTransition; if (DEBUG_INPUT_METHOD) Slog.v(TAG_WM, appTransition + " " + highestTarget + " animating=" + highestTarget.mWinAnimator.isAnimationSet() + " layer=" + highestTarget.mWinAnimator.mAnimLayer + " new layer=" + target.mWinAnimator.mAnimLayer); + " animating=" + highestTarget.isAnimating()); if (appTransition.isTransitionSet()) { // If we are currently setting up for an animation, hold everything until we // can find out what will happen. setInputMethodTarget(highestTarget, true); return highestTarget; } else if (highestTarget.mWinAnimator.isAnimationSet() && highestTarget.mWinAnimator.mAnimLayer > target.mWinAnimator.mAnimLayer) { // If the window we are currently targeting is involved with an animation, // and it is on top of the next target we will be over, then hold off on // moving until that is done. setInputMethodTarget(highestTarget, true); return highestTarget; } } } Loading Loading @@ -2934,26 +2886,16 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo return false; } void updateWindowsForAnimator(WindowAnimator animator) { mTmpWindowAnimator = animator; void updateWindowsForAnimator() { forAllWindows(mUpdateWindowsForAnimator, true /* traverseTopToBottom */); } void updateWallpaperForAnimator(WindowAnimator animator) { /** * Updates the {@link TaskStack#setAnimationBackground} for all windows. */ void updateBackgroundForAnimator() { resetAnimationBackgroundAnimator(); // Used to indicate a detached wallpaper. mTmpWindow = null; mTmpWindowAnimator = animator; forAllWindows(mUpdateWallpaperForAnimator, true /* traverseTopToBottom */); if (animator.mWindowDetachedWallpaper != mTmpWindow) { if (DEBUG_WALLPAPER) Slog.v(TAG, "Detached wallpaper changed from " + animator.mWindowDetachedWallpaper + " to " + mTmpWindow); animator.mWindowDetachedWallpaper = mTmpWindow; animator.mBulkUpdateParams |= SET_WALLPAPER_MAY_CHANGE; } } boolean isInputMethodClientFocus(int uid, int pid) { Loading Loading
api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -50337,7 +50337,7 @@ package android.view.animation { method public long computeDurationHint(); method protected void ensureInterpolator(); method public int getBackgroundColor(); method public boolean getDetachWallpaper(); method public deprecated boolean getDetachWallpaper(); method public long getDuration(); method public boolean getFillAfter(); method public boolean getFillBefore(); Loading @@ -50361,7 +50361,7 @@ package android.view.animation { method public void scaleCurrentDuration(float); method public void setAnimationListener(android.view.animation.Animation.AnimationListener); method public void setBackgroundColor(int); method public void setDetachWallpaper(boolean); method public deprecated void setDetachWallpaper(boolean); method public void setDuration(long); method public void setFillAfter(boolean); method public void setFillBefore(boolean);
core/java/android/view/animation/Animation.java +5 −7 Original line number Diff line number Diff line Loading @@ -203,11 +203,6 @@ public abstract class Animation implements Cloneable { */ private float mScaleFactor = 1f; /** * Don't animate the wallpaper. */ private boolean mDetachWallpaper = false; private boolean mShowWallpaper; private boolean mMore = true; Loading Loading @@ -667,9 +662,10 @@ public abstract class Animation implements Cloneable { * * @param detachWallpaper true if the wallpaper should be detached from the animation * @attr ref android.R.styleable#Animation_detachWallpaper * * @deprecated All window animations are running with detached wallpaper. */ public void setDetachWallpaper(boolean detachWallpaper) { mDetachWallpaper = detachWallpaper; } /** Loading Loading @@ -793,9 +789,11 @@ public abstract class Animation implements Cloneable { /** * Return value of {@link #setDetachWallpaper(boolean)}. * @attr ref android.R.styleable#Animation_detachWallpaper * * @deprecated All window animations are running with detached wallpaper. */ public boolean getDetachWallpaper() { return mDetachWallpaper; return false; } /** Loading
services/core/java/com/android/server/wm/AnimationAdapter.java +0 −6 Original line number Diff line number Diff line Loading @@ -34,12 +34,6 @@ interface AnimationAdapter { long STATUS_BAR_TRANSITION_DURATION = 120L; /** * @return Whether we should detach the wallpaper during the animation. * @see Animation#setDetachWallpaper */ boolean getDetachWallpaper(); /** * @return Whether we should show the wallpaper during the animation. * @see Animation#getShowWallpaper() Loading
services/core/java/com/android/server/wm/AppWindowToken.java +1 −13 Original line number Diff line number Diff line Loading @@ -1632,17 +1632,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return null; } int getLowestAnimLayer() { for (int i = 0; i < mChildren.size(); i++) { final WindowState w = mChildren.get(i); if (w.mRemoved) { continue; } return w.mWinAnimator.mAnimLayer; } return Integer.MAX_VALUE; } WindowState getHighestAnimLayerWindow(WindowState currentTarget) { WindowState candidate = null; for (int i = mChildren.indexOf(currentTarget); i >= 0; i--) { Loading @@ -1650,8 +1639,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (w.mRemoved) { continue; } if (candidate == null || w.mWinAnimator.mAnimLayer > candidate.mWinAnimator.mAnimLayer) { if (candidate == null) { candidate = w; } } Loading
services/core/java/com/android/server/wm/DisplayContent.java +12 −70 Original line number Diff line number Diff line Loading @@ -439,16 +439,11 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo return; } final int flags = w.mAttrs.flags; // If this window is animating, make a note that we have an animating window and take // care of a request to run a detached wallpaper animation. if (winAnimator.isAnimationSet()) { final AnimationAdapter anim = w.getAnimation(); // If this window is animating, ensure the animation background is set. final AnimationAdapter anim = w.mAppToken != null ? w.mAppToken.getAnimation() : w.getAnimation(); if (anim != null) { if ((flags & FLAG_SHOW_WALLPAPER) != 0 && anim.getDetachWallpaper()) { mTmpWindow = w; } final int color = anim.getBackgroundColor(); if (color != 0) { final TaskStack stack = w.getStack(); Loading @@ -457,25 +452,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo } } } } // If this window's app token is running a detached wallpaper animation, make a note so // we can ensure the wallpaper is displayed behind it. final AppWindowToken atoken = winAnimator.mWin.mAppToken; final AnimationAdapter animation = atoken != null ? atoken.getAnimation() : null; if (animation != null) { if ((flags & FLAG_SHOW_WALLPAPER) != 0 && animation.getDetachWallpaper()) { mTmpWindow = w; } final int color = animation.getBackgroundColor(); if (color != 0) { final TaskStack stack = w.getStack(); if (stack != null) { stack.setAnimationBackground(winAnimator, color); } } } }; private final Consumer<WindowState> mScheduleToastTimeout = w -> { Loading Loading @@ -2307,21 +2283,6 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo mPinnedStackControllerLocked.setAdjustedForIme(imeVisible, imeHeight); } /** * If a window that has an animation specifying a colored background and the current wallpaper * is visible, then the color goes *below* the wallpaper so we don't cause the wallpaper to * suddenly disappear. */ int getLayerForAnimationBackground(WindowStateAnimator winAnimator) { final WindowState visibleWallpaper = mBelowAppWindowsContainers.getWindow( w -> w.mIsWallpaper && w.isVisibleNow()); if (visibleWallpaper != null) { return visibleWallpaper.mWinAnimator.mAnimLayer; } return winAnimator.mAnimLayer; } void prepareFreezingTaskBounds() { for (int stackNdx = mTaskStackContainers.getChildCount() - 1; stackNdx >= 0; --stackNdx) { final TaskStack stack = mTaskStackContainers.getChildAt(stackNdx); Loading Loading @@ -2746,22 +2707,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo if (highestTarget != null) { final AppTransition appTransition = mService.mAppTransition; if (DEBUG_INPUT_METHOD) Slog.v(TAG_WM, appTransition + " " + highestTarget + " animating=" + highestTarget.mWinAnimator.isAnimationSet() + " layer=" + highestTarget.mWinAnimator.mAnimLayer + " new layer=" + target.mWinAnimator.mAnimLayer); + " animating=" + highestTarget.isAnimating()); if (appTransition.isTransitionSet()) { // If we are currently setting up for an animation, hold everything until we // can find out what will happen. setInputMethodTarget(highestTarget, true); return highestTarget; } else if (highestTarget.mWinAnimator.isAnimationSet() && highestTarget.mWinAnimator.mAnimLayer > target.mWinAnimator.mAnimLayer) { // If the window we are currently targeting is involved with an animation, // and it is on top of the next target we will be over, then hold off on // moving until that is done. setInputMethodTarget(highestTarget, true); return highestTarget; } } } Loading Loading @@ -2934,26 +2886,16 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo return false; } void updateWindowsForAnimator(WindowAnimator animator) { mTmpWindowAnimator = animator; void updateWindowsForAnimator() { forAllWindows(mUpdateWindowsForAnimator, true /* traverseTopToBottom */); } void updateWallpaperForAnimator(WindowAnimator animator) { /** * Updates the {@link TaskStack#setAnimationBackground} for all windows. */ void updateBackgroundForAnimator() { resetAnimationBackgroundAnimator(); // Used to indicate a detached wallpaper. mTmpWindow = null; mTmpWindowAnimator = animator; forAllWindows(mUpdateWallpaperForAnimator, true /* traverseTopToBottom */); if (animator.mWindowDetachedWallpaper != mTmpWindow) { if (DEBUG_WALLPAPER) Slog.v(TAG, "Detached wallpaper changed from " + animator.mWindowDetachedWallpaper + " to " + mTmpWindow); animator.mWindowDetachedWallpaper = mTmpWindow; animator.mBulkUpdateParams |= SET_WALLPAPER_MAY_CHANGE; } } boolean isInputMethodClientFocus(int uid, int pid) { Loading