Loading packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +5 −3 Original line number Diff line number Diff line Loading @@ -57,8 +57,9 @@ public class DozeLog { private static SummaryStats sEmergencyCallStats; private static SummaryStats[][] sProxStats; // [reason][near/far] public static void tracePickupPulse(boolean withinVibrationThreshold) { public static void tracePickupPulse(Context context, boolean withinVibrationThreshold) { if (!ENABLED) return; init(context); log("pickupPulse withinVibrationThreshold=" + withinVibrationThreshold); (withinVibrationThreshold ? sPickupPulseNearVibrationStats : sPickupPulseNotNearVibrationStats).append(); Loading @@ -76,8 +77,9 @@ public class DozeLog { log("pulseFinish"); } public static void traceNotificationPulse(long instance) { public static void traceNotificationPulse(Context context, long instance) { if (!ENABLED) return; init(context); log("notificationPulse instance=" + instance); sNotificationPulseStats.append(); } Loading Loading @@ -153,9 +155,9 @@ public class DozeLog { public static void traceProximityResult(Context context, boolean near, long millis, int pulseReason) { if (!ENABLED) return; init(context); log("proximityResult reason=" + pulseReasonToString(pulseReason) + " near=" + near + " millis=" + millis); init(context); sProxStats[pulseReason][near ? 0 : 1].append(); } Loading packages/SystemUI/src/com/android/systemui/doze/DozeService.java +3 −3 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ public class DozeService extends DreamService { if (DEBUG) Log.d(mTag, "mScheduleResetsRemaining = " + mScheduleResetsRemaining); mNotificationPulseTime = notificationTimeMs; if (pulseImmediately) { DozeLog.traceNotificationPulse(0); DozeLog.traceNotificationPulse(mContext, 0); requestPulse(DozeLog.PULSE_REASON_NOTIFICATION); } // schedule the rest of the pulses Loading Loading @@ -442,7 +442,7 @@ public class DozeService extends DreamService { if (NOTIFICATION_PULSE_ACTION.equals(intent.getAction())) { final long instance = intent.getLongExtra(EXTRA_INSTANCE, -1); if (DEBUG) Log.d(mTag, "Received notification pulse intent instance=" + instance); DozeLog.traceNotificationPulse(instance); DozeLog.traceNotificationPulse(mContext, instance); requestPulse(DozeLog.PULSE_REASON_NOTIFICATION); rescheduleNotificationPulse(mNotificationLightOn); } Loading Loading @@ -576,7 +576,7 @@ public class DozeService extends DreamService { resetNotificationResets(); } if (mSensor.getType() == Sensor.TYPE_PICK_UP_GESTURE) { DozeLog.tracePickupPulse(withinVibrationThreshold); DozeLog.tracePickupPulse(mContext, withinVibrationThreshold); } } finally { mWakeLock.release(); Loading Loading
packages/SystemUI/src/com/android/systemui/doze/DozeLog.java +5 −3 Original line number Diff line number Diff line Loading @@ -57,8 +57,9 @@ public class DozeLog { private static SummaryStats sEmergencyCallStats; private static SummaryStats[][] sProxStats; // [reason][near/far] public static void tracePickupPulse(boolean withinVibrationThreshold) { public static void tracePickupPulse(Context context, boolean withinVibrationThreshold) { if (!ENABLED) return; init(context); log("pickupPulse withinVibrationThreshold=" + withinVibrationThreshold); (withinVibrationThreshold ? sPickupPulseNearVibrationStats : sPickupPulseNotNearVibrationStats).append(); Loading @@ -76,8 +77,9 @@ public class DozeLog { log("pulseFinish"); } public static void traceNotificationPulse(long instance) { public static void traceNotificationPulse(Context context, long instance) { if (!ENABLED) return; init(context); log("notificationPulse instance=" + instance); sNotificationPulseStats.append(); } Loading Loading @@ -153,9 +155,9 @@ public class DozeLog { public static void traceProximityResult(Context context, boolean near, long millis, int pulseReason) { if (!ENABLED) return; init(context); log("proximityResult reason=" + pulseReasonToString(pulseReason) + " near=" + near + " millis=" + millis); init(context); sProxStats[pulseReason][near ? 0 : 1].append(); } Loading
packages/SystemUI/src/com/android/systemui/doze/DozeService.java +3 −3 Original line number Diff line number Diff line Loading @@ -373,7 +373,7 @@ public class DozeService extends DreamService { if (DEBUG) Log.d(mTag, "mScheduleResetsRemaining = " + mScheduleResetsRemaining); mNotificationPulseTime = notificationTimeMs; if (pulseImmediately) { DozeLog.traceNotificationPulse(0); DozeLog.traceNotificationPulse(mContext, 0); requestPulse(DozeLog.PULSE_REASON_NOTIFICATION); } // schedule the rest of the pulses Loading Loading @@ -442,7 +442,7 @@ public class DozeService extends DreamService { if (NOTIFICATION_PULSE_ACTION.equals(intent.getAction())) { final long instance = intent.getLongExtra(EXTRA_INSTANCE, -1); if (DEBUG) Log.d(mTag, "Received notification pulse intent instance=" + instance); DozeLog.traceNotificationPulse(instance); DozeLog.traceNotificationPulse(mContext, instance); requestPulse(DozeLog.PULSE_REASON_NOTIFICATION); rescheduleNotificationPulse(mNotificationLightOn); } Loading Loading @@ -576,7 +576,7 @@ public class DozeService extends DreamService { resetNotificationResets(); } if (mSensor.getType() == Sensor.TYPE_PICK_UP_GESTURE) { DozeLog.tracePickupPulse(withinVibrationThreshold); DozeLog.tracePickupPulse(mContext, withinVibrationThreshold); } } finally { mWakeLock.release(); Loading