MetricStyle: Use Chronometer for paused durations, too
Formatting and rounding is slightly different between toValueString() and Chronometer's rendering; writing that code was a fun exercise but there's little point in trying to keep them in sync. For this, added a setPausedDuration() method in Chronometer. Although in many cases this can be achieved simply by calling setBase with the proper offset, that doesn't really work in the RemoteViews scenario where a long time can elapse between creating the RemoteViews and applying it. My previous CL also had an incorrect fall-through in the proto-related methods for Instant (oops) so fixed it and added unit tests. Fixes: 438186501 Test: atest NotificationMetricStyleTest RemoteViewsTest RemoteViewsSerializerTest ChronometerTest Flag: android.app.api_metric_style Change-Id: I17745a0f299c45862ec50374722ce52daa039d46
Loading
Please register or sign in to comment