Make DreamService use an Activity
Currently, the DreamService uses a floating Window to display the content of the dream on the screen. This introduces difficulties in the interactions with the Assistant application, which is an activity. By design, if the Assistant is invoked while the device is dreaming, the Assistant should be shown on top. However, since floating windows are always drawn on top of all activities, the Assistant can't be shown on top of the Dream. Here, we migrate the implementation of the DreamService to use an Activity (DreamActivity). Since the screensaver application is not part of the framework, we can't declare the activity in their AndroidManifest.xml. Therefore, we start the dream activity with a dedicated method in ActivityTaskManagerService. Bug: 133216167 Test: 1. m && ./vendor/google/tools/flashall 2. Go to Settings > Device Preferences > Screensaver > Start now 3. Verify dream appears 4. Click any key to wake up the dream 5. Verify that dream disappears Merged-In: I8dff0a124cd1b41fb925a73528305431b49ee06d Change-Id: I8dff0a124cd1b41fb925a73528305431b49ee06d (cherry picked from commit 148478a8)
Loading
Please register or sign in to comment