Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a9c5868 authored by kxh's avatar kxh Committed by Haiping Yang
Browse files

Add tiltToWake to wake reasons and frameworks log.

Bug: 118177017
Test: manual

Change-Id: I07008c4554ebebd72c4a5e6b6e97d9399579affd
parent aca85d41
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -567,7 +567,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{}
@@ -679,6 +680,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
@@ -699,6 +706,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);
        }
    }