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

Skip to content
Commit b9932b66 authored by Chuwei Xu's avatar Chuwei Xu Committed by Hung-ying Tyan
Browse files

DO NOT MERGE Fix CtsActivityManagerDeviceTestCases fails

Avoid 'Failed to create EGLSurface for window 0x951b6808, eglErr = EGL_BAD_ALLOC'.
testStackFocusSwitchOnDisplayRemoved, testStackFocusSwitchOnDisplayRemoved2,
testStackFocusSwitchOnDisplayRemoved3 can have the same problem.

When these testcases release the VirtualDisplay, it will trigger
onParentSet() in TaskStackContainers.At that time mBoostedAppAnimationLayer
may be used for animating, and ResizeableActivity is in it. So
mBoostedAppAnimationLayer.destroy() can also destroy the surface of
ResizeableActivity, but at the same time config changed will make
mAttachInfo.mThreadedRenderer.updateSurface(mSurface) of performTraversals()
in ViewRootImpl to update the surface and cause crash like
'Failed to create EGLSurface for window 0x951b6808,eglErr = EGL_BAD_ALLOC'.
So change to use transaction to call destroy() for mBoostedAppAnimationLayer
to delay it, then ResizeableActivity is not in mBoostedAppAnimationLayer
and can test pass.

Bug: 127896059
Test:  run cts-on-gsi -m CtsActivityManagerDeviceTestCases
-t android.server.am.ActivityManagerMultiDisplayTests

Change-Id: I44ee86d1620f9c2953c574146ec6f529ce6f4656
parent 507d69d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment