summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/notification/ConditionProviders.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/notification/ConditionProviders.java b/services/core/java/com/android/server/notification/ConditionProviders.java
index 007032e..dbfb1cf 100644
--- a/services/core/java/com/android/server/notification/ConditionProviders.java
+++ b/services/core/java/com/android/server/notification/ConditionProviders.java
@@ -88,6 +88,8 @@ public class ConditionProviders extends ManagedServices {
for (int i = 0; i < mRecords.size(); i++) {
pw.print(" "); pw.println(mRecords.get(i));
}
+ pw.print(" mCountdownHelper: ");
+ pw.println(mCountdownHelper.getCurrentConditionDescription());
}
}
@@ -474,6 +476,16 @@ public class ConditionProviders extends ManagedServices {
}
}
+ public String getCurrentConditionDescription() {
+ if (mCurrent == 0) return null;
+ final long time = mCurrent;
+ final long now = System.currentTimeMillis();
+ final CharSequence span =
+ DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS);
+ return String.format("Scheduled for %s, %s in the future (%s), now=%s",
+ ts(time), time - now, span, ts(now));
+ }
+
private String ts(long time) {
return new Date(time) + " (" + time + ")";
}