Android T 远程动画显示流程(更新中)

本地动画和远程动画区别是什么?
本地动画:自给自足。对自身SurfaceControl矢量动画进行控制。
远程动画:拿来吧你!一个app A对另一个app B通过binder跨进程通信,控制app B的SurfaceControl矢量动画。
无论是本地动画还是远程动画,都仅仅只是对SurfaceControl动画图层控制,而无法控制应用内部的View。
注:矢量动画包含位移、放大、缩小、透明度、圆角等。

常见的远程动画,就是我们从桌面点击一个应用启动这个应用,这个过程中会产生的动画就是远程动画。
我们从这个角度分析其动画显示过程。

显示过程分析

我们前面通过学习Android T 窗口动画(本地动画)显示流程,发现无论什么类型动画都有其创建和移除的过程,在SurfaceAnimator中createAnimationLeash和removeLeash添加log打印堆栈信息。
createAnimationLeash
在这里插入图片描述添加log
Slog.i("WindowManager","createAnimationLeash type = " + animationTypeToString(type) + " animatable = "+animatable, new Exception());

removeLeash
在这里插入图片描述添加log
Slog.i("WindowManager","removeLeash leash = " + leash , new Exception());

我们看看下面几种启动的动画创建和移除的过程(排除了insets类型的动画):

冷启动

WindowManager: createAnimationLeash type = app_transition animatable = Task{d0b86 #77 type=standard A=10116:com.example.mysystemdialog}
WindowManager: createAnimationLeash type = app_transition animatable = Task{2c8eb49 #1 type=home}
WindowManager: createAnimationLeash type = window_animation animatable = WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996}
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=1)/@0x50de32e - animation-leash of app_transition)/@0x5e2271f
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=77)/@0xeb831c3 - animation-leash of app_transition)/@0xebdcd79
WindowManager: removeLeash leash = Surface(name=Surface(name=WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996})/@0xa32d428 - animation-leash of window_animation)/@0xd323396
WindowManager: createAnimationLeash type = starting_reveal animatable = Window{a65f40b u0 com.example.mysystemdialog/com.example.mysystemdialog.MainActivity}
WindowManager: createAnimationLeash type = window_animation animatable = Window{dad6bc2 u0 Splash Screen com.example.mysystemdialog}
WindowManager: removeLeash leash = Surface(name=Surface(name=a65f40b com.example.mysystemdialog/com.example.mysystemdialog.MainActivity)/@0xdbce2c1 - animation-leash of starting_reveal)/@0x6df31a7
WindowManager: removeLeash leash = Surface(name=Surface(name=dad6bc2 Splash Screen com.example.mysystemdialog)/@0x3868f87 - animation-leash of window_animation)/@0x9d22add

应用不在后台运行,从桌面点击一个应用冷启动,动画顺序如下:

动画窗口动画类型操作
mysystemdialog(Task)app_transition创建
home(桌面Task)app_transition创建
WallpaperWindowToken(壁纸)window_animation创建
home(桌面Task)app_transition移除
mysystemdialog(Task)app_transition移除
WallpaperWindowToken(壁纸)app_transition移除
MainActivity冷启动应用主界面(ActivityRecord)starting_reveal创建
mysystemdialog的冷启动窗口(Splash Screen)window_animation创建
MainActivity冷启动应用主界面(ActivityRecord)starting_reveal移除
mysystemdialog的冷启动窗口(Splash Screen)window_animation移除

热启动

WindowManager: createAnimationLeash type = app_transition animatable = Task{d0b86 #77 type=standard A=10116:com.example.mysystemdialog}
WindowManager: createAnimationLeash type = app_transition animatable = Task{2c8eb49 #1 type=home}
WindowManager: createAnimationLeash type = window_animation animatable = WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996}
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=1)/@0x50de32e - animation-leash of app_transition)/@0x6c5dc4f
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=77)/@0xeb831c3 - animation-leash of app_transition)/@0x8775329
WindowManager: removeLeash leash = Surface(name=Surface(name=WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996})/@0xa32d428 - animation-leash of window_animation)/@0x8534d86
WindowManager: createAnimationLeash type = window_animation animatable = Window{d22fcb2 u0 SnapshotStartingWindow for taskId=77}
WindowManager: removeLeash leash = Surface(name=Surface(name=d22fcb2 SnapshotStartingWindow for taskId=77)/@0xfcbebd0 - animation-leash of window_animation)/@0x3faeece

应用本身就在后台运行,从桌面热启动应用,动画顺序如下:

动画窗口动画类型操作
mysystemdialog(Task)app_transition创建
home(桌面Task)app_transition创建
WallpaperWindowToken(壁纸)window_animation创建
home(桌面Task)app_transition移除
mysystemdialog(Task)app_transition移除
WallpaperWindowToken(壁纸)app_transition移除
mysystemdialog的热启动窗口(SnapshotStartingWindow)window_animation创建
mysystemdialog的热启动窗口(SnapshotStartingWindow)window_animation移除

home回到桌面

WindowManager: createAnimationLeash type = app_transition animatable = Task{2c8eb49 #1 type=home}
WindowManager: createAnimationLeash type = app_transition animatable = Task{d0b86 #77 type=standard A=10116:com.example.mysystemdialog}
WindowManager: createAnimationLeash type = window_animation animatable = WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996}
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=77)/@0xeb831c3 - animation-leash of app_transition)/@0x77da703
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=1)/@0x50de32e - animation-leash of app_transition)/@0x12ce9bd
WindowManager: removeLeash leash = Surface(name=Surface(name=WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996})/@0xa32d428 - animation-leash of window_animation)/@0x5e69f0a

在应用界面,点击home键退回到桌面界面,动画顺序如下:

动画窗口动画类型操作
home(桌面Task)app_transition创建
mysystemdialog(Task)app_transition创建
WallpaperWindowToken(壁纸)window_animation创建
mysystemdialog(Task)app_transition移除
home(桌面Task)app_transition移除
WallpaperWindowToken(壁纸)window_animation移除

关键堆栈

创建动画 createAnimationLeash

桌面
WindowManager: createAnimationLeash type = app_transition animatable = Task{2c8eb49 #1 type=home}
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.createAnimationLeash(SurfaceAnimator.java:472)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.startAnimation(SurfaceAnimator.java:186)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2810)
WindowManager: 	at com.android.server.wm.WindowContainer$AnimationRunnerBuilder.lambda$build$4(WindowContainer.java:4078)
WindowManager: 	at com.android.server.wm.WindowContainer$AnimationRunnerBuilder.$r8$lambda$BWeVZQp29j72z9D_sWdID2xR4qI(Unknown Source:0)
WindowManager: 	at com.android.server.wm.WindowContainer$AnimationRunnerBuilder$$ExternalSyntheticLambda1.startAnimation(Unknown Source:7)
WindowManager: 	at com.android.server.wm.WindowContainer.applyAnimationUnchecked(WindowContainer.java:3174)
WindowManager: 	at com.android.server.wm.Task.applyAnimationUnchecked(Task.java:3366)
WindowManager: 	at com.android.server.wm.WindowContainer.applyAnimation(WindowContainer.java:2958)
WindowManager: 	at com.android.server.wm.AppTransitionController.applyAnimations(AppTransitionController.java:882)
WindowManager: 	at com.android.server.wm.AppTransitionController.applyAnimations(AppTransitionController.java:1085)
WindowManager: 	at com.android.server.wm.AppTransitionController.handleAppTransitionReady(AppTransitionController.java:266)
WindowManager: 	at com.android.server.wm.RootWindowContainer.checkAppTransitionReady(RootWindowContainer.java:970)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:834)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:777)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
WindowManager: 	at android.os.Handler.handleCallback(Handler.java:942)
WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
WindowManager: 	at android.os.Looper.loopOnce(Looper.java:201)
WindowManager: 	at android.os.Looper.loop(Looper.java:288)
WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
应用task
WindowManager: createAnimationLeash type = app_transition animatable = Task{d0b86 #77 type=standard A=10116:com.example.mysystemdialog}
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.createAnimationLeash(SurfaceAnimator.java:472)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.startAnimation(SurfaceAnimator.java:186)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2810)
WindowManager: 	at com.android.server.wm.WindowContainer$AnimationRunnerBuilder.lambda$build$4(WindowContainer.java:4078)
WindowManager: 	at com.android.server.wm.WindowContainer$AnimationRunnerBuilder.$r8$lambda$BWeVZQp29j72z9D_sWdID2xR4qI(Unknown Source:0)
WindowManager: 	at com.android.server.wm.WindowContainer$AnimationRunnerBuilder$$ExternalSyntheticLambda1.startAnimation(Unknown Source:7)
WindowManager: 	at com.android.server.wm.WindowContainer.applyAnimationUnchecked(WindowContainer.java:3174)
WindowManager: 	at com.android.server.wm.Task.applyAnimationUnchecked(Task.java:3366)
WindowManager: 	at com.android.server.wm.WindowContainer.applyAnimation(WindowContainer.java:2958)
WindowManager: 	at com.android.server.wm.AppTransitionController.applyAnimations(AppTransitionController.java:882)
WindowManager: 	at com.android.server.wm.AppTransitionController.applyAnimations(AppTransitionController.java:1087)
WindowManager: 	at com.android.server.wm.AppTransitionController.handleAppTransitionReady(AppTransitionController.java:266)
WindowManager: 	at com.android.server.wm.RootWindowContainer.checkAppTransitionReady(RootWindowContainer.java:970)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:834)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:777)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
WindowManager: 	at android.os.Handler.handleCallback(Handler.java:942)
WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
WindowManager: 	at android.os.Looper.loopOnce(Looper.java:201)
WindowManager: 	at android.os.Looper.loop(Looper.java:288)
WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
壁纸
WindowManager: createAnimationLeash type = window_animation animatable = WallpaperWindowToken{79ea104 token=android.os.Binder@30f6996}
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.createAnimationLeash(SurfaceAnimator.java:472)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.startAnimation(SurfaceAnimator.java:186)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2810)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2817)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2823)
WindowManager: 	at com.android.server.wm.WallpaperAnimationAdapter.lambda$startWallpaperAnimations$0(WallpaperAnimationAdapter.java:82)
WindowManager: 	at com.android.server.wm.WallpaperAnimationAdapter.$r8$lambda$pFt1sM34mQb-FFZsZckZ6IVTj_M(Unknown Source:0)
WindowManager: 	at com.android.server.wm.WallpaperAnimationAdapter$$ExternalSyntheticLambda0.accept(Unknown Source:13)
WindowManager: 	at com.android.server.wm.WallpaperWindowToken.forAllWallpaperWindows(WallpaperWindowToken.java:214)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWallpaperWindows(WindowContainer.java:1911)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWallpaperWindows(WindowContainer.java:1911)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWallpaperWindows(WindowContainer.java:1911)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWallpaperWindows(WindowContainer.java:1911)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWallpaperWindows(WindowContainer.java:1911)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWallpaperWindows(WindowContainer.java:1911)
WindowManager: 	at com.android.server.wm.WallpaperAnimationAdapter.startWallpaperAnimations(WallpaperAnimationAdapter.java:78)
WindowManager: 	at com.android.server.wm.RemoteAnimationController.createWallpaperAnimations(RemoteAnimationController.java:270)
WindowManager: 	at com.android.server.wm.RemoteAnimationController.goodToGo(RemoteAnimationController.java:185)
WindowManager: 	at com.android.server.wm.AppTransition.goodToGo(AppTransition.java:419)
WindowManager: 	at com.android.server.wm.AppTransitionController.handleAppTransitionReady(AppTransitionController.java:277)
WindowManager: 	at com.android.server.wm.RootWindowContainer.checkAppTransitionReady(RootWindowContainer.java:970)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:834)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:777)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
WindowManager: 	at android.os.Handler.handleCallback(Handler.java:942)
WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
WindowManager: 	at android.os.Looper.loopOnce(Looper.java:201)
WindowManager: 	at android.os.Looper.loop(Looper.java:288)
WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
starting_reveal
WindowManager: createAnimationLeash type = starting_reveal animatable = Window{f64bf2d u0 com.example.mysystemdialog/com.example.mysystemdialog.MainActivity}
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.createAnimationLeash(SurfaceAnimator.java:472)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.startAnimation(SurfaceAnimator.java:186)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2810)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2817)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2823)
WindowManager: 	at com.android.server.wm.TaskOrganizerController.applyStartingWindowAnimation(TaskOrganizerController.java:634)
WindowManager: 	at com.android.server.wm.TaskOrganizerController.removeStartingWindow(TaskOrganizerController.java:696)
WindowManager: 	at com.android.server.wm.StartingSurfaceController$StartingSurface.remove(StartingSurfaceController.java:271)
WindowManager: 	at com.android.server.wm.ActivityRecord.lambda$removeStartingWindowAnimation$4(ActivityRecord.java:2787)
WindowManager: 	at com.android.server.wm.ActivityRecord.$r8$lambda$cZFIJhaFFrS84y2PDOOXTP_CRFs(Unknown Source:0)
WindowManager: 	at com.android.server.wm.ActivityRecord$$ExternalSyntheticLambda16.run(Unknown Source:4)
WindowManager: 	at com.android.server.wm.ActivityRecord.removeStartingWindowAnimation(ActivityRecord.java:2803)
WindowManager: 	at com.android.server.wm.ActivityRecord.removeStartingWindow(ActivityRecord.java:2732)
WindowManager: 	at com.android.server.wm.ActivityRecord.onFirstWindowDrawn(ActivityRecord.java:6577)
WindowManager: 	at com.android.server.wm.WindowState.performShowLocked(WindowState.java:4674)
WindowManager: 	at com.android.server.wm.WindowStateAnimator.commitFinishDrawingLocked(WindowStateAnimator.java:274)
WindowManager: 	at com.android.server.wm.DisplayContent.lambda$new$8(DisplayContent.java:1099)
WindowManager: 	at com.android.server.wm.DisplayContent.$r8$lambda$OtLCIQFjCt9o-SYztyeDUcWUwGs(Unknown Source:0)
WindowManager: 	at com.android.server.wm.DisplayContent$$ExternalSyntheticLambda10.accept(Unknown Source:4)
WindowManager: 	at com.android.server.wm.WindowContainer$ForAllWindowsConsumerWrapper.apply(WindowContainer.java:2684)
WindowManager: 	at com.android.server.wm.WindowContainer$ForAllWindowsConsumerWrapper.apply(WindowContainer.java:2674)
WindowManager: 	at com.android.server.wm.WindowState.applyInOrderWithImeWindows(WindowState.java:4942)
WindowManager: 	at com.android.server.wm.WindowState.forAllWindows(WindowState.java:4786)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1672)
WindowManager: 	at com.android.server.wm.DisplayContent.applySurfaceChangesTransaction(DisplayContent.java:4946)
WindowManager: 	at com.android.server.wm.RootWindowContainer.applySurfaceChangesTransaction(RootWindowContainer.java:1014)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacementNoTrace(RootWindowContainer.java:816)
WindowManager: 	at com.android.server.wm.RootWindowContainer.performSurfacePlacement(RootWindowContainer.java:777)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacementLoop(WindowSurfacePlacer.java:177)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:126)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer.performSurfacePlacement(WindowSurfacePlacer.java:115)
WindowManager: 	at com.android.server.wm.WindowSurfacePlacer$Traverser.run(WindowSurfacePlacer.java:57)
WindowManager: 	at android.os.Handler.handleCallback(Handler.java:942)
WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
WindowManager: 	at android.os.Looper.loopOnce(Looper.java:201)
WindowManager: 	at android.os.Looper.loop(Looper.java:288)
WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
冷启动窗口
WindowManager: createAnimationLeash type = window_animation animatable = Window{4d28c0 u0 Splash Screen com.example.mysystemdialog}
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.createAnimationLeash(SurfaceAnimator.java:472)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.startAnimation(SurfaceAnimator.java:186)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2810)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2817)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2823)
WindowManager: 	at com.android.server.wm.WindowState.startAnimation(WindowState.java:5327)
WindowManager: 	at com.android.server.wm.WindowState.startAnimation(WindowState.java:5303)
WindowManager: 	at com.android.server.wm.WindowStateAnimator.applyAnimationLocked(WindowStateAnimator.java:652)
WindowManager: 	at com.android.server.wm.WindowManagerService.tryStartExitingAnimation(WindowManagerService.java:2642)
WindowManager: 	at com.android.server.wm.WindowManagerService.relayoutWindow(WindowManagerService.java:2448)
WindowManager: 	at com.android.server.wm.Session.relayout(Session.java:253)
WindowManager: 	at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:727)
WindowManager: 	at com.android.server.wm.Session.onTransact(Session.java:178)
WindowManager: 	at android.os.Binder.execTransactInternal(Binder.java:1285)
WindowManager: 	at android.os.Binder.execTransact(Binder.java:1244)
热启动窗口
WindowManager: createAnimationLeash type = window_animation animatable = Window{d22fcb2 u0 SnapshotStartingWindow for taskId=77}
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.createAnimationLeash(SurfaceAnimator.java:472)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.startAnimation(SurfaceAnimator.java:186)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2810)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2817)
WindowManager: 	at com.android.server.wm.WindowContainer.startAnimation(WindowContainer.java:2823)
WindowManager: 	at com.android.server.wm.WindowState.startAnimation(WindowState.java:5327)
WindowManager: 	at com.android.server.wm.WindowState.startAnimation(WindowState.java:5303)
WindowManager: 	at com.android.server.wm.WindowStateAnimator.applyAnimationLocked(WindowStateAnimator.java:652)
WindowManager: 	at com.android.server.wm.WindowState.removeIfPossible(WindowState.java:2593)
WindowManager: 	at com.android.server.wm.WindowState.removeIfPossible(WindowState.java:2487)
WindowManager: 	at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2053)
WindowManager: 	at com.android.server.wm.Session.remove(Session.java:230)
WindowManager: 	at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:687)
WindowManager: 	at com.android.server.wm.Session.onTransact(Session.java:178)
WindowManager: 	at android.os.Binder.execTransactInternal(Binder.java:1285)
WindowManager: 	at android.os.Binder.execTransact(Binder.java:1244)

移除动画 removeLeash

桌面
0WindowManager: removeLeash leash = Surface(name=Surface(name=Task=1)/@0x50de32e - animation-leash of app_transition)/@0x12ce9bd
0WindowManager: java.lang.Exception
0WindowManager: 	at com.android.server.wm.SurfaceAnimator.removeLeash(SurfaceAnimator.java:423)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator.reset(SurfaceAnimator.java:413)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0(SurfaceAnimator.java:132)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$lRxTVOJy8fX752UbrFno9INW9hE(Unknown Source:0)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda1.run(Unknown Source:8)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(SurfaceAnimator.java:144)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$4PiCdaEsT4mA6LQVhqpeM5EoU9c(Unknown Source:0)
0WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda0.onAnimationFinished(Unknown Source:4)
0WindowManager: 	at com.android.server.wm.RemoteAnimationController.onAnimationFinished(RemoteAnimationController.java:307)
0WindowManager: 	at com.android.server.wm.RemoteAnimationController.-$$Nest$monAnimationFinished(Unknown Source:0)
0WindowManager: 	at com.android.server.wm.RemoteAnimationController$FinishedCallback.onAnimationFinished(RemoteAnimationController.java:418)
0WindowManager: 	at android.view.IRemoteAnimationFinishedCallback$Stub.onTransact(IRemoteAnimationFinishedCallback.java:89)
0WindowManager: 	at android.os.Binder.execTransactInternal(Binder.java:1285)
0WindowManager: 	at android.os.Binder.execTransact(Binder.java:1244)
应用task
WindowManager: removeLeash leash = Surface(name=Surface(name=Task=77)/@0xeb831c3 - animation-leash of app_transition)/@0x77da703
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.removeLeash(SurfaceAnimator.java:423)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.reset(SurfaceAnimator.java:413)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0(SurfaceAnimator.java:132)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$lRxTVOJy8fX752UbrFno9INW9hE(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda1.run(Unknown Source:8)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(SurfaceAnimator.java:144)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$4PiCdaEsT4mA6LQVhqpeM5EoU9c(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda0.onAnimationFinished(Unknown Source:4)
WindowManager: 	at com.android.server.wm.RemoteAnimationController.onAnimationFinished(RemoteAnimationController.java:307)
WindowManager: 	at com.android.server.wm.RemoteAnimationController.-$$Nest$monAnimationFinished(Unknown Source:0)
WindowManager: 	at com.android.server.wm.RemoteAnimationController$FinishedCallback.onAnimationFinished(RemoteAnimationController.java:418)
WindowManager: 	at android.view.IRemoteAnimationFinishedCallback$Stub.onTransact(IRemoteAnimationFinishedCallback.java:89)
WindowManager: 	at android.os.Binder.execTransactInternal(Binder.java:1285)
WindowManager: 	at android.os.Binder.execTransact(Binder.java:1244)
壁纸
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.removeLeash(SurfaceAnimator.java:423)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.reset(SurfaceAnimator.java:413)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0(SurfaceAnimator.java:132)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$lRxTVOJy8fX752UbrFno9INW9hE(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda1.run(Unknown Source:8)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(SurfaceAnimator.java:144)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$4PiCdaEsT4mA6LQVhqpeM5EoU9c(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda0.onAnimationFinished(Unknown Source:4)
WindowManager: 	at com.android.server.wm.RemoteAnimationController.onAnimationFinished(RemoteAnimationController.java:322)
WindowManager: 	at com.android.server.wm.RemoteAnimationController.-$$Nest$monAnimationFinished(Unknown Source:0)
WindowManager: 	at com.android.server.wm.RemoteAnimationController$FinishedCallback.onAnimationFinished(RemoteAnimationController.java:418)
WindowManager: 	at android.view.IRemoteAnimationFinishedCallback$Stub.onTransact(IRemoteAnimationFinishedCallback.java:89)
WindowManager: 	at android.os.Binder.execTransactInternal(Binder.java:1285)
WindowManager: 	at android.os.Binder.execTransact(Binder.java:1244)
starting_reveal
WindowManager: removeLeash leash = Surface(name=Surface(name=f64bf2d com.example.mysystemdialog/com.example.mysystemdialog.MainActivity)/@0xdf5580d - animation-leash of starting_reveal)/@0x6af05d3
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.removeLeash(SurfaceAnimator.java:423)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.reset(SurfaceAnimator.java:413)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.cancelAnimation(SurfaceAnimator.java:364)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.cancelAnimation(SurfaceAnimator.java:270)
WindowManager: 	at com.android.server.wm.WindowContainer.cancelAnimation(WindowContainer.java:2832)
WindowManager: 	at com.android.server.wm.WindowState.lambda$removeIfPossible$2(WindowState.java:2503)
WindowManager: 	at com.android.server.wm.WindowState.$r8$lambda$gtdPXCAzSiavwVZY5OZGcTDMs84(Unknown Source:0)
WindowManager: 	at com.android.server.wm.WindowState$$ExternalSyntheticLambda0.apply(Unknown Source:2)
WindowManager: 	at com.android.server.wm.WindowState.applyInOrderWithImeWindows(WindowState.java:4942)
WindowManager: 	at com.android.server.wm.WindowState.forAllWindows(WindowState.java:4786)
WindowManager: 	at com.android.server.wm.WindowContainer.forAllWindows(WindowContainer.java:1655)
WindowManager: 	at com.android.server.wm.WindowState.removeIfPossible(WindowState.java:2501)
WindowManager: 	at com.android.server.wm.WindowState.removeIfPossible(WindowState.java:2487)
WindowManager: 	at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2053)
WindowManager: 	at com.android.server.wm.Session.remove(Session.java:230)
WindowManager: 	at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:687)
WindowManager: 	at com.android.server.wm.Session.onTransact(Session.java:178)
WindowManager: 	at android.os.Binder.execTransactInternal(Binder.java:1285)
WindowManager: 	at android.os.Binder.execTransact(Binder.java:1244)
冷启动窗口
WindowManager: removeLeash leash = Surface(name=Surface(name=4d28c0 Splash Screen com.example.mysystemdialog)/@0xbbbe9b3 - animation-leash of window_animation)/@0x7ca9ee9
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.removeLeash(SurfaceAnimator.java:423)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.reset(SurfaceAnimator.java:413)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0(SurfaceAnimator.java:132)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$lRxTVOJy8fX752UbrFno9INW9hE(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda1.run(Unknown Source:8)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(SurfaceAnimator.java:144)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$4PiCdaEsT4mA6LQVhqpeM5EoU9c(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda0.onAnimationFinished(Unknown Source:4)
WindowManager: 	at com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0(LocalAnimationAdapter.java:67)
WindowManager: 	at com.android.server.wm.LocalAnimationAdapter.$r8$lambda$gPDCFw0mQLltlXqA3mL6IUKCwLs(Unknown Source:0)
WindowManager: 	at com.android.server.wm.LocalAnimationAdapter$$ExternalSyntheticLambda0.run(Unknown Source:6)
WindowManager: 	at android.os.Handler.handleCallback(Handler.java:942)
WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
WindowManager: 	at android.os.Looper.loopOnce(Looper.java:201)
WindowManager: 	at android.os.Looper.loop(Looper.java:288)
WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)
热启动窗口
WindowManager: removeLeash leash = Surface(name=Surface(name=d22fcb2 SnapshotStartingWindow for taskId=77)/@0xfcbebd0 - animation-leash of window_animation)/@0x3faeece
WindowManager: java.lang.Exception
WindowManager: 	at com.android.server.wm.SurfaceAnimator.removeLeash(SurfaceAnimator.java:423)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.reset(SurfaceAnimator.java:413)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0(SurfaceAnimator.java:132)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$lRxTVOJy8fX752UbrFno9INW9hE(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda1.run(Unknown Source:8)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1(SurfaceAnimator.java:144)
WindowManager: 	at com.android.server.wm.SurfaceAnimator.$r8$lambda$4PiCdaEsT4mA6LQVhqpeM5EoU9c(Unknown Source:0)
WindowManager: 	at com.android.server.wm.SurfaceAnimator$$ExternalSyntheticLambda0.onAnimationFinished(Unknown Source:4)
WindowManager: 	at com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0(LocalAnimationAdapter.java:67)
WindowManager: 	at com.android.server.wm.LocalAnimationAdapter.$r8$lambda$gPDCFw0mQLltlXqA3mL6IUKCwLs(Unknown Source:0)
WindowManager: 	at com.android.server.wm.LocalAnimationAdapter$$ExternalSyntheticLambda0.run(Unknown Source:6)
WindowManager: 	at android.os.Handler.handleCallback(Handler.java:942)
WindowManager: 	at android.os.Handler.dispatchMessage(Handler.java:99)
WindowManager: 	at android.os.Looper.loopOnce(Looper.java:201)
WindowManager: 	at android.os.Looper.loop(Looper.java:288)
WindowManager: 	at android.os.HandlerThread.run(HandlerThread.java:67)
WindowManager: 	at com.android.server.ServiceThread.run(ServiceThread.java:44)

小结

从当前分析以及堆栈来看,应用的启动窗口相关动画(冷启动应用主界面starting_reveal、冷启动窗口Splash Screen、热启动窗口SnapshotStartingWindow)均为本地动画,其他的动画均为远程动画。

本地动画:
窗口类型:冷启动应用主界面starting_reveal、冷启动窗口Splash Screen、热启动窗口SnapshotStartingWindow。
代码逻辑:创建动画时,从applyAnimationLocked流程到createAnimationLeash;移除动画时,从LocalAnimationAdapter的Callback到removeLeash流程。
注:starting_reveal类型动画比较特殊,涉及到StartingWindow动画流程。
远程动画:
窗口类型:桌面Task、应用Task、壁纸。
代码逻辑:创建动画时,从handleAppTransitionReady流程到;移除动画时,从IRemoteAnimationFinishedCallback流程到removeLeash流程。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/655308.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C++ Qt开发:运用QJSON模块解析数据

Qt 是一个跨平台C图形界面开发库,利用Qt可以快速开发跨平台窗体应用程序,在Qt中我们可以通过拖拽的方式将不同组件放到指定的位置,实现图形化开发极大的方便了开发效率,本章将重点介绍如何运用QJson组件的实现对JSON文本的灵活解析…

echarts:获取省、市、区/县、镇的地图数据

目录 第一章 前言 第二章 获取地图的数据(GeoJSON格式) 2.1 获取省、市、区/县地图数据 2.2 获取乡/镇/街道地图数据 第一章 前言 需求:接到要做大屏的需求,其中需要用echarts绘画一个地图,但是需要的地图是区/县…

C语言系列-整数在内存中的存储大小端字节序

🌈个人主页: 会编程的果子君 ​💫个人格言:“成为自己未来的主人~” 目录 整数在内存中的存储 大小端字节序和字节序判断 什么是大小端 为什么会有大小端 练习 整数在内存中的存储 在讲解操作符的时候,我们就讲过了下面的内容 整数的2…

高端车规MCU的破局之路

目录 1 低质量的无效内卷 2 高端车规MCU产品共性 2.1 支持标定测量 2.2 低延迟通信加速 2.3 完备的网络安全解决方案 2.4虚拟化 3 国产替代的囚徒困境 1 低质量的无效内卷 近几年,车规MCU国产替代的呼声此消彼长,但仍然集中在低端产品。 从产…

鸿蒙首批原生应用!无感验证已完美适配鸿蒙系统

顶象无感验证已成功适配鸿蒙系统,成为首批鸿蒙原生应用,助力鸿蒙生态的快速发展。 作为全场景分布式操作系统,鸿蒙系统旨在打破不同设备之间的界限,实现极速发现、极速连接、硬件互助、资源共享。迄今生态设备数已突破8亿台&…

软考复习之数据结构篇

算法设计 迭代法:用于求方程的近似根。 1、若方程无解,则算法求出的近似根序列就不会收敛,迭代过程会变成死循环,因此在使用迭代算法前应先考查方程是否有解,并在程序中对迭代的次数给予限制。 2、方程虽有解&#…

第十一篇【传奇开心果系列】BeeWare的Toga开发移动应用示例:Briefcase和Toga 哥俩好

传奇开心果博文系列 系列博文目录BeeWare的Toga开发移动应用示例系列博文目录一、前言二、Briefcase和toga各自的主要功能分别介绍三、使用Toga 开发移动应用Briefcase工具是最佳拍档四、Briefcase搭档Toga创建打包发布联系人移动应用示例代码五、运行测试打包发布六、归纳总结…

RabbitMQ之三种队列之间的区别及如何选型

目录 不同队列之间的区别 Classic经典队列 Quorum仲裁队列 Stream流式队列 如何使用不同类型的队列​ Quorum队列 Stream队列 不同队列之间的区别 Classic经典队列 这是RabbitMQ最为经典的队列类型。在单机环境中,拥有比较高的消息可靠性。 经典队列可以选…

数据库管理-第141期 DG PDB - Oracle DB 23c(20240129)

数据库管理141期 2024-01-29 第141期 DG PDB - Oracle DB 23c(20240129)1 概念2 环境说明3 操作3.1 数据库配置3.2 配置tnsname3.3 配置强制日志3.4 DG配置3.5 DG配置建立联系3.6 启用所有DG配置3.7 启用DG PDB3.8 创建源PDB的DG配置3.9 拷贝pdbprod1文件…

2023年算法CDO-CNN-BiLSTM-ATTENTION回归预测(matlab)

2023年算法CDO-CNN-BiLSTM-ATTENTION回归预测(matlab) CDO-CNN-BiLSTM-Attention切诺贝利灾难优化器优化卷积-长短期记忆神经网络结合注意力机制的数据回归预测 Matlab语言。 切诺贝利灾难优化器Chernobyl Disaster Optimizer (CDO)是H. Shehadeh于202…

薅运营商羊毛?封杀!

最近边小缘在蓝点网上看到一则消息 “浙江联通也开始严格排查PCDN和PT等大流量行为 被检测到可能会封停宽带”。 此前中国联通已经在四川和上海等多个省市严查家庭宽带 (部分企业宽带也被查) 使用 PCDN 或 PT,当用户的宽带账户存在大量上传数据的情况,中…

Jupyter notebook文件默认存储路径以及更改方法

目录 1、文件默认存储路径怎么查?2、文件默认存储路径怎么改? 转自:https://blog.csdn.net/fengyeer20120/article/details/109483362 初次使用Jupyter Notebook,确实好用啊!但安装Anaconda后,打开Jupyter …

cocos creator 调用预设体Prefab中的方法(调用另一个节点的方法)

调用预设体中的方法 通过cc.instantiate(this.star)创建这个预设体实例这个star预设体中添加了一个脚本组件star.ts 获取到这个脚本组件star.getComponent(‘star’).test(),并调用其中的test()方法同理可以用该方式像另一个节点中传值 //星星预设体property(cc.Pr…

【动态规划】【图论】【C++算法】1575统计所有可行路径

作者推荐 【动态规划】【字符串】【行程码】1531. 压缩字符串 本文涉及知识点 动态规划汇总 图论 LeetCode1575统计所有可行路径 给你一个 互不相同 的整数数组,其中 locations[i] 表示第 i 个城市的位置。同时给你 start,finish 和 fuel 分别表示出…

RK3568 Android 13 系统裁剪

android 13 系统裁剪是个大工程,裁剪也是需要大量的测试,才能保证系统的稳定性,以下是RK官方给出的裁剪方案,有兴趣的可以去看一下,对裁剪不是要求过高的可以根据官方的建议,对系统进行裁剪: Rockchip And…

Web开发8:前后端分离开发

在现代的 Web 开发中,前后端分离开发已经成为了一种常见的架构模式。它的优势在于前端和后端可以独立开发,互不干扰,同时也提供了更好的可扩展性和灵活性。本篇博客将介绍前后端分离开发的概念、优势以及如何实现。 什么是前后端分离开发&am…

Spring 学习1

1、什么是Spring Spring 是一款主流的 Java EE 轻量级开源框架 ,Spring 由“Spring 之父”Rod Johnson 提出并创立,其目的是用于简化 Java 企业级应用的开发难度和开发周期。Spring的用途不仅限于服务器端的开发。从简单性、可测试性和松耦合的角度而言…

5G安卓核心板开发板_MT6833天玑700规格参数

核心板采用沉金生产工艺,耐腐蚀抗干扰,支持-20℃-70℃环境下7x24小时稳定运行,尺寸仅为45mmx48mm x2.65mm,可嵌入到各种智能产品中,助力智能产品便携化及功能差异化。 联发科MT6833处理器采用台积电 7nm 制程的5G SoC…

vue3 el-pagination 将组件中英文‘goto’ 修改 为 中文到‘第几’

效果如图&#xff1a; 要求&#xff1a;将英文中Go to 改为到第几 操作如下&#xff1a; <template><div class"paging"><el-config-provider :locale"zhCn"> // 注意&#xff1a;这是重要部分<el-pagination //分页组件根据官…

【寒假每日一题·2024】AcWing 5415. 仓库规划(补)

文章目录 一、题目1、原题链接2、题目描述 二、解题报告1、思路分析2、时间复杂度3、代码详解 一、题目 1、原题链接 5415. 仓库规划 2、题目描述 二、解题报告 1、思路分析 思路参考y总&#xff1a;y总讲解视频 &#xff08;1&#xff09;由于每一个仓库均有一个m维向量的位…