Add logging when attempting to dream from power press.

Added a log statement to the logic that attempts to dream from a short
power press in order to identify black screen situations caused by an
inability to start dreaming (likely because the system thinks it is
already dreaming).

Bug: 282191629
Test: manually by pushing the power button when the device is already
dreaming and seeing that the log statement is emitted.

Change-Id: I2b18715677ba14c82694adf7480cbed1e8862231
This commit is contained in:
Will Leshner
2023-05-12 17:10:34 -07:00
parent 7cc9a4bbc1
commit 6caf1efe36

View File

@@ -1086,6 +1086,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final DreamManagerInternal dreamManagerInternal = getDreamManagerInternal();
if (dreamManagerInternal == null || !dreamManagerInternal.canStartDreaming(isScreenOn)) {
Slog.d(TAG, "Can't start dreaming when attempting to dream from short power"
+ " press (isScreenOn=" + isScreenOn + ")");
noDreamAction.run();
return;
}