Skip to content
Commit 69813c5b authored by William Xiao's avatar William Xiao
Browse files

Ensure ordering of overlay callbacks

Before this CL, the DreamOverlayService in SysUI used an executor to
run code in callbacks from the base class. However, this was not
synchronized with the endDream call coming from OverlayClient in the
base class. This meant that an endDream call could come in before or
during the onStartDream implementation in SysUI, causing calls like
shouldShowComplications and getDreamComponent to throw an exception
since the overlay client was already disconnected.

This change allows providing an executor to the base
DreamOverlayService class that it will use to run callbacks coming
from the OverlayClient over binder. This makes it so that endDream
will not run before the onStartDream callback's contents run.

Bug: 271374409
Test: atest DreamOverlayServiceTest
Change-Id: I35a0badfc401d5224943e71fcc241b8a32698bea
parent 55395739
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