Avoid consecutive onVisibilityChanged calls
Calling directly onVisibilityChanged(...) from WallpaperService#updateSurface bypasses the check that the visibility actually changed. Instead we use doVisibilityChanged(...), which is a wrapper to onVisibilityChanged that checks that the visibility actually changed. This prevents a bug that triggers two consecutive calls to onVisibilitychanged(false). One of the call comes from engine.attach -> updateSurface, the other one from picker -> resizePreview -> updateSurface. Flag: ACONFIG com.android.window.flags.no_consecutive_visibility_events DEVELOPMENT Bug: 285631818 Bug: 313527496 (to be verified) Test: manually check onVisibilityChanged(false) logs Test: treehugger Change-Id: I4fc189cdb9d4b4de36d88fe27ad651ddf0b40449
Loading
Please register or sign in to comment