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

Skip to content
Commit 4aedc3bd authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Fix b/318722891 (unwanted onSurfaceCreated event)

Inside updateSurface, use onVisibilityChanged directly instead of
doVisibilityChanged when a surface has been created. doVisibilityChanged
will trigger another call to updateSurface wich will check for
"mSurfaceCreated" to see if we need to create the surface. But at this
point the first call of updateSurface has created the surface but not
yet flipped the "mSurfaceCreated" boolean (it is done right after the
doVisibilityChanged call). Using onVisibilityChanged fixes the issue:
also we're guaranteed that the wallpaper is invisible when calling
onVisibilityChangedt(true) since there is a if (!mReportedVisible)
check.

Flag: ACONFIG com.android.window.flags.no_consecutive_visibility_events
STAGING
Bug: 318722891
Test: atest WallpaperManagerTest

Change-Id: Ia4b775454ea9f3a57f78b55c29d56879773f5e76
parent 9dc8cf6e
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