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

Skip to content
Commit 70ecf24b authored by Bryce Lee's avatar Bryce Lee
Browse files

Prevent stopping dream immediately.

There are two places where we are currently stopping the dream process
immediately instead of waiting for the dream to complete:
1) DreamManagerService#requestStopDreamFromShell. In this use case,
   we're simulating normal interaction and shouldn't be stopping
   immediately.
2) DreamActivity#onDestroy. This stops the dream immediately by
   indirectly calling DreamService#onDestroy. This fix was meant to
   ensure that the DreamService destroy sequence always executed.
   However, always calling this on Activity#onDestroy leads to a
   race condition with the normal Activity teardown logic. This
   should exclude cases where DreamService#onDestroy wouldn't
   be called, such as when the Activity is finishing.

This changelist addresses these paths to ensure normal usage doesn't
result in immediately stopping the DreamService.

Bug: 242368903
Bug: 241569844
Bug: 243385408
Test: atest DreamServiceTest
Change-Id: Iba346f325383cbf949c65f896237e3d997efcab0
parent 368f1c05
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