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

Commit 1e34a1be authored by Robyn Coultas's avatar Robyn Coultas Committed by Isaac Katzenelson
Browse files

Always log the alarm time

Bug: 7579100
Bug: 7634943

Intentionally verbose to provide useful information in bug reports.
Tuned format of alarm time to include day of week

Change-Id: I54fb5ee75c28868adf98c0d9d1f3fb25f55a6af6
parent 68898395
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -426,9 +426,9 @@ public class Alarms {
        AlarmManager am = (AlarmManager)
                context.getSystemService(Context.ALARM_SERVICE);

        if (Log.LOGV) {
            Log.v("** setAlert id " + alarm.id + " atTime " + atTimeInMillis);
        }
        // Intentionally verbose: always log the alarm time to provide useful
        // information in bug reports.
        Log.v("Alarm set for id=" + alarm.id + " " + Log.formatTime(atTimeInMillis));

        Intent intent = new Intent(ALARM_ALERT_ACTION);

@@ -472,6 +472,9 @@ public class Alarms {
                PendingIntent.FLAG_CANCEL_CURRENT);
        am.cancel(sender);
        setStatusBarIcon(context, false);
        // Intentionally verbose: always log the lack of a next alarm to provide useful
        // information in bug reports.
        Log.v("No next alarm");
        saveNextAlarm(context, "");
    }

+1 −1
Original line number Diff line number Diff line
@@ -55,6 +55,6 @@ public class Log {
    }

    public static String formatTime(long millis) {
        return new SimpleDateFormat("HH:mm:ss.SSS aaa").format(new Date(millis));
        return new SimpleDateFormat("HH:mm:ss.SSS/E").format(new Date(millis));
    }
}