Merge "Add additional PowerManager wakeup reasons" into tm-qpr-dev
This commit is contained in:
@@ -608,7 +608,10 @@ public final class PowerManager {
|
|||||||
WAKE_REASON_DISPLAY_GROUP_ADDED,
|
WAKE_REASON_DISPLAY_GROUP_ADDED,
|
||||||
WAKE_REASON_DISPLAY_GROUP_TURNED_ON,
|
WAKE_REASON_DISPLAY_GROUP_TURNED_ON,
|
||||||
WAKE_REASON_UNFOLD_DEVICE,
|
WAKE_REASON_UNFOLD_DEVICE,
|
||||||
WAKE_REASON_DREAM_FINISHED
|
WAKE_REASON_DREAM_FINISHED,
|
||||||
|
WAKE_REASON_TAP,
|
||||||
|
WAKE_REASON_LIFT,
|
||||||
|
WAKE_REASON_BIOMETRIC,
|
||||||
})
|
})
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface WakeReason{}
|
public @interface WakeReason{}
|
||||||
@@ -660,8 +663,9 @@ public final class PowerManager {
|
|||||||
public static final int WAKE_REASON_PLUGGED_IN = 3;
|
public static final int WAKE_REASON_PLUGGED_IN = 3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wake up reason code: Waking up due to a user performed gesture (e.g. double tapping on the
|
* Wake up reason code: Waking up due to a user performed gesture. This includes user
|
||||||
* screen).
|
* interactions with UI on the screen such as the notification shade. This does not include
|
||||||
|
* {@link WAKE_REASON_TAP} or {@link WAKE_REASON_LIFT}.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public static final int WAKE_REASON_GESTURE = 4;
|
public static final int WAKE_REASON_GESTURE = 4;
|
||||||
@@ -722,6 +726,26 @@ public final class PowerManager {
|
|||||||
*/
|
*/
|
||||||
public static final int WAKE_REASON_DREAM_FINISHED = 13;
|
public static final int WAKE_REASON_DREAM_FINISHED = 13;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wake up reason code: Waking up due to the user single or double tapping on the screen. This
|
||||||
|
* wake reason is used when the user is not tapping on a specific UI element; rather, the device
|
||||||
|
* wakes up due to a generic tap on the screen.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int WAKE_REASON_TAP = 15;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wake up reason code: Waking up due to a user performed lift gesture.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int WAKE_REASON_LIFT = 16;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wake up reason code: Waking up due to a user interacting with a biometric.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int WAKE_REASON_BIOMETRIC = 17;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the wake reason to a string for debugging purposes.
|
* Convert the wake reason to a string for debugging purposes.
|
||||||
* @hide
|
* @hide
|
||||||
@@ -742,6 +766,9 @@ public final class PowerManager {
|
|||||||
case WAKE_REASON_DISPLAY_GROUP_TURNED_ON: return "WAKE_REASON_DISPLAY_GROUP_TURNED_ON";
|
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_UNFOLD_DEVICE: return "WAKE_REASON_UNFOLD_DEVICE";
|
||||||
case WAKE_REASON_DREAM_FINISHED: return "WAKE_REASON_DREAM_FINISHED";
|
case WAKE_REASON_DREAM_FINISHED: return "WAKE_REASON_DREAM_FINISHED";
|
||||||
|
case WAKE_REASON_TAP: return "WAKE_REASON_TAP";
|
||||||
|
case WAKE_REASON_LIFT: return "WAKE_REASON_LIFT";
|
||||||
|
case WAKE_REASON_BIOMETRIC: return "WAKE_REASON_BIOMETRIC";
|
||||||
default: return Integer.toString(wakeReason);
|
default: return Integer.toString(wakeReason);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user