diff options
author | 2016-05-19 20:49:24 +0000 | |
---|---|---|
committer | 2016-05-19 20:49:24 +0000 | |
commit | e9b32c77f88a2acb7e7e23fbd14f6b4f373cba0b (patch) | |
tree | bb3bbe5f1436a06398dd63926ff0b2d418a8af0e | |
parent | b521c107ede317e32c139f38209d39eba8dbf35b (diff) | |
parent | 2486cb2c8978003d2b5cfa7e8169019421582cb0 (diff) |
Merge "Fixed a bug where the chronometer was invisible" into nyc-dev
am: 2486cb2c89
* commit '2486cb2c8978003d2b5cfa7e8169019421582cb0':
Fixed a bug where the chronometer was invisible
Change-Id: I8caf83fdb4a27e477e644123d349bc4951eda0dd
-rw-r--r-- | core/java/android/app/Notification.java | 15 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index a666e664acba..bd94a17de402 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -3369,7 +3369,7 @@ public class Notification implements Parcelable * otherwise */ private boolean showsTimeOrChronometer() { - return mN.showsTimeOrChronometer(); + return mN.showsTime() || mN.showsChronometer(); } private void resetStandardTemplateWithActions(RemoteViews big) { @@ -3865,15 +3865,22 @@ public class Notification implements Parcelable } /** - * @return true if the notification will show the time or the chronometer; false - * otherwise + * @return true if the notification will show the time; false otherwise * @hide */ - public boolean showsTimeOrChronometer() { + public boolean showsTime() { return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN); } /** + * @return true if the notification will show a chronometer; false otherwise + * @hide + */ + public boolean showsChronometer() { + return when != 0 && extras.getBoolean(EXTRA_SHOW_CHRONOMETER); + } + + /** * An object that can apply a rich notification style to a {@link Notification.Builder} * object. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java index 3363993dd289..7575dc8157b6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java @@ -198,7 +198,7 @@ public class NotificationHeaderUtil { } // in case no view is visible we make sure the time is visible int timeVisibility = !hasVisibleText - || mRow.getStatusBarNotification().getNotification().showsTimeOrChronometer() + || mRow.getStatusBarNotification().getNotification().showsTime() ? View.VISIBLE : View.GONE; time.setVisibility(timeVisibility); View left = null; |