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
Loading
Please register or sign in to comment