Home
last modified time | relevance | path

Searched refs:hours (Results 1 – 25 of 33) sorted by relevance

12

/packages/apps/DeskClock/src/com/android/deskclock/data/
DTimerStringFormatter.java42 final int hours; in formatTimeRemaining() local
53 hours = roundedHours; in formatTimeRemaining()
56 hours = roundedHours; in formatTimeRemaining()
61 hours = roundedHours; in formatTimeRemaining()
67 hours = roundedHours; in formatTimeRemaining()
72 final String hourSeq = Utils.getNumberFormattedQuantityString(context, R.plurals.hours, in formatTimeRemaining()
73 hours); in formatTimeRemaining()
78 final String remainingSuffix = context.getString((minutes > 1 || hours > 1 || seconds > 1) in formatTimeRemaining()
82 final boolean showHours = hours > 0; in formatTimeRemaining()
DTimerStringFormatter.kt44 val hours: Int in formatTimeRemaining() constant
55 hours = roundedHours in formatTimeRemaining()
58 hours = roundedHours in formatTimeRemaining()
63 hours = roundedHours in formatTimeRemaining()
69 hours = roundedHours in formatTimeRemaining()
73 val hourSeq = Utils.getNumberFormattedQuantityString(context, R.plurals.hours, hours) in formatTimeRemaining()
78 context.getString(if (minutes > 1 || hours > 1 || seconds > 1) { in formatTimeRemaining()
84 val showHours = hours > 0 in formatTimeRemaining()
/packages/apps/DeskClock/src/com/android/deskclock/
DAlarmUtils.java76 int hours = (int) delta / (1000 * 60 * 60); in formatElapsedTimeUntilAlarm() local
78 final int days = hours / 24; in formatElapsedTimeUntilAlarm()
79 hours = hours % 24; in formatElapsedTimeUntilAlarm()
83 String hourSeq = Utils.getNumberFormattedQuantityString(context, R.plurals.hours, hours); in formatElapsedTimeUntilAlarm()
86 final boolean showHours = hours > 0; in formatElapsedTimeUntilAlarm()
DAlarmUtils.kt79 var hours = variableDelta.toInt() / (1000 * 60 * 60) in formatElapsedTimeUntilAlarm() variable
81 val days = hours / 24 in formatElapsedTimeUntilAlarm()
82 hours %= 24 in formatElapsedTimeUntilAlarm()
86 val hourSeq = Utils.getNumberFormattedQuantityString(context, R.plurals.hours, hours) in formatElapsedTimeUntilAlarm()
89 val showHours = hours > 0 in formatElapsedTimeUntilAlarm()
DTimerTextController.java43 int hours = (int) (remainingTime / HOUR_IN_MILLIS); in setTimeString() local
60 hours++; in setTimeString()
65 String time = Utils.getTimeString(mTextView.getContext(), hours, minutes, seconds); in setTimeString()
66 if (isNegative && !(hours == 0 && minutes == 0 && seconds == 0)) { in setTimeString()
DStopwatchTextController.java50 final int hours = (int) (accumulatedTime / HOUR_IN_MILLIS); in setTimeString() local
66 final String time = Utils.getTimeString(context, hours, minutes, seconds); in setTimeString()
DUtils.java580 context, R.plurals.hours, Math.abs(hoursDifferent)); in createHoursDifferentString()
598 static String getTimeString(Context context, int hours, int minutes, int seconds) { in getTimeString() argument
599 if (hours != 0) { in getTimeString()
600 return context.getString(R.string.hours_minutes_seconds, hours, minutes, seconds); in getTimeString()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/avrcpcontroller/bip/
DBipDatetimeTest.java36 private Date makeDate(int month, int day, int year, int hours, int min, int sec, TimeZone tz) { in makeDate() argument
41 builder.setTimeOfDay(hours, min, sec, 0); in makeDate()
46 private Date makeDate(int month, int day, int year, int hours, int min, int sec) { in makeDate() argument
47 return makeDate(month, day, year, hours, min, sec, null); in makeDate()
50 private String makeTzAdjustedString(int month, int day, int year, int hours, int min, in makeTzAdjustedString() argument
53 cal.setTime(makeDate(month, day, year, hours, min, sec)); in makeTzAdjustedString()
DBipAttachmentFormatTest.java35 private Date makeDate(int month, int day, int year, int hours, int min, int sec, TimeZone tz) { in makeDate() argument
40 builder.setTimeOfDay(hours, min, sec, 0); in makeDate()
45 private Date makeDate(int month, int day, int year, int hours, int min, int sec) { in makeDate() argument
46 return makeDate(month, day, year, hours, min, sec, null); in makeDate()
/packages/apps/DeskClock/tests/src/com/android/deskclock/timer/
DTimerSetupViewTest.java266 private void assertHasValue(int hours, int minutes, int seconds) { in assertHasValue() argument
268 hours * HOUR_IN_MILLIS + minutes * MINUTE_IN_MILLIS + seconds * SECOND_IN_MILLIS; in assertHasValue()
269 assertStateEquals(hours, minutes, seconds); in assertHasValue()
274 String.format(Locale.US, "%02dh %02dm %02ds", hours, minutes, seconds); in assertHasValue()
296 private void assertStateEquals(int hours, int minutes, int seconds) { in assertStateEquals() argument
298 seconds % 10, seconds / 10, minutes % 10, minutes / 10, hours % 10, hours / 10 in assertStateEquals()
/packages/apps/DeskClock/src/com/android/deskclock/timer/
DTimerSetupView.java207 final int hours = mInput[5] * 10 + mInput[4]; in updateTime() local
211 uidm.getFormattedNumber(hours, 2), in updateTime()
217 r.getQuantityString(R.plurals.hours, hours, hours), in updateTime()
308 final int hours = mInput[5] * 10 + mInput[4]; in getTimeInMillis() local
311 + hours * DateUtils.HOUR_IN_MILLIS; in getTimeInMillis()
DTimerSetupView.kt182 val hours = mInput[5] * 10 + mInput[4] in updateTime() constant
186 uidm.getFormattedNumber(hours, 2), in updateTime()
192 r.getQuantityString(R.plurals.hours, hours, hours), in updateTime()
282 val hours = mInput[5] * 10 + mInput[4] constant
285 hours * DateUtils.HOUR_IN_MILLIS
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/views/
DDigitalWellBeingToast.java145 int hours = Math.toIntExact(duration.toHours()); in getReadableDuration() local
146 int minutes = Math.toIntExact(duration.minusHours(hours).toMinutes()); in getReadableDuration()
149 if (hours > 0 && minutes > 0) { in getReadableDuration()
152 new Measure(hours, MeasureUnit.HOUR), in getReadableDuration()
157 if (hours > 0) { in getReadableDuration()
161 .formatMeasures(new Measure(hours, MeasureUnit.HOUR)); in getReadableDuration()
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/
DLapsAdapter.java242 final int hours, minutes, seconds, hundredths; in formatTime() local
245 hours = minutes = seconds = hundredths = 0; in formatTime()
247 hours = (int) (time / DateUtils.HOUR_IN_MILLIS); in formatTime()
269 sTimeBuilder.append(UiDataModel.getUiDataModel().getFormattedNumber(hours, 1)); in formatTime()
273 sTimeBuilder.append(UiDataModel.getUiDataModel().getFormattedNumber(hours, 2)); in formatTime()
277 sTimeBuilder.append(UiDataModel.getUiDataModel().getFormattedNumber(hours, 3)); in formatTime()
DLapsAdapter.kt302 val hours: Int in formatTime() constant
311 hours = minutes in formatTime()
313 hours = (time / DateUtils.HOUR_IN_MILLIS).toInt() in formatTime()
335 sTimeBuilder.append(UiDataModel.uiDataModel.getFormattedNumber(hours, 1)) in formatTime()
340 sTimeBuilder.append(UiDataModel.uiDataModel.getFormattedNumber(hours, 2)) in formatTime()
345 sTimeBuilder.append(UiDataModel.uiDataModel.getFormattedNumber(hours, 3)) in formatTime()
/packages/services/Car/tests/DefaultStorageMonitoringCompanionApp/src/com/google/android/car/defaultstoragemonitoringcompanionapp/
DMainActivity.java63 final long hours = duration.toHours();
64 duration = duration.minusHours(hours);
73 final String daysHours = durationPairToString(days, "days", hours, "hours");
75 final String hoursMinutes = durationPairToString(hours, "hours", minutes, "minutes");
/packages/apps/Settings/src/com/android/settings/notification/
DZenModeDurationPreferenceController.java54 int hours = zenDuration / 60; in getSummary() local
56 R.plurals.zen_mode_duration_summary_time_hours, hours, hours); in getSummary()
DZenModeVoiceActivity.java121 int hours = minutes / 60; in getChangeSummary() local
122 return res.getQuantityString(byHour, hours, hours, formattedTime); in getChangeSummary()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DZenModeDurationPreferenceController.java54 int hours = zenDuration / 60; in getSummary() local
56 R.plurals.zen_mode_duration_summary_time_hours, hours, hours); in getSummary()
DZenModeVoiceActivity.java121 int hours = minutes / 60; in getChangeSummary() local
122 return res.getQuantityString(byHour, hours, hours, formattedTime); in getChangeSummary()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DTimeBar.java254 int hours = totalSeconds / 3600; in stringForTime() local
255 if (hours > 0) { in stringForTime()
256 return String.format("%d:%02d:%02d", hours, minutes, seconds).toString(); in stringForTime()
/packages/apps/Car/Cluster/src/android/car/cluster/
DNavStateController.java164 long hours = (seconds / 3600) % 24; in formatEta() local
168 return String.format("%d d %d hr", days, hours); in formatEta()
169 } else if (hours > 0) { in formatEta()
170 return String.format("%d hr %d min", hours, minutes); in formatEta()
/packages/apps/DocumentsUI/src/com/android/documentsui/util/
DFormatUtils.java47 final int hours = in formatDuration() local
49 return formatter.format(new Measure(hours, MeasureUnit.HOUR)); in formatDuration()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/utils/
DUtils.java608 long hours = minutes / 60; in getTimeDiffStr() local
609 if (hours < 24) { in getTimeDiffStr()
610 return context.getResources().getQuantityString(R.plurals.hours, (int) hours, hours); in getTimeDiffStr()
612 long days = hours / 24; in getTimeDiffStr()
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/playback/
DPlaybackProgress.java77 long hours = TimeUnit.MILLISECONDS.toHours(millis); in formatTime() local
81 return String.format("%d:%02d:%02d", hours, minutes, seconds); in formatTime()

12