Loading
Make DreamService detach on DreamActivity onDestroy
Currently DreamService.onDestroy is called whenever the DreamActivity is being destroyed. This causes issues with the lifecycle of the dream window, because the DreamService is destroyed before onDetachedFromWindow is called. In this CL, we change the implementation of onActivityDestroyed to detach the DreamService instead of destroy it immediately. This is a more gentle way to achieve the same result. Bug: 243385408 Bug: 266668856 Bug: 270913936 Test: atest DreamServiceManagerTests Test: atest DreamServiceTests Test: atest DreamOverlayTest Change-Id: Iadb7880faabf54f70a64c76c6e3e267fde9c42dd