WallpaperToken 窗口动画分析(Android 10)

本文深入探讨了Android 10中WallpaperToken的窗口动画机制,包括创建Animation、startWallpaperAnimation的执行过程,以及如何通过RunningAnimation包装SurfaceControl和AnimationSpec来实现动画效果。关键在于通过mAnimation设置outTransformation并调用applyTransformation,以ScaleAnimation为例展示了动画的工作原理。
部署运行你感兴趣的模型镜像

WallpaperToken 窗口动画分析

// frameworks/base/services/core/java/com/android/server/wm/AppTransitionController.java
private void handleNonAppWindowsInTransition(int transit, int flags) {
    if (transit == TRANSIT_KEYGUARD_GOING_AWAY) {
        if ((flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_WITH_WALLPAPER) != 0
                && (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_NO_ANIMATION) == 0
                && (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_SUBTLE_ANIMATION) == 0) {
            // 创建 Animation
            Animation anim = mService.mPolicy.createKeyguardWallpaperExit(
                    (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE) != 0);
            if (anim != null) {
                // 执行动画
                mDisplayContent.mWallpaperController.startWallpaperAnimation(anim);
            }
        }
    }
    if (transit == TRANSIT_KEYGUARD_GOING_AWAY
            || transit == TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER) {
        mDisplayContent.startKeyguardExitOnNonAppWindows(
                transit == TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER,
                (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_SHADE) != 0,
                (flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_SUBTLE_ANIMATION) != 0);
    }
}

创建 Animation

// frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
@Override
public Animation createKeyguardWallpaperExit(boolean goingToNotificationShade) {
    if (goingToNotificationShade) {
        return null;
    } else {
        return AnimationUtils.loadAnimation(mContext, R.anim.lock_screen_wallpaper_exit);
    }
}
// frameworks/base/core/res/res/anim/lock_screen_wallpaper_exit.xml
<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:shareInterpolator="false">
    <alpha
        android:fromAlpha="1.0" android:toAlpha="0.0"
        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
        android:interpolator="@interpolator/fast_out_linear_in"
        android:duration="200"/>

    <!-- Empty animation so the animation has same duration as lock_screen_behind_enter animation
         -->
    <translate android:fromYDelta="0" android:toYDelta="0"
        android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
        android:interpolator="@interpolator/linear"
        android:duration="300" />
</set>

执行动画 startWallpaperAnimation

// frameworks/base/services/core/java/com/android/server/wm/WallpaperController.java
class WallpaperWindowToken extends WindowToken {
    void startWallpaperAnimation(Animation a) {
        for (int curTokenNdx = mWallpaperTokens.size() - 1; curTokenNdx >= 0; curTokenNdx--) {
            // 这里的 mWallpaperTokens 列表来自于 addWallpaperToken() 方法
            // 获取 WallpaperWindowToken
            final WallpaperWindowToken token = mWallpaperTokens.get(curTokenNdx);
            // 执行壁纸窗口动画
            token.startAnimation(a);
        }
    }

    private final ArrayList<WallpaperWindowToken> mWallpaperTokens = new ArrayList<>();

    WallpaperWindowToken(WindowManagerService service, IBinder token, boolean explicit,
                         DisplayContent dc, boolean ownerCanManageAppTokens) {
        super(service, token, TYPE_WALLPAPER, explicit, dc, ownerCanManageAppTokens);
        dc.mWallpaperController.addWallpaperToken(this);
    }
    void addWallpaperToken(WallpaperWindowToken token) {
        mWallpaperTokens.add(token);
    }
    void removeWallpaperToken(WallpaperWindowToken token) {
        mWallpaperTokens.remove(token);
    }
}
// frameworks/base/services/core/java/com/android/server/wm/WallpaperWindowToken.java
void startAnimation(Animation anim) {
    for (int ndx = mChildren.size() - 1; ndx >= 0; ndx--) {
        final WindowState windowState = mChildren.get(ndx);
        windowState.startAnimation(anim);
    }
}
// frameworks/base/services/core/java/com/android/server/wm/WindowState.java
void startAnimation(Animation anim) {

    // If we are an inset provider, all our animations are driven by the inset client.
    if (mInsetProvider != null && mInsetProvider.isControllable()) {
        return;
    }

    final DisplayInfo displayInfo = getDisplayContent().getDisplayInfo();
    anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),
                    displayInfo.appWidth, displayInfo.appHeight);
    anim.restrictDuration(MAX_ANIMATION_DURATION);
    anim.scaleCurrentDuration(mWmService.getWindowAnimationScaleLocked());
    // 后面会回调 LocalAnimationAdapter
    final AnimationAdapter adapter = new LocalAnimationAdapter(
        // 后面会回调 WindowAnimationSpec
        new WindowAnimationSpec(anim, mSurfacePosition, false /* canSkipFirstFrame */,
                                0 /* windowCornerRadius */),
        mWmService.mSurfaceAnimationRunner);
    startAnimation(getPendingTransaction(), adapter);
    commitPendingTransaction();
}

private void startAnimation(Transaction t, AnimationAdapter adapter) {    
    startAnimation(t, adapter, mWinAnimator.mLastHidden);
}
// frameworks/base/services/core/java/com/android/server/wm/WindowContainer.java
class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<E>
    implements Comparable<WindowContainer>, Animatable {

    protected final SurfaceAnimator mSurfaceAnimator;
    WindowContainer(WindowManagerService wms) {
        mWmService = wms;
        mPendingTransaction = wms.mTransactionFactory.make();
        mSurfaceAnimator = new SurfaceAnimator(this, this::onAnimationFinished, wms);
    }

    void startAnimation(Transaction t, AnimationAdapter anim, boolean hidden) {
        if (DEBUG_ANIM) Slog.v(TAG, "Starting animation on " + this + ": " + anim);
        mSurfaceAnimator.startAnimation(t, anim, hidden);
    }
}

// frameworks/base/services/core/java/com/android/server/wm/SurfaceAnimator.java
class SurfaceAnimator {
    private final WindowManagerService mService;
    private AnimationAdapter mAnimation;

    @VisibleForTesting
    SurfaceControl mLeash;
    @VisibleForTesting
    final Animatable mAnimatable;
    private final OnAnimationFinishedCallback mInnerAnimationFinishedCallback;
    @VisibleForTesting
    final Runnable mAnimationFinishedCallback;
    private boolean mAnimationStartDelayed;
	// 构造函数
    SurfaceAnimator(Animatable animatable, @Nullable Runnable animationFinishedCallback,
                    WindowManagerService service) {
        mAnimatable = animatable;
        mService = service;
        mAnimationFinishedCallback = animationFinishedCallback;
        mInnerAnimationFinishedCallback = getFinishedCallback(animationFinishedCallback);
    }

    // 开始动画
    void startAnimation(Transaction t, AnimationAdapter anim, boolean hidden) {
        cancelAnimation(t, true /* restarting */, true /* forwardCancel */);
        mAnimation = anim;
        final SurfaceControl surface = mAnimatable.getSurfaceControl();
        if (surface == null) {
            Slog.w(TAG, "Unable to start animation, surface is null or no children.");
            cancelAnimation();
            return;
        }
        mLeash = createAnimationLeash(surface, t,mAnimatable.getSurfaceWidth(), 		mAnimatable.getSurfaceHeight(), hidden);
        mAnimatable.onAnimationLeashCreated(t, mLeash);
        
        if (mAnimationStartDelayed) {
            if (DEBUG_ANIM) Slog.i(TAG, "Animation start delayed");
            return;
        }
        mAnimation.startAnimation(mLeash, t, mInnerAnimationFinishedCallback);
    }
}
// frameworks/base/services/core/java/com/android/server/wm/LocalAnimationAdapter.java
@Override
public void startAnimation(SurfaceControl animationLeash, Transaction t,
        OnAnimationFinishedCallback finishCallback) {
    mAnimator.startAnimation(mSpec, animationLeash, t,
            () -> finishCallback.onAnimationFinished(this));
}

RunningAnimation 包装了 SurfaceControl和 AnimationSpec, 并提供 动画完成的回调 finishCallback。

// frameworks/base/services/core/java/com/android/server/wm/SurfaceAnimationRunner.java
void startAnimation(AnimationSpec a, SurfaceControl animationLeash, Transaction t,
                    Runnable finishCallback) {
    synchronized (mLock) {
        final RunningAnimation runningAnim = new RunningAnimation(a, animationLeash,finishCallback);
        mPendingAnimations.put(animationLeash, runningAnim);
        if (!mAnimationStartDeferred) {
            // 重点,动画执行入口
            mChoreographer.postFrameCallback(this::startAnimations);
        }

        // Some animations (e.g. move animations) require the initial transform to be applied
        // immediately.
        applyTransformation(runningAnim, t, 0 /* currentPlayTime */);
    }
}

// 下面动画更新监听器中也会调用
private void applyTransformation(RunningAnimation a, Transaction t, long currentPlayTime) {
    if (a.mAnimSpec.needsEarlyWakeup()) {
        t.setEarlyWakeup();
    }
    a.mAnimSpec.apply(t, a.mLeash, currentPlayTime);
}

真正动画执行生效的地方

// frameworks/base/services/core/java/com/android/server/wm/SurfaceAnimationRunner.java
private void startAnimations(long frameTimeNanos) {
    synchronized (mLock) {
        startPendingAnimationsLocked();
    }
    mPowerManagerInternal.powerHint(PowerHint.INTERACTION, 0);
}

@GuardedBy("mLock")
private void startPendingAnimationsLocked() {
    for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
        startAnimationLocked(mPendingAnimations.valueAt(i));
    }
    mPendingAnimations.clear();
}

// 根据xml中配置的参数 来设置相关的动画
@GuardedBy("mLock")
private void startAnimationLocked(RunningAnimation a) {
    final ValueAnimator anim = mAnimatorFactory.makeAnimator();

    // Animation length is already expected to be scaled.
    anim.overrideDurationScale(1.0f);
    anim.setDuration(a.mAnimSpec.getDuration());
    anim.addUpdateListener(animation -> { // 动画更新
        synchronized (mCancelLock) {
            if (!a.mCancelled) {
                final long duration = anim.getDuration();
                long currentPlayTime = anim.getCurrentPlayTime();
                if (currentPlayTime > duration) {
                    currentPlayTime = duration;
                }
                // 重点 
                applyTransformation(a, mFrameTransaction, currentPlayTime);
            }
        }

        // Transaction will be applied in the commit phase.
        scheduleApplyTransaction();
    });

    anim.addListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationStart(Animator animation) { // 动画开始
            synchronized (mCancelLock) {
                if (!a.mCancelled) {
                    mFrameTransaction.setAlpha(a.mLeash, 1);
                }
            }
        }

        @Override
        public void onAnimationEnd(Animator animation) { // 动画结束
            synchronized (mLock) {
                mRunningAnimations.remove(a.mLeash);
                synchronized (mCancelLock) {
                    if (!a.mCancelled) {

                        // Post on other thread that we can push final state without jank.
                        AnimationThread.getHandler().post(a.mFinishCallback);
                    }
                }
            }
        }
    });
    a.mAnim = anim;
    mRunningAnimations.put(a.mLeash, a);

    anim.start(); // 开始动画
    if (a.mAnimSpec.canSkipFirstFrame()) {
        // If we can skip the first frame, we start one frame later.
        anim.setCurrentPlayTime(mChoreographer.getFrameIntervalNanos() / NANOS_PER_MS);
    }

    // 通过手动应用动画帧立即开始动画。否则,开始时间只会设置在下一帧,导致延迟
    anim.doAnimationFrame(mChoreographer.getFrameTime());
}

private void applyTransformation(RunningAnimation a, Transaction t, long currentPlayTime) {
    if (a.mAnimSpec.needsEarlyWakeup()) {
        t.setEarlyWakeup();
    }
    a.mAnimSpec.apply(t, a.mLeash, currentPlayTime);
}
// frameworks/base/services/core/java/com/android/server/wm/WindowAnimationSpec.java   
public class WindowAnimationSpec implements AnimationSpec {
    private final ThreadLocal<TmpValues> mThreadLocalTmps = ThreadLocal.withInitial(TmpValues::new);

    public WindowAnimationSpec(Animation animation, Point position, Rect stackBounds,
                               boolean canSkipFirstFrame, int stackClipMode, boolean isAppAnimation,
                               float windowCornerRadius) {
        mAnimation = animation; // 传入动画参数
        if (position != null) {
            mPosition.set(position.x, position.y);
        }
        mWindowCornerRadius = windowCornerRadius;
        mCanSkipFirstFrame = canSkipFirstFrame;
        mIsAppAnimation = isAppAnimation;
        mStackClipMode = stackClipMode;
        if (stackBounds != null) {
            mStackBounds.set(stackBounds);
        }
    }


    @Override
    public void apply(Transaction t, SurfaceControl leash, long currentPlayTime) {
        // 获取设置参数
        final TmpValues tmp = mThreadLocalTmps.get();
        tmp.transformation.clear();
        // 通过 mAnimation 设置值, mAnimation 在构造函数中传入
        mAnimation.getTransformation(currentPlayTime, tmp.transformation);
        tmp.transformation.getMatrix().postTranslate(mPosition.x, mPosition.y);
        t.setMatrix(leash, tmp.transformation.getMatrix(), tmp.floats);
        t.setAlpha(leash, tmp.transformation.getAlpha());

        boolean cropSet = false;
        if (mStackClipMode == STACK_CLIP_NONE) {
            if (tmp.transformation.hasClipRect()) {
                t.setWindowCrop(leash, tmp.transformation.getClipRect());
                cropSet = true;
            }
        } else {
            mTmpRect.set(mStackBounds);
            if (tmp.transformation.hasClipRect()) {
                mTmpRect.intersect(tmp.transformation.getClipRect());
            }
            t.setWindowCrop(leash, mTmpRect);
            cropSet = true;
        }

        // We can only apply rounded corner if a crop is set, as otherwise the value is meaningless,
        // since it doesn't have anything it's relative to.
        if (cropSet && mAnimation.hasRoundedCorners() && mWindowCornerRadius > 0) {
            t.setCornerRadius(leash, mWindowCornerRadius);
        }
    }
}

通过 mAnimation 设置 outTransformation 并返回

// frameworks/base/core/java/android/view/animation/Animation.java
public boolean getTransformation(long currentTime, Transformation outTransformation) {
    if (mStartTime == -1) {
        mStartTime = currentTime;
    }

    final long startOffset = getStartOffset();
    final long duration = mDuration;
    float normalizedTime;
    if (duration != 0) {
        normalizedTime = ((float) (currentTime - (mStartTime + startOffset))) /
            (float) duration;
    } else {
        // time is a step-change with a zero duration
        normalizedTime = currentTime < mStartTime ? 0.0f : 1.0f;
    }

    final boolean expired = normalizedTime >= 1.0f || isCanceled();
    mMore = !expired;

    if (!mFillEnabled) normalizedTime = Math.max(Math.min(normalizedTime, 1.0f), 0.0f);

    if ((normalizedTime >= 0.0f || mFillBefore) && (normalizedTime <= 1.0f || mFillAfter)) {
        if (!mStarted) {
            fireAnimationStart();
            mStarted = true;
            if (NoImagePreloadHolder.USE_CLOSEGUARD) {
                guard.open("cancel or detach or getTransformation");
            }
        }

        if (mFillEnabled) normalizedTime = Math.max(Math.min(normalizedTime, 1.0f), 0.0f);

        if (mCycleFlip) {
            normalizedTime = 1.0f - normalizedTime;
        }

        final float interpolatedTime = mInterpolator.getInterpolation(normalizedTime);
        // 重点
        applyTransformation(interpolatedTime, outTransformation);
    }

    if (expired) {
        if (mRepeatCount == mRepeated || isCanceled()) {
            if (!mEnded) {
                mEnded = true;
                guard.close();
                fireAnimationEnd();
            }
        } else {
            if (mRepeatCount > 0) {
                mRepeated++;
            }

            if (mRepeatMode == REVERSE) {
                mCycleFlip = !mCycleFlip;
            }

            mStartTime = -1;
            mMore = true;

            fireAnimationRepeat();
        }
    }

    if (!mMore && mOneMoreTime) {
        mOneMoreTime = false;
        return true;
    }

    return mMore;
}

applyTransformation

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-mJ71QQhi-1650438479327)(F:/Document/AAA_Framework/WMS%20%E5%88%86%E6%9E%90/WallpaperToken%20%E7%AA%97%E5%8F%A3%E5%8A%A8%E7%94%BB%E5%88%86%E6%9E%90.assets/image-20220419151842136.png)]

以 ScaleAnimation 为例, 其他的动画都是类似的。

// frameworks/base/core/java/android/view/animation/ScaleAnimation.java
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
    float sx = 1.0f;
    float sy = 1.0f;
    float scale = getScaleFactor();

    if (mFromX != 1.0f || mToX != 1.0f) {
        sx = mFromX + ((mToX - mFromX) * interpolatedTime);
    }
    if (mFromY != 1.0f || mToY != 1.0f) {
        sy = mFromY + ((mToY - mFromY) * interpolatedTime);
    }

    // 设置 t 的 matrix
    if (mPivotX == 0 && mPivotY == 0) {
        t.getMatrix().setScale(sx, sy);a
    } else {
        t.getMatrix().setScale(sx, sy, scale * mPivotX, scale * mPivotY);
    }
}

您可能感兴趣的与本文相关的镜像

ACE-Step

ACE-Step

音乐合成
ACE-Step

ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言

WindowManagerShell: Transition requested (#112): android.os.BinderProxy@6346062 TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=37 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.orca/.auth.StartScreenActivity mCallingUid=10218 } baseActivity=ComponentInfo{com.facebook.orca/com.facebook.messenger.neue.MainActivity} topActivity=ComponentInfo{com.facebook.orca/com.facebook.messenger.neue.MainActivity} origActivity=ComponentInfo{com.facebook.orca/com.facebook.orca.auth.StartScreenActivity} realActivity=ComponentInfo{com.facebook.orca/com.facebook.messenger.neue.MainActivity} numActivities=1 lastActiveTime=3164955 supportsSplitScreenMultiWindow=true supportsMultiWindow=true supportsPocketStudioMultiWindow=true isInFlexibleEmbedded = false uid = 10335 pid = 0 resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@77715f3} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 64 - 0, 0) topActivityInfo=ActivityInfo{35692b0 com.facebook.orca.auth.StartScreenActivity} launchCookies=[android.os.BinderProxy@ae4529] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=true isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityInOplusCompatMode=false topActivityEligibleForLetterboxEducation= falseisLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=720 topActivityLetterboxHe ... WindowManagerShell: RemoteTransition directly requested for (#112) android.os.BinderProxy@6346062: RemoteTransition { remoteTransition = android.window.IRemoteTransition$Stub$Proxy@9fc20ae, recentAnimRunner = null, appThread = android.app.IApplicationThread$Stub$Proxy@6e31e4f, debugName = QuickstepLaunch } OplusTransitionController: tryFinishAheadIfNeed transition 112 , SyncGroup: com.android.server.wm.BLASTSyncEngine$SyncGroup@9a1a04c ActivityTaskManager: commitVisibility: ActivityRecord{3f75c25 u0 com.facebook.orca/.auth.StartScreenActivity t37}: visible=true visibleRequested=true, isInTransition=true, runningAnimation=true WindowManagerShell: setLauncherKeepClearAreaHeight: visible=false, height=168 OplusTransitionAnimationManager: markLaunchFromDriveIfNeed: isFromDrive = false OplusTransitionAnimationManager: markLaunchFromDriveIfNeed: isFromDrive = false OplusTransitionController: onTransactionReady, transition: 112, OplusTransitionController: info: {id=112 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{WCT{RemoteToken{f3b47c Task{f6695a1 #37 type=standard A=10335:com.facebook.orca}}} m=OPEN f=NONE leash=Surface(name=Task=37)/@0x8728652 sb=Rect(0, 0 - 720, 1570) eb=Rect(0, 0 - 720, 1570) d=0 taskParent=-1},{WCT{RemoteToken{a902b03 Task{6319b9a #1 type=home}}} m=TO_BACK f=SHOW_WALLPAPER leash=Surface(name=Task=1)/@0x3cf6a80 sb=Rect(0, 0 - 720, 1570) eb=Rect(0, 0 - 720, 1570) d=0 taskParent=-1}] extendInfo=[OplusTransitionExtendedInfo{mTmpFinishT=null, mInOplusCompatMode=false, mIsProcessRunning=false, mHasMismatchBoundsTarget=false, mRecentsController=null, mIsTranslucentActivityToHome=false, mAvoidInterceptKeyEventToHome=false, mIsFromHome=true, mParentLeash=null, mIsOplusAnimRes=false, mIsFromOverlay=false, mIsBalAllow=false, mTaskNotInRecent=false, mIsLaunchFromSpruce=false, mIsLaunchFromDrive=false, mAssistScreenShowing=false, mUserIdTransition=0, mInRemoteScene=false, mInPreReady=false, mPreStart=false, mToken=null, mShellApplyToken=null, mRequestTransitionTaskId=37, mAbortTransitionOnShell=0, mTaskIdStartFromRecents=0, mTransitionId=112, mFoldChangeType=-1, mAnimStartingPosition=[0, 0, 0, 0], mIsOpeningStkDialogActivity=false, mIsNeedApplyStartTForEmbedded=false}]}, OplusTransitionController: targets : [Task{f6695a1 #37 type=standard A=10335:com.facebook.orca}, Task{6319b9a #1 type=home}], OplusTransitionController: participants: {WallpaperWindowToken{2a993dc token=android.os.Binder@af7b7c4 showWhenLocked=true}, ActivityRecord{3f75c25 u0 com.facebook.orca/.auth.StartScreenActivity t37}, ActivityRecord{a44dc16 u0 com.android.launcher/.Launcher t5}, WallpaperWindowToken{ecdf5d1 token=android.os.Binder@ef4151d showWhenLocked=false}, Task{f6695a1 #37 type=standard A=10335:com.facebook.orca}}, OplusTransitionController: playings:[TransitionRecord{f709895 id=112 track=0 type=OPEN flags=0x0 state=2}] ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.orca/.auth.StartScreenActivity bnds=[24,280][192,468] (has extras) mCallingUid=10218} with LAUNCH_SINGLE_TOP from uid 10218 (BAL_ALLOW_VISIBLE_WINDOW) result code=0 WindowManagerShell: onTransitionReady(transaction=7425998460556) WindowManagerShell: onTransitionReady (#112) android.os.BinderProxy@6346062: {id=112 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{WCT{android.window.IWindowContainerToken$Stub$Proxy@f4b9786} m=OPEN f=NONE leash=Surface(name=Task=37)/@0xf5d506b sb=Rect(0, 0 - 720, 1570) eb=Rect(0, 0 - 720, 1570) d=0 taskParent=-1},{WCT{android.window.IWindowContainerToken$Stub$Proxy@2fe8847} m=TO_BACK f=SHOW_WALLPAPER leash=Surface(name=Task=1)/@0x6fe07c8 sb=Rect(0, 0 - 720, 1570) eb=Rect(0, 0 - 720, 1570) d=0 taskParent=-1}] extendInfo=[OplusTransitionExtendedInfo{mTmpFinishT=null, mInOplusCompatMode=false, mIsProcessRunning=false, mHasMismatchBoundsTarget=false, mRecentsController=null, mIsTranslucentActivityToHome=false, mAvoidInterceptKeyEventToHome=false, mIsFromHome=true, mParentLeash=null, mIsOplusAnimRes=false, mIsFromOverlay=false, mIsBalAllow=false, mTaskNotInRecent=false, mIsLaunchFromSpruce=false, mIsLaunchFromDrive=false, mAssistScreenShowing=false, mUserIdTransition=0, mInRemoteScene=false, mInPreReady=false, mPreStart=false, mToken=null, mShellApplyToken=null, mRequestTransitionTaskId=37, mAbortTransitionOnShell=0, mTaskIdStartFromRecents=0, mTransitionId=112, mFoldChangeType=-1, mAnimStartingPosition=[0, 0, 0, 0], mIsOpeningStkDialogActivity=false, mIsNeedApplyStartTForEmbedded=false}]} OplusShellTransition: dispatchReady, active:(#112) android.os.BinderProxy@6346062@0, isSync=false, track:com.android.wm.shell.transition.Transitions$Track@79f5433 OplusShellTransition: Abort transition (#112) android.os.BinderProxy@6346062@0 WMCore requested. reason: 0; abortTransition: false WindowManagerShell: Playing animation for (#112) android.os.BinderProxy@6346062@0 WindowManagerShell: try firstHandler com.android.wm.shell.transition.DefaultMixedHandler@cf093f0 WindowManagerShell: Mixed transition for opening an intent with a remote transition and PIP #112 WindowManagerShell: Delegate animation for (#112) to RemoteTransition { remoteTransition = android.window.IRemoteTransition$Stub$Proxy@9fc20ae, recentAnimRunner = null, appThread = android.app.IApplicationThread$Stub$Proxy@6e31e4f, debugName = QuickstepLaunch } OplusShellTransition: RemoteTransitionHandler, shell start remote animation, type: OPEN WindowManagerShell: animated by firstHandler OplusTransitionAnimationManager: skipFinishDrawingIfNeed clientRotation=0, currentRotation=0, hasFixedRotationApp=false, requestedOrientation=-1, win=Window{8a01d67 u0 Splash Screen com.facebook.orca}, activity=ActivityRecord{3f75c25 u0 com.facebook.orca/.auth.StartScreenActivity t37}, currentConfig={1.0 ?mcc??mnc [zh_IN_#Hans] ldltr sw360dp w360dp h785dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1570) mAppBounds=Rect(0, 0 - 720, 1570) mMaxBounds=Rect(0, 0 - 720, 1570) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2 fontWeightAdjustment=0mThemeChanged= 0, mThemeChangedFlags= 0, mFlipFont= 0, mScenario= 0, mAccessibleChanged= -1, mUxIconConfig= 1159700956192440353, mMaterialColor= 0, mUserId= 0, mFontUserId= 0, mFontVariationSettings= 1226, mFoldingAngle = -1.0, mIconPackName= , mDarkModeBackgroundMaxL= 0.0, mDarkModeDialogBgMaxL= 27.0, mDarkModeForegroundMinL= 100.0, mOplusConfigType= 1, mOplusChangedConfigs= 0, OpSans= -1, mBurmeseFontFlag= 2, mFlag= 0, mExtraFlag= 0, mFlexibleActivitySuitable= -1, mPuttDisplayFlag= -1} OplusTransitionAnimationManager: skipFinishDrawingIfNeed clientRotation=0, currentRotation=0, hasFixedRotationApp=false, requestedOrientation=-1, win=Window{8a01d67 u0 Splash Screen com.facebook.orca}, activity=ActivityRecord{3f75c25 u0 com.facebook.orca/.auth.StartScreenActivity t37}, currentConfig={1.0 ?mcc??mnc [zh_IN_#Hans] ldltr sw360dp w360dp h785dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1570) mAppBounds=Rect(0, 0 - 720, 1570) mMaxBounds=Rect(0, 0 - 720, 1570) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} s.2 fontWeightAdjustment=0mThemeChanged= 0, mThemeChangedFlags= 0, mFlipFont= 0, mScenario= 0, mAccessibleChanged= -1, mUxIconConfig= 1159700956192440353, mMaterialColor= 0, mUserId= 0, mFontUserId= 0, mFontVariationSettings= 1226, mFoldingAngle = -1.0, mIconPackName= , mDarkModeBackgroundMaxL= 0.0, mDarkModeDialogBgMaxL= 27.0, mDarkModeForegroundMinL= 100.0, mOplusConfigType= 1, mOplusChangedConfigs= 0, OpSans= -1, mBurmeseFontFlag= 2, mFlag= 0, mExtraFlag= 0, mFlexibleActivitySuitable= -1, mPuttDisplayFlag= -1} OplusShellTransition: RemoteTransitionHandlerandroid.os.BinderProxy@6346062, onTransitionFinished thread=198, true OplusShellTransition: RemoteTransitionHandlerandroid.os.BinderProxy@6346062, onTransitionFinished, finishTransaction.mNativeObject=-5476376634511716608, thread=28 WindowManagerShell: Transition animation finished (aborted=false), notifying core (#112) android.os.BinderProxy@6346062@0 OplusShellTransition: RecentsTransitionHandler.getRecentController: no controller found , token=android.os.BinderProxy@6346062 OplusShellTransition: isRecentsAnimation is: false isRemoteAnimation true ActivityTaskManager: commitVisibility: ActivityRecord{a44dc16 u0 com.android.launcher/.Launcher t5}: visible=false visibleRequested=false, isInTransition=false, runningAnimation=false OplusTransitionController: finishTransition, transition: TransitionRecord{f709895 id=112 track=0 type=OPEN flags=0x0 state=4} 与后面这个 这两次动画有上面差异 WindowManagerShell: Transition requested (#249): android.os.BinderProxy@2500c22 TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=72 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.orca/.auth.StartScreenActivity mCallingUid=10213 } baseActivity=ComponentInfo{com.facebook.orca/com.facebook.messenger.neue.MainActivity} topActivity=ComponentInfo{com.facebook.orca/com.facebook.messenger.neue.MainActivity} origActivity=ComponentInfo{com.facebook.orca/com.facebook.orca.auth.StartScreenActivity} realActivity=ComponentInfo{com.facebook.orca/com.facebook.messenger.neue.MainActivity} numActivities=1 lastActiveTime=369285174 supportsSplitScreenMultiWindow=true supportsMultiWindow=true supportsPocketStudioMultiWindow=true isInFlexibleEmbedded = false uid = 10343 pid = 0 resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@413b6b3} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 64 - 0, 0) topActivityInfo=ActivityInfo{f818470 com.facebook.orca.auth.StartScreenActivity} launchCookies=[android.os.BinderProxy@f1fb3e9] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=true isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityInOplusCompatMode=false topActivityEligibleForLetterboxEducation= falseisLetterboxEducationEnabled= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=720 topActivityLetterbo ... WindowManagerShell: RemoteTransition directly requested for (#249) android.os.BinderProxy@2500c22: RemoteTransition { remoteTransition = android.window.IRemoteTransition$Stub$Proxy@886c86e, recentAnimRunner = null, appThread = android.app.IApplicationThread$Stub$Proxy@5890b0f, debugName = QuickstepLaunch } ActivityTaskManager: commitVisibility: ActivityRecord{1f4d7d5 u0 com.facebook.orca/.auth.StartScreenActivity t72}: visible=true visibleRequested=true, isInTransition=true, runningAnimation=true WindowManagerShell: setLauncherKeepClearAreaHeight: visible=false, height=168 OplusTransitionAnimationManager: markLaunchFromDriveIfNeed: isFromDrive = false OplusTransitionAnimationManager: markLaunchFromDriveIfNeed: isFromDrive = false OplusTransitionController: onTransactionReady, transition: 249, OplusTransitionController: info: {id=249 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{WCT{RemoteToken{2711e42 Task{9e8bedb #72 type=standard A=10343:com.facebook.orca}}} m=OPEN f=NONE leash=Surface(name=Task=72)/@0x88a924 sb=Rect(0, 0 - 720, 1604) eb=Rect(0, 0 - 720, 1604) d=0 taskParent=-1},{WCT{RemoteToken{d8ddb0f Task{5f0c3b1 #29 type=home}}} m=TO_BACK f=SHOW_WALLPAPER leash=Surface(name=Task=29)/@0xabf079c sb=Rect(0, 0 - 720, 1604) eb=Rect(0, 0 - 720, 1604) d=0 taskParent=-1}] extendInfo=[OplusTransitionExtendedInfo{mTmpFinishT=null, mInOplusCompatMode=false, mIsProcessRunning=false, mHasMismatchBoundsTarget=false, mRecentsController=null, mIsTranslucentActivityToHome=false, mAvoidInterceptKeyEventToHome=false, mIsFromHome=true, mParentLeash=null, mIsOplusAnimRes=false, mIsFromOverlay=false, mIsBalAllow=false, mTaskNotInRecent=false, mIsLaunchFromSpruce=false, mIsLaunchFromDrive=false, mAssistScreenShowing=false, mUserIdTransition=0, mInRemoteScene=false, mInPreReady=true, mPreStart=false, mToken=Token{a6e2e53 TransitionRecord{3912c8d id=249 track=0 type=OPEN flags=0x0 state=2}}, mShellApplyToken=null, mRequestTransitionTaskId=72, mAbortTransitionOnShell=0, mTransitionId=249, mAnimStartingPosition=[0, 0, 0, 0], mIsOpeningStkDialogActivity=false}]}, OplusTransitionController: targets : [Task{9e8bedb #72 type=standard A=10343:com.facebook.orca}, Task{5f0c3b1 #29 type=home}], OplusTransitionController: participants: {ActivityRecord{1acf1f6 u0 com.android.launcher/.Launcher t30}, ActivityRecord{1f4d7d5 u0 com.facebook.orca/.auth.StartScreenActivity t72}, Task{9e8bedb #72 type=standard A=10343:com.facebook.orca}, WallpaperWindowToken{c52f972 token=android.os.Binder@92b3476 showWhenLocked=true}, WallpaperWindowToken{e243ed1 token=android.os.Binder@33e5bd2 showWhenLocked=false}}, OplusTransitionController: playings:[TransitionRecord{3912c8d id=249 track=0 type=OPEN flags=0x0 state=2}] WindowManagerShell: onTransitionReady(transaction=7670811605688) ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.orca/.auth.StartScreenActivity bnds=[24,308][192,496] (has extras) mCallingUid=10213} with LAUNCH_SINGLE_TOP from uid 10213 (BAL_ALLOW_VISIBLE_WINDOW) result code=0 WindowManagerShell: onTransitionReady (#249) android.os.BinderProxy@2500c22: {id=249 t=OPEN f=0x0 trk=0 r=[0@Point(0, 0)] c=[{WCT{android.window.IWindowContainerToken$Stub$Proxy@3dd7188} m=OPEN f=NONE leash=Surface(name=Task=72)/@0x736a5a5 sb=Rect(0, 0 - 720, 1604) eb=Rect(0, 0 - 720, 1604) d=0 taskParent=-1},{WCT{android.window.IWindowContainerToken$Stub$Proxy@510f721} m=TO_BACK f=SHOW_WALLPAPER leash=Surface(name=Task=29)/@0xb5afd7a sb=Rect(0, 0 - 720, 1604) eb=Rect(0, 0 - 720, 1604) d=0 taskParent=-1}] extendInfo=[OplusTransitionExtendedInfo{mTmpFinishT=null, mInOplusCompatMode=false, mIsProcessRunning=false, mHasMismatchBoundsTarget=false, mRecentsController=null, mIsTranslucentActivityToHome=false, mAvoidInterceptKeyEventToHome=false, mIsFromHome=true, mParentLeash=null, mIsOplusAnimRes=false, mIsFromOverlay=false, mIsBalAllow=false, mTaskNotInRecent=false, mIsLaunchFromSpruce=false, mIsLaunchFromDrive=false, mAssistScreenShowing=false, mUserIdTransition=0, mInRemoteScene=false, mInPreReady=true, mPreStart=false, mToken=android.os.BinderProxy@2500c22, mShellApplyToken=null, mRequestTransitionTaskId=72, mAbortTransitionOnShell=0, mTransitionId=249, mAnimStartingPosition=[0, 0, 0, 0], mIsOpeningStkDialogActivity=false}]} OplusShellTransition: dispatchReady, active:(#249) android.os.BinderProxy@2500c22@0, isSync=false, track:com.android.wm.shell.transition.Transitions$Track@f16c4a OplusShellTransition: Abort transition (#249) android.os.BinderProxy@2500c22@0 WMCore requested. reason: 0; abortTransition: false OplusShellTransition: OplusInterruptTransitionManager transition 249 in preready, startT don't show change {WCT{android.window.IWindowContainerToken$Stub$Proxy@3dd7188} m=OPEN f=NONE leash=Surface(name=Task=72)/@0x736a5a5 sb=Rect(0, 0 - 720, 1604) eb=Rect(0, 0 - 720, 1604) d=0 taskParent=-1} on setupStartState WindowManagerShell: Playing animation for (#249) android.os.BinderProxy@2500c22@0 WindowManagerShell: try firstHandler com.android.wm.shell.transition.DefaultMixedHandler@105d7bb WindowManagerShell: Mixed transition for opening an intent with a remote transition and PIP #249 WindowManagerShell: Delegate animation for (#249) to RemoteTransition { remoteTransition = android.window.IRemoteTransition$Stub$Proxy@886c86e, recentAnimRunner = null, appThread = android.app.IApplicationThread$Stub$Proxy@5890b0f, debugName = QuickstepLaunch } OplusShellTransition: RemoteTransitionHandler, shell start remote animation, type: OPEN WindowManagerShell: animated by firstHandler OplusTransitionAnimationManager: skipFinishDrawingIfNeed clientRotation=0, currentRotation=0, hasFixedRotationApp=false, requestedOrientation=-1, win=Window{b64e5a2 u0 Splash Screen com.facebook.orca}, activity=ActivityRecord{1f4d7d5 u0 com.facebook.orca/.auth.StartScreenActivity t72}, currentConfig={1.0 ?mcc??mnc [zh_IN_#Hans] ldltr sw360dp w360dp h802dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1604) mAppBounds=Rect(0, 0 - 720, 1604) mMaxBounds=Rect(0, 0 - 720, 1604) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} as.4 s.2 fontWeightAdjustment=0mThemeChanged= 0, mThemeChangedFlags= 0, mFlipFont= 0, mScenario= 0, mAccessibleChanged= -1, mUxIconConfig= 1159700956192440353, mMaterialColor= 0, mUserId= 0, mFontUserId= 0, mFontVariationSettings= 1226, mFoldingAngle = -1.0, mIconPackName= , mDarkModeBackgroundMaxL= 0.0, mDarkModeDialogBgMaxL= 27.0, mDarkModeForegroundMinL= 100.0, mOplusConfigType= 1, mOplusChangedConfigs= 0, OpSans= -1, mBurmeseFontFlag= 2, mFlag= 0, mFlexibleActivitySuitable= -1, mPuttDisplayFlag= -1} OplusTransitionAnimationManager: skipFinishDrawingIfNeed clientRotation=0, currentRotation=0, hasFixedRotationApp=false, requestedOrientation=-1, win=Window{b64e5a2 u0 Splash Screen com.facebook.orca}, activity=ActivityRecord{1f4d7d5 u0 com.facebook.orca/.auth.StartScreenActivity t72}, currentConfig={1.0 ?mcc??mnc [zh_IN_#Hans] ldltr sw360dp w360dp h802dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1604) mAppBounds=Rect(0, 0 - 720, 1604) mMaxBounds=Rect(0, 0 - 720, 1604) mDisplayRotation=ROTATION_0 mWindowingMode=fullscreen mActivityType=standard mAlwaysOnTop=undefined mRotation=ROTATION_0} as.4 s.2 fontWeightAdjustment=0mThemeChanged= 0, mThemeChangedFlags= 0, mFlipFont= 0, mScenario= 0, mAccessibleChanged= -1, mUxIconConfig= 1159700956192440353, mMaterialColor= 0, mUserId= 0, mFontUserId= 0, mFontVariationSettings= 1226, mFoldingAngle = -1.0, mIconPackName= , mDarkModeBackgroundMaxL= 0.0, mDarkModeDialogBgMaxL= 27.0, mDarkModeForegroundMinL= 100.0, mOplusConfigType= 1, mOplusChangedConfigs= 0, OpSans= -1, mBurmeseFontFlag= 2, mFlag= 0, mFlexibleActivitySuitable= -1, mPuttDisplayFlag= -1} OplusShellTransition: RemoteTransitionHandlerandroid.os.BinderProxy@2500c22, onTransitionFinished thread=199, true OplusShellTransition: RemoteTransitionHandlerandroid.os.BinderProxy@2500c22, onTransitionFinished, finishTransaction.mNativeObject=-5476376627212049664, thread=26 WindowManagerShell: Transition animation finished (aborted=false), notifying core (#249) android.os.BinderProxy@2500c22@0 OplusShellTransition: RecentsTransitionHandler.getRecentController: no controller found , token=android.os.BinderProxy@2500c22 OplusShellTransition: isRecentsAnimation is: false isRemoteAnimation true ActivityTaskManager: commitVisibility: ActivityRecord{1acf1f6 u0 com.android.launcher/.Launcher t30}: visible=false visibleRequested=false, isInTransition=false, runningAnimation=false OplusTransitionController: finishTransition, transition: TransitionRecord{3912c8d id=249 track=0 type=OPEN flags=0x0 state=4}
最新发布
09-18
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值