Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +1 −1 Original line number Diff line number Diff line Loading @@ -884,7 +884,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab Assert.isMainThread(); if (mWakeOnFingerprintAcquiredStart && acquireInfo == FINGERPRINT_ACQUIRED_START) { mPowerManager.wakeUp( SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_BIOMETRIC, "com.android.systemui.keyguard:FINGERPRINT_ACQUIRED_START"); } for (int i = 0; i < mCallbacks.size(); i++) { Loading packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +26 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,14 @@ package com.android.systemui.doze; import static android.os.PowerManager.WAKE_REASON_BIOMETRIC; import static android.os.PowerManager.WAKE_REASON_GESTURE; import static android.os.PowerManager.WAKE_REASON_LIFT; import static android.os.PowerManager.WAKE_REASON_PLUGGED_IN; import static android.os.PowerManager.WAKE_REASON_TAP; import android.annotation.IntDef; import android.os.PowerManager; import android.util.TimeUtils; import androidx.annotation.NonNull; Loading Loading @@ -511,6 +518,25 @@ public class DozeLog implements Dumpable { } } /** * Converts {@link Reason} to {@link PowerManager.WakeReason}. */ public static @PowerManager.WakeReason int getPowerManagerWakeReason(@Reason int wakeReason) { switch (wakeReason) { case REASON_SENSOR_DOUBLE_TAP: case REASON_SENSOR_TAP: return WAKE_REASON_TAP; case REASON_SENSOR_PICKUP: return WAKE_REASON_LIFT; case REASON_SENSOR_UDFPS_LONG_PRESS: return WAKE_REASON_BIOMETRIC; case PULSE_REASON_DOCKING: return WAKE_REASON_PLUGGED_IN; default: return WAKE_REASON_GESTURE; } } @Retention(RetentionPolicy.SOURCE) @IntDef({PULSE_REASON_NONE, PULSE_REASON_INTENT, PULSE_REASON_NOTIFICATION, PULSE_REASON_SENSOR_SIGMOTION, REASON_SENSOR_PICKUP, REASON_SENSOR_DOUBLE_TAP, Loading packages/SystemUI/src/com/android/systemui/doze/DozeService.java +2 −2 Original line number Diff line number Diff line Loading @@ -116,8 +116,8 @@ public class DozeService extends DreamService @Override public void requestWakeUp(@DozeLog.Reason int reason) { PowerManager pm = getSystemService(PowerManager.class); pm.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, final PowerManager pm = getSystemService(PowerManager.class); pm.wakeUp(SystemClock.uptimeMillis(), DozeLog.getPowerManagerWakeReason(reason), "com.android.systemui:NODOZE " + DozeLog.reasonToString(reason)); } Loading packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +4 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.shade; import android.app.StatusBarManager; import android.media.AudioManager; import android.media.session.MediaSessionLegacyHelper; import android.os.PowerManager; import android.os.SystemClock; import android.util.Log; import android.view.GestureDetector; Loading Loading @@ -238,7 +239,9 @@ public class NotificationShadeWindowViewController { () -> mService.wakeUpIfDozing( SystemClock.uptimeMillis(), mView, "LOCK_ICON_TOUCH")); "LOCK_ICON_TOUCH", PowerManager.WAKE_REASON_GESTURE) ); // In case we start outside of the view bounds (below the status bar), we need to // dispatch Loading packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt +6 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.shade import android.hardware.display.AmbientDisplayConfiguration import android.os.PowerManager import android.os.SystemClock import android.os.UserHandle import android.provider.Settings Loading Loading @@ -89,7 +90,8 @@ class PulsingGestureListener @Inject constructor( centralSurfaces.wakeUpIfDozing( SystemClock.uptimeMillis(), notificationShadeWindowView, "PULSING_SINGLE_TAP" "PULSING_SINGLE_TAP", PowerManager.WAKE_REASON_TAP ) } return true Loading @@ -114,7 +116,9 @@ class PulsingGestureListener @Inject constructor( centralSurfaces.wakeUpIfDozing( SystemClock.uptimeMillis(), notificationShadeWindowView, "PULSING_DOUBLE_TAP") "PULSING_DOUBLE_TAP", PowerManager.WAKE_REASON_TAP ) return true } return false Loading Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +1 −1 Original line number Diff line number Diff line Loading @@ -884,7 +884,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab Assert.isMainThread(); if (mWakeOnFingerprintAcquiredStart && acquireInfo == FINGERPRINT_ACQUIRED_START) { mPowerManager.wakeUp( SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_BIOMETRIC, "com.android.systemui.keyguard:FINGERPRINT_ACQUIRED_START"); } for (int i = 0; i < mCallbacks.size(); i++) { Loading
packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +26 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,14 @@ package com.android.systemui.doze; import static android.os.PowerManager.WAKE_REASON_BIOMETRIC; import static android.os.PowerManager.WAKE_REASON_GESTURE; import static android.os.PowerManager.WAKE_REASON_LIFT; import static android.os.PowerManager.WAKE_REASON_PLUGGED_IN; import static android.os.PowerManager.WAKE_REASON_TAP; import android.annotation.IntDef; import android.os.PowerManager; import android.util.TimeUtils; import androidx.annotation.NonNull; Loading Loading @@ -511,6 +518,25 @@ public class DozeLog implements Dumpable { } } /** * Converts {@link Reason} to {@link PowerManager.WakeReason}. */ public static @PowerManager.WakeReason int getPowerManagerWakeReason(@Reason int wakeReason) { switch (wakeReason) { case REASON_SENSOR_DOUBLE_TAP: case REASON_SENSOR_TAP: return WAKE_REASON_TAP; case REASON_SENSOR_PICKUP: return WAKE_REASON_LIFT; case REASON_SENSOR_UDFPS_LONG_PRESS: return WAKE_REASON_BIOMETRIC; case PULSE_REASON_DOCKING: return WAKE_REASON_PLUGGED_IN; default: return WAKE_REASON_GESTURE; } } @Retention(RetentionPolicy.SOURCE) @IntDef({PULSE_REASON_NONE, PULSE_REASON_INTENT, PULSE_REASON_NOTIFICATION, PULSE_REASON_SENSOR_SIGMOTION, REASON_SENSOR_PICKUP, REASON_SENSOR_DOUBLE_TAP, Loading
packages/SystemUI/src/com/android/systemui/doze/DozeService.java +2 −2 Original line number Diff line number Diff line Loading @@ -116,8 +116,8 @@ public class DozeService extends DreamService @Override public void requestWakeUp(@DozeLog.Reason int reason) { PowerManager pm = getSystemService(PowerManager.class); pm.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_GESTURE, final PowerManager pm = getSystemService(PowerManager.class); pm.wakeUp(SystemClock.uptimeMillis(), DozeLog.getPowerManagerWakeReason(reason), "com.android.systemui:NODOZE " + DozeLog.reasonToString(reason)); } Loading
packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +4 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.shade; import android.app.StatusBarManager; import android.media.AudioManager; import android.media.session.MediaSessionLegacyHelper; import android.os.PowerManager; import android.os.SystemClock; import android.util.Log; import android.view.GestureDetector; Loading Loading @@ -238,7 +239,9 @@ public class NotificationShadeWindowViewController { () -> mService.wakeUpIfDozing( SystemClock.uptimeMillis(), mView, "LOCK_ICON_TOUCH")); "LOCK_ICON_TOUCH", PowerManager.WAKE_REASON_GESTURE) ); // In case we start outside of the view bounds (below the status bar), we need to // dispatch Loading
packages/SystemUI/src/com/android/systemui/shade/PulsingGestureListener.kt +6 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.shade import android.hardware.display.AmbientDisplayConfiguration import android.os.PowerManager import android.os.SystemClock import android.os.UserHandle import android.provider.Settings Loading Loading @@ -89,7 +90,8 @@ class PulsingGestureListener @Inject constructor( centralSurfaces.wakeUpIfDozing( SystemClock.uptimeMillis(), notificationShadeWindowView, "PULSING_SINGLE_TAP" "PULSING_SINGLE_TAP", PowerManager.WAKE_REASON_TAP ) } return true Loading @@ -114,7 +116,9 @@ class PulsingGestureListener @Inject constructor( centralSurfaces.wakeUpIfDozing( SystemClock.uptimeMillis(), notificationShadeWindowView, "PULSING_DOUBLE_TAP") "PULSING_DOUBLE_TAP", PowerManager.WAKE_REASON_TAP ) return true } return false Loading