Home
last modified time | relevance | path

Searched refs:duration (Results 1 – 25 of 606) sorted by relevance

12345678910>>...25

/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/ui/handheld/v31/
DDashboardUtilsTest.kt34 val duration: Long = TimeUnit.SECONDS.toMillis(1L) in getTimeDiffStr_durationSecondsOne() constant
35 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationSecondsOne()
41 val duration: Long = TimeUnit.SECONDS.toMillis(59L) in getTimeDiffStr_durationSecondsOther() constant
42 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationSecondsOther()
48 val duration: Long = TimeUnit.MINUTES.toMillis(1L) in getTimeDiffStr_durationMinutesOne() constant
49 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationMinutesOne()
55 val duration: Long = TimeUnit.MINUTES.toMillis(59L) in getTimeDiffStr_durationMinutesOther() constant
56 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationMinutesOther()
62 val duration: Long = TimeUnit.HOURS.toMillis(1L) in getTimeDiffStr_durationHoursOne() constant
63 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationHoursOne()
[all …]
/packages/modules/StatsD/statsd/src/metrics/duration_helper/
DMaxDurationTracker.cpp73 DurationInfo& duration = mInfos[key]; in noteStart() local
75 duration.conditionKeys = conditionKey; in noteStart()
79 switch (duration.state) { in noteStart()
81 duration.startCount++; in noteStart()
84 duration.startCount++; in noteStart()
89 duration.state = DurationState::kPaused; in noteStart()
91 duration.state = DurationState::kStarted; in noteStart()
92 duration.lastStartTime = eventTime; in noteStart()
95 duration.startCount = 1; in noteStart()
107 DurationInfo& duration = mInfos[key]; in noteStop() local
[all …]
/packages/apps/Messaging/src/com/android/messaging/sms/
DSmsReleaseStorage.java91 public static String getMessageRetainingDurationString(final Duration duration) { in getMessageRetainingDurationString() argument
93 switch (duration.mUnit) { in getMessageRetainingDurationString()
96 R.plurals.week_count, duration.mCount, duration.mCount); in getMessageRetainingDurationString()
99 R.plurals.month_count, duration.mCount, duration.mCount); in getMessageRetainingDurationString()
102 R.plurals.year_count, duration.mCount, duration.mCount); in getMessageRetainingDurationString()
105 "SmsAutoDelete: invalid duration unit " + duration.mUnit); in getMessageRetainingDurationString()
119 public static long durationToTimeInMillis(final Duration duration) { in durationToTimeInMillis() argument
120 switch (duration.mUnit) { in durationToTimeInMillis()
122 return duration.mCount * WEEK_IN_MILLIS; in durationToTimeInMillis()
124 return duration.mCount * MONTH_IN_MILLIS; in durationToTimeInMillis()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/model/
DItemTest.java63 final long duration = 1000; in testConstructor() local
65 duration, _SPECIAL_FORMAT_NONE); in testConstructor()
74 assertThat(item.getDuration()).isEqualTo(duration); in testConstructor()
90 final long duration = 1000; in testConstructor_differentUser() local
92 duration, _SPECIAL_FORMAT_NONE); in testConstructor_differentUser()
102 assertThat(item.getDuration()).isEqualTo(duration); in testConstructor_differentUser()
119 final long duration = 1000; in testIsImage() local
120 final Item item = generateItem(id, mimeType, dateTaken, generationModified, duration); in testIsImage()
135 final long duration = 1000; in testIsVideo() local
136 final Item item = generateItem(id, mimeType, dateTaken, generationModified, duration); in testIsVideo()
[all …]
/packages/modules/GeoTZ/locationtzprovider/src/test/java/com/android/timezone/location/provider/core/
DOfflineLocationTimeZoneDelegateTest.java107 activeInstruction.listenMode, activeInstruction.duration); in locationFoundImmediately()
112 assertTrue(activeInstruction.duration.compareTo(timeUntilLocationFound) > 0); in locationFoundImmediately()
124 Duration maximumReturned = activeInstruction.duration.minus(timeUntilLocationFound); in locationFoundImmediately()
130 passiveInstruction.listenMode, passiveInstruction.duration); in locationFoundImmediately()
160 activeInstruction.listenMode, activeInstruction.duration); in locationNotFoundImmediately()
163 mTestEnvironment.simulateTimePassing(activeInstruction.duration) in locationNotFoundImmediately()
169 assertTrue(activeInstruction.duration.compareTo(initializationTimeout) < 0); in locationNotFoundImmediately()
174 passiveInstruction.listenMode, passiveInstruction.duration); in locationNotFoundImmediately()
219 activeInstruction.listenMode, activeInstruction.duration);
256 activeInstruction.listenMode, activeInstruction.duration);
[all …]
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DSleepSessionFormatter.kt67 return formatSleepSession(record) { duration -> formatDurationShort(context, duration) } in <lambda>() method
72 return formatSleepSession(record) { duration -> formatDurationLong(context, duration) } in <lambda>() method
89 formatDuration: (duration: Duration) -> String in <lambda>()
94 val duration = Duration.between(record.startTime, record.endTime) in <lambda>() constant
95 context.getString(R.string.sleep_session_default, formatDuration(duration)) in <lambda>()
109 title = formatStageType(stage) { duration -> formatDurationShort(context, duration) }, in <lambda>() method
111 formatStageType(stage) { duration -> formatDurationLong(context, duration) }, in <lambda>() method
117 formatDuration: (duration: Duration) -> String in <lambda>()
134 val duration = Duration.between(stage.startTime, stage.endTime) in <lambda>() constant
136 R.string.sleep_stage_default, formatDuration(duration), stageString) in <lambda>()
DDurationFormatter.kt32 fun formatDurationShort(context: Context, duration: Duration): String { in formatDurationShort()
33 val hours: Long = duration.toHours() in formatDurationShort()
34 val minutes: Long = duration.toMinutes() % 60 in formatDurationShort()
54 fun formatDurationLong(context: Context, duration: Duration): String { in formatDurationLong()
55 val hours = duration.toHours() in formatDurationLong()
56 val minutes = duration.toMinutes() % 60 in formatDurationLong()
80 fun formatDurationDaysOrHours(context: Context, duration: Duration): String { in formatDurationDaysOrHours()
81 val days = duration.toDays() in formatDurationDaysOrHours()
82 val hours = duration.toHours() % 24 in formatDurationDaysOrHours()
/packages/modules/GeoTZ/locationtzprovider/src/main/java/com/android/timezone/location/provider/core/
DLocationListeningAccountant.java77 public final Duration duration; field in LocationListeningAccountant.ListeningInstruction
79 public ListeningInstruction(@ListenModeEnum int listenMode, @NonNull Duration duration) { in ListeningInstruction() argument
81 this.duration = Objects.requireNonNull(duration); in ListeningInstruction()
94 && duration.equals(that.duration); in equals()
99 return Objects.hash(listenMode, duration); in hashCode()
106 + ", duration=" + duration in toString()
/packages/apps/TV/src/com/android/tv/data/
DWatchedHistoryManager.java192 public void logChannelViewStop(Channel channel, long endTime, long duration) { in logChannelViewStop() argument
193 if (duration < MIN_DURATION_MS) { in logChannelViewStop()
196 WatchedRecord record = new WatchedRecord(channel.getId(), endTime - duration, duration); in logChannelViewStop()
247 public final long duration; field in WatchedHistoryManager.WatchedRecord
249 WatchedRecord(long channelId, long watchedStartTime, long duration) { in WatchedRecord() argument
252 this.duration = duration; in WatchedRecord()
262 + duration; in toString()
271 && Objects.equals(duration, that.duration); in equals()
278 return Objects.hash(channelId, watchedStartTime, duration); in hashCode()
284 return record.channelId + " " + record.watchedStartTime + " " + record.duration; in encode()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mcp/
DMediaControlProfileTest.java104 mMockMetadata.duration = Long.toString(0); in setUp()
158 long duration = 10; in testGetCurrentTrackDuration() local
161 mMockMetadata.duration = Long.toString(duration); in testGetCurrentTrackDuration()
162 Assert.assertEquals(duration, mMediaControlProfile.getCurrentTrackDuration()); in testGetCurrentTrackDuration()
242 long duration = 10; in testOnCurrentPlayerStateUpdate() local
245 mMockMetadata.duration = Long.toString(duration); in testOnCurrentPlayerStateUpdate()
273 private void testHandleTrackPositionSetRequest(long position, long duration, int times) { in testHandleTrackPositionSetRequest() argument
279 else if (position > duration) { in testHandleTrackPositionSetRequest()
280 Assert.assertEquals(positionCaptor.getValue().longValue(), duration); in testHandleTrackPositionSetRequest() local
288 long duration = 50; in testHandleTrackPositionsSetRequest() local
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/
DTaskbarStashController.java587 private void createAnimToIsStashed(boolean isStashed, long duration, in createAnimToIsStashed() argument
608 .setDuration(duration)); in createAnimToIsStashed()
610 .setDuration(duration)); in createAnimToIsStashed()
613 .setDuration(duration)); in createAnimToIsStashed()
616 duration)); in createAnimToIsStashed()
626 createTransientAnimToIsStashed(mAnimator, isStashed, duration, animationType); in createAnimToIsStashed()
628 createAnimToIsStashed(mAnimator, isStashed, duration, stashTranslation, animationType); in createAnimToIsStashed()
649 if (duration > 0 && isInApp()) { in createAnimToIsStashed()
656 private void createAnimToIsStashed(AnimatorSet as, boolean isStashed, long duration, in createAnimToIsStashed() argument
721 fullLengthAnimatorSet.setDuration(duration); in createAnimToIsStashed()
[all …]
DTaskbarLauncherStateController.java277 @NonNull RecentsAnimationCallbacks callbacks, long duration) { in createAnimToLauncher() argument
292 animatorSet.play(stashController.createApplyStateAnimator(duration)); in createAnimToLauncher()
293 animatorSet.play(applyState(duration, false)); in createAnimToLauncher()
405 public void applyState(long duration) { in applyState() argument
406 applyState(duration, true); in applyState()
409 public Animator applyState(long duration, boolean start) { in applyState() argument
427 + ", duration: " + duration in applyState()
431 animator = onStateChangeApplied(changedFlags, duration, start); in applyState()
436 private Animator onStateChangeApplied(int changedFlags, long duration, boolean start) { in onStateChangeApplied() argument
461 playStateTransitionAnim(animatorSet, duration, launcherTransitionCompleted); in onStateChangeApplied()
[all …]
/packages/modules/GeoTZ/locationtzprovider/src/test/java/com/android/timezone/location/provider/
DRealLocationListeningAccountantTest.java133 assertValidPassiveListeningDuration(instruction.duration); in getNextListeningInstruction_noActiveBudget_noLastLocationResult()
136 mAccountant.accrueActiveListeningBudget(instruction.duration); in getNextListeningInstruction_noActiveBudget_noLastLocationResult()
154 assertActiveListeningBudget(balanceBeforeCall.minus(instruction.duration)); in getNextListeningInstruction_withSmallActiveBudget_noLastLocationResult()
159 assertValidActiveListeningDuration(instruction.duration); in getNextListeningInstruction_withSmallActiveBudget_noLastLocationResult()
173 assertActiveListeningBudget(balanceBeforeCall.minus(instruction.duration)); in getNextListeningInstruction_withLargeActiveBudget_noLastLocationResult()
177 assertValidActiveListeningDuration(instruction.duration); in getNextListeningInstruction_withLargeActiveBudget_noLastLocationResult()
219 assertValidPassiveListeningDuration(instruction.duration); in doLastKnownLocationResultTest()
262 assertValidPassiveListeningDuration(instruction.duration);
291 assertActiveListeningBudget(balanceBeforeCall.minus(instruction.duration));
297 assertValidActiveListeningDuration(instruction.duration);
[all …]
/packages/modules/DnsResolver/doh/
Dboot_time.rs80 pub fn checked_add(&self, duration: Duration) -> Option<BootTime> { in checked_add()
81 Some(BootTime { d: self.d.checked_add(duration)? }) in checked_add()
122 fn set(&self, duration: Duration) { in set()
123 assert_ne!(duration, Duration::from_millis(0)); in set()
127 tv_sec: duration.as_secs().try_into().unwrap(), in set()
128 tv_nsec: duration.subsec_nanos().try_into().unwrap(), in set()
143 pub async fn timeout<T>(duration: Duration, future: impl Future<Output = T>) -> Result<T, Elapsed> { in timeout()
150 if duration == Duration::from_millis(0) { in timeout()
158 timer_fd.set(duration); in timeout()
168 pub async fn sleep(duration: Duration) { in sleep()
[all …]
/packages/modules/Bluetooth/floss/pandora/floss/
Dcras_utils.py61 def playback_cmd(playback_file, block_size=None, duration=None, pin_device=None, channels=2, rate=4… argument
81 if duration is not None:
82 args += ['--duration', str(duration)]
90 duration=10, argument
117 if duration is not None:
118 args += ['--duration', str(duration)]
125 def listen_cmd(capture_file, block_size=None, duration=10, channels=1, rate=48000): argument
143 if duration is not None:
144 args += ['--duration', str(duration)]
160 def loopback_cmd(output_file, duration=10, channels=2, rate=48000): argument
[all …]
/packages/apps/TV/tests/robotests/src/com/android/tv/data/
DWatchedHistoryManagerTest.java75 long duration = TimeUnit.MINUTES.toMillis(10); in testLogChannelViewStop() local
77 mWatchedHistoryManager.logChannelViewStop(channel, time, duration); in testLogChannelViewStop()
83 assertThat(time - duration).isEqualTo(record.watchedStartTime); in testLogChannelViewStop()
84 assertThat(duration).isEqualTo(record.duration); in testLogChannelViewStop()
93 long duration = TimeUnit.MINUTES.toMillis(10); in testCircularHistoryQueue() local
98 mWatchedHistoryManager.logChannelViewStop(channel, time + duration * i, duration); in testCircularHistoryQueue()
125 long duration = TimeUnit.MINUTES.toMillis(10); in testEncodeDecodeWatchedRecord() local
126 WatchedRecord record = new WatchedRecord(fakeId, time, duration); in testEncodeDecodeWatchedRecord()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/widget/
DSimpleScrollAdapterTransform.java70 long duration = valueAnim.getDuration(); in applyTransformationRecursive() local
71 if (distanceFromCenter < duration) { in applyTransformationRecursive()
74 valueAnim.setCurrentPlayTime(duration); in applyTransformationRecursive()
80 long duration = animator.getDuration(); in initializeTransformationRecursive() local
81 if (duration == 0) { in initializeTransformationRecursive()
82 duration = defaultDuration; in initializeTransformationRecursive()
87 initializeTransformationRecursive(children.get(i), duration); in initializeTransformationRecursive() local
93 TypedValue.COMPLEX_UNIT_DIP, duration, mDisplayMetrics)); in initializeTransformationRecursive()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/audio_util/helpers/
DMetadata.java38 public String duration; field in Metadata
61 data.duration = duration; in clone()
78 if (!Objects.equals(duration, m.duration)) return false; in equals()
91 return Objects.hash(mediaId, title, artist, album, trackNum, numTracks, genre, duration); in hashCode()
105 + duration in toString()
144 if (empty.duration.equals(duration)) { in replaceDefaults()
145 duration = filledMetadata.duration; in replaceDefaults()
199 mMetadata.duration = "" + data.getLong(MediaMetadata.METADATA_KEY_DURATION); in fromMediaMetadata()
279 mMetadata.duration = "" + bundle.getLong(MediaMetadata.METADATA_KEY_DURATION); in fromBundle()
309 if (mMetadata.duration == null) mMetadata.duration = EMPTY_DURATION; in useDefaults()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DStaggeredWorkspaceAnim.java96 long duration = grid.isTaskbarPresent ? DURATION_TASKBAR_MS : DURATION_MS; in StaggeredWorkspaceAnim() local
108 page -> addAnimationForPage((CellLayout) page, totalRows, duration)); in StaggeredWorkspaceAnim()
127 totalRows, duration); in StaggeredWorkspaceAnim()
149 addStaggeredAnimationForView(child, hotseatRow, totalRows, duration); in StaggeredWorkspaceAnim()
153 addStaggeredAnimationForView(hotseat.getQsb(), qsbRow, totalRows, duration); in StaggeredWorkspaceAnim() local
172 PendingAnimation pendingAnimation = new PendingAnimation(duration); in StaggeredWorkspaceAnim()
178 addDepthAnimationForState(launcher, NORMAL, duration); in StaggeredWorkspaceAnim()
181 .animateToValue(0f, 1f).setDuration(duration)); in StaggeredWorkspaceAnim()
184 private void addAnimationForPage(CellLayout page, int totalRows, long duration) { in addAnimationForPage() argument
198 totalRows, duration); in addAnimationForPage()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/anim/
DSpringAnimationBuilder.java159 double duration = Math.atan2(-a, b) / gamma; in computeParams() local
163 while (duration < 0 || Math.abs(exponentialComponent(duration) * cosSinV(duration)) in computeParams()
165 duration += piByG; in computeParams()
169 double edgeTime = Math.max(0, duration - piByG / 2); in computeParams()
173 if ((duration - edgeTime) < minDiff) { in computeParams()
176 double mid = (edgeTime + duration) / 2; in computeParams()
178 duration = mid; in computeParams()
184 mDuration = (float) duration; in computeParams()
/packages/modules/NeuralNetworks/common/include/
DLegacyUtils.h106 TimePoint makeDeadline(Duration duration);
108 inline TimePoint makeDeadline(uint64_t duration) { in makeDeadline() argument
109 return makeDeadline(makeTimeoutDuration(duration)); in makeDeadline()
115 inline OptionalTimePoint makeDeadline(OptionalDuration duration) { in makeDeadline() argument
116 return duration.has_value() ? std::make_optional(makeDeadline(*duration)) : OptionalTimePoint{}; in makeDeadline()
118 inline OptionalTimePoint makeDeadline(std::optional<uint64_t> duration) { in makeDeadline() argument
119 return duration.has_value() ? std::make_optional(makeDeadline(*duration)) : OptionalTimePoint{}; in makeDeadline()
121 inline OptionalTimePoint makeDeadline(int64_t duration) { in makeDeadline() argument
122 return makeDeadline(makeTimeoutDuration(duration)); in makeDeadline()
/packages/modules/Connectivity/Tethering/tests/unit/src/com/android/networkstack/tethering/metrics/
DTetheringMetricsTest.java98 private void incrementCurrentTime(final long duration) { in incrementCurrentTime() argument
99 mElapsedRealtime += duration; in incrementCurrentTime()
119 final UserType user, final UpstreamEvents.Builder upstreamEvents, final long duration) in verifyReport() argument
127 .setDurationMillis(duration) in verifyReport()
153 final UpstreamType expectedResult, final long duration, final long txBytes, in addUpstreamEvent() argument
157 .setDurationMillis(duration) in addUpstreamEvent()
166 final long duration = 2 * SECOND_IN_MILLIS; in runDownstreamTypesTest() local
167 incrementCurrentTime(duration); in runDownstreamTypesTest()
170 addUpstreamEvent(upstreamEvents, UpstreamType.UT_NO_NETWORK, duration, 0L, 0L); in runDownstreamTypesTest()
194 final long duration = 2 * SECOND_IN_MILLIS; in runErrorCodesTest() local
[all …]
/packages/providers/MediaProvider/tests/utils/src/com/android/providers/media/tests/utils/
DTimer.java36 private long duration; field in Timer
60 duration += currentRunDuration; in stop()
67 return TimeUnit.MILLISECONDS.convert(duration / count, TimeUnit.NANOSECONDS); in getAverageDurationMillis()
75 final long duration = getAverageDurationMillis(); in dumpResults() local
76 Log.v(TAG, name + ": " + duration + "ms"); in dumpResults()
79 results.putLong(name + " (ms)", duration); in dumpResults()
/packages/modules/NeuralNetworks/shim_and_sl/
DShimPreparedModel.cpp210 uint64_t duration; in getExecutionInfo() local
214 auto result = mExecution->getDuration(Duration::ON_HARDWARE, &duration); in getExecutionInfo()
216 timingLaunched->timeOnDeviceNs = (duration == uint64cap) ? -1 in getExecutionInfo()
217 : (duration > int64cap) in getExecutionInfo()
219 : static_cast<int64_t>(duration); in getExecutionInfo()
221 result = mExecution->getDuration(Duration::IN_DRIVER, &duration); in getExecutionInfo()
223 timingLaunched->timeInDriverNs = (duration == uint64cap) ? -1 in getExecutionInfo()
224 : (duration > int64cap) in getExecutionInfo()
226 : static_cast<int64_t>(duration); in getExecutionInfo()
228 result = mExecution->getDuration(Duration::FENCED_ON_HARDWARE, &duration); in getExecutionInfo()
[all …]
/packages/services/Telephony/src/com/android/phone/
DCallTime.java122 long duration = getCallDuration(call); in updateElapsedTime() local
123 mListener.onTickForCallTimeElapsed(duration / 1000); in updateElapsedTime()
132 long duration = 0; in getCallDuration() local
141 duration = c.getDurationMillis(); in getCallDuration()
148 if (t > duration) { in getCallDuration()
149 duration = t; in getCallDuration()
154 if (DBG) log("updateElapsedTime, count=" + count + ", duration=" + duration); in getCallDuration()
155 return duration; in getCallDuration()

12345678910>>...25