WindowManagerPolicy#TRANSIT_ENTER Animation

com.android.server.wm.WindowState#performShowLocked()
com.android.server.wm.WindowStateAnimator#applyEnterAnimationLocked()
com.android.server.wm.WindowStateAnimator#applyAnimationLocked()
com.android.server.wm.WindowState#startAnimation()

com.android.server.wm.WindowStateAnimator#applyAnimationLocked():

    /**
     * Choose the correct animation and set it to the passed WindowState.
     * @param transit If AppTransition.TRANSIT_PREVIEW_DONE and the app window has been drawn
     *      then the animation will be app_starting_exit. Any other value loads the animation from
     *      the switch statement below.
     * @param isEntrance The animation type the last time this was called. Used to keep from
     *      loading the same animation twice.
     * @return true if an animation has been loaded.
     */
    boolean applyAnimationLocked(int transit, boolean isEntrance) {
   
   
        if (mWin.isAnimating() && mAnimationIsEntrance == isEntrance) {
   
   
            // If we are trying to apply an animation, but already running
            // an animation of the same type, then just leave that one alone.
            return true;
        }

        if (mWin.mAttrs.type == TYPE_INPUT_METHOD) {
   
   
            mWin.getDisplayContent().adjustForImeIfNeeded();
            if (isEntrance) {
   
   
                mWin.setDisplayLayoutNeeded();
                mService.mWindowPlacerLocked.requestTraversal(22);
            }
        }

        if (mWin.mControllableInsetProvider != null) {
   
   
            // All our animations should be driven by the insets control target.
            return false;
        }

        // Only apply an animation if the display isn't frozen.  If it is
        // frozen, there is no reason to animate and it can cause strange
        // artifacts when we unfreeze the display if some different animation
        // is running.
        if (mWin.mToken.okToAnimate()) {
   
   
            int anim = mWin.getDisplayContent().getDisplayPolicy().selectAnimation(mWin, transit);
            int attr = 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值