Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be1e4e42 authored by Wen Zhang's avatar Wen Zhang Committed by Cherrypicker Worker
Browse files

Improve SurfaceControlRegistry missing callers when IPC

When WM core triggers onTransitionReady, the IPC process doesn't transmit mCallers, causing SurfaceControlRegistry to miss some caller information during apply behavior debugging. This creates some troubleshooting difficulties. The solution now uses mRemoteCallers to track remote mCallers during IPC, which are dumped together with mCaller during apply operations. The modified behavior shows these improvements:

apply (tx=10776072953781 )
java.lang.Throwable
	at android.view.SurfaceControlRegistry.checkCallStackDebugging(SurfaceControlRegistry.java:336)
	at android.view.SurfaceControl$Transaction.apply(SurfaceControl.java:3572)
	at android.view.SurfaceControl$Transaction.apply(SurfaceControl.java:3557)
	at android.view.SurfaceControl$Transaction.apply(SurfaceControl.java:3507)
	at com.android.wm.shell.transition.DefaultTransitionHandler.startAnimation(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:3685)
	at com.android.wm.shell.transition.Transitions.dispatchTransition(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:69)
	at com.android.wm.shell.transition.Transitions.playTransition(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:280)
	at com.android.wm.shell.transition.Transitions.playTransitionWithTracing(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:36)
	at com.android.wm.shell.transition.Transitions.processReadyQueue(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:177)
	at com.android.wm.shell.transition.Transitions.dispatchReady(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:592)
	at com.android.wm.shell.transition.Transitions.onTransitionReady(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:246)
	at com.android.wm.shell.transition.Transitions$TransitionPlayerImpl$$ExternalSyntheticLambda1.run(go/retraceme 76fdb68da3b642d8476b2c2a98f4badcf3bd3015fbcbd6631a2a57c03eb07e1d:23)
	at android.os.Handler.handleCallback(Handler.java:995)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loopOnce(Looper.java:265)
	at android.os.Looper.loop(Looper.java:358)
	at android.os.HandlerThread.run(HandlerThread.java:85)
        merge (tx=10776072953781 ) otherTx=10776072953100
        merge (tx=10776072953781 ) otherTx=10776072953642
        show (tx=10776072953642  sc=33e3b2 com.android.settings/com.android.settings.Settings$WirelessSettingsActivity#278)
        merge (tx=10776072953781 ) otherTx=10776072953074
        show (tx=10776072953074  sc=TaskFragment{b1b9339 mode=fullscreen}#275)
        merge (tx=10776072953781 ) otherTx=10776072952714
        reparent (tx=10776072952714  sc=transition snapshot: ActivityRecord{177307636 u0 com.android.settings/.homepage.DeepLinkHomepageActivity t26}#274) newParent=null
        reparent (tx=10776072952714  sc=ActivityRecord{177307636 u0 com.android.settings/.homepage.DeepLinkHomepageActivity t26}#246) newParent=Surface(name=TaskFragment{60d9fda mode=fullscreen}#273)/@0x71dac0b
        merge (tx=10776072953781 ) otherTx=10776072952740
        reparent (tx=10776072952740  sc=2afdb16 Splash Screen com.android.settings#248) newParent=Surface(name=Task=26#245)/@0x2c6b419
        merge (tx=10776072952740 ) otherTx=19159849110292
        merge (tx=19159849110292 ) otherTx=19159849110293
        merge (tx=10776072952740 ) otherTx=19159849110351
        merge (tx=19159849110351 ) otherTx=19159849110352
        merge (tx=10776072953781 ) otherTx=10776072953483
        show (tx=10776072953483  sc=c93b10 com.android.settings/com.android.settings.homepage.DeepLinkHomepageActivity#277)
        merge (tx=10776072953781 ) otherTx=10776072948462
        hide (tx=10776072948462  sc=Task=23#142)
        merge (tx=10776072953781 ) otherTx=10776072948461
        hide (tx=10776072948461  sc=ActivityRecord{144725827 u0 com.tencent.tmgp.sgame/.SGameActivity t23}#143)

Flag: EXEMPT bugfix
Bug: 416819067
Test: atest SurfaceControlRegistryTests
(cherry picked from https://partner-android-review.googlesource.com/q/commit:0426ae2bff4788e8055d846235191ac063cf4c8e)
Merged-In: I3fd147a371e6e2a58915ab5f9ac03368309216ce
Change-Id: I3fd147a371e6e2a58915ab5f9ac03368309216ce
parent 46b51ac0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment