Merge "Add tiltToWake to wake reasons and frameworks log. Bug: 118177017 Test: manual"

This commit is contained in:
TreeHugger Robot
2022-07-14 19:06:59 +00:00
committed by Android (Google) Code Review

View File

@@ -571,7 +571,8 @@ public final class PowerManager {
WAKE_REASON_DISPLAY_GROUP_ADDED,
WAKE_REASON_DISPLAY_GROUP_TURNED_ON,
WAKE_REASON_UNFOLD_DEVICE,
WAKE_REASON_DREAM_FINISHED
WAKE_REASON_DREAM_FINISHED,
WAKE_REASON_TILT
})
@Retention(RetentionPolicy.SOURCE)
public @interface WakeReason{}
@@ -685,6 +686,12 @@ public final class PowerManager {
*/
public static final int WAKE_REASON_DREAM_FINISHED = 13;
/**
* Wake up reason code: Waking due to tilt.
* @hide
*/
public static final int WAKE_REASON_TILT = 14;
/**
* Convert the wake reason to a string for debugging purposes.
* @hide
@@ -705,6 +712,7 @@ public final class PowerManager {
case WAKE_REASON_DISPLAY_GROUP_TURNED_ON: return "WAKE_REASON_DISPLAY_GROUP_TURNED_ON";
case WAKE_REASON_UNFOLD_DEVICE: return "WAKE_REASON_UNFOLD_DEVICE";
case WAKE_REASON_DREAM_FINISHED: return "WAKE_REASON_DREAM_FINISHED";
case WAKE_REASON_TILT: return "WAKE_REASON_TILT";
default: return Integer.toString(wakeReason);
}
}