OSDN Git Service

Fix wake lock logic during Dream startup
authorAdrian Roos <roosa@google.com>
Fri, 23 Sep 2016 21:08:09 +0000 (14:08 -0700)
committerAdrian Roos <roosa@google.com>
Fri, 23 Sep 2016 22:11:15 +0000 (15:11 -0700)
commit9ede1d260284bbf0b47ca6f0315e943058624520
tree3f411518f933c676dd6d26e4f94d8b32a5f1786e
parent6f300c17296cc2fa717be1c9390b4f09c43d0b4c
Fix wake lock logic during Dream startup

Fixes a crash that would happen in all dreams
that did not have permission to acquire wake locks.
Instead moves the wake lock logic into the system
process. Also fixes a bug in DozeService where the
wake lock was not held until dozing was actually
properly initialized.

Fixes: 31612287
Bug: 31044352
Related-CL: I85955a2b7d6bad5171accbc336117a9660b1b198
Test: adb shell settings put secure screensaver_components com.android.dreams.basic/.Colors; adb shell service call dreams 1

Change-Id: Idb3f921ee71b6da6c2ab0c44c332ef91f93ddbc0
core/java/android/service/dreams/DreamService.java
core/java/android/service/dreams/IDreamService.aidl
packages/SystemUI/src/com/android/systemui/doze/DozeService.java
services/core/java/com/android/server/dreams/DreamController.java