Home
last modified time | relevance | path

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

12345678910>>...22

/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/ui/handheld/v31/
DDashboardUtilsTest.kt36 val duration: Long = TimeUnit.SECONDS.toMillis(1L) in getTimeDiffStr_durationSecondsOne() constant
40 duration in getTimeDiffStr_durationSecondsOne()
47 val duration: Long = TimeUnit.SECONDS.toMillis(59L) in getTimeDiffStr_durationSecondsOther() constant
51 duration in getTimeDiffStr_durationSecondsOther()
58 val duration: Long = TimeUnit.MINUTES.toMillis(1L) in getTimeDiffStr_durationMinutesOne() constant
62 duration in getTimeDiffStr_durationMinutesOne()
69 val duration: Long = TimeUnit.MINUTES.toMillis(59L) in getTimeDiffStr_durationMinutesOther() constant
73 duration in getTimeDiffStr_durationMinutesOther()
80 val duration: Long = TimeUnit.HOURS.toMillis(1L) in getTimeDiffStr_durationHoursOne() constant
84 duration in getTimeDiffStr_durationHoursOne()
[all …]
/packages/modules/StatsD/statsd/src/metrics/duration_helper/
DMaxDurationTracker.cpp69 DurationInfo& duration = mInfos[key]; in noteStart() local
71 duration.conditionKeys = conditionKey; in noteStart()
75 switch (duration.state) { in noteStart()
77 duration.startCount++; in noteStart()
80 duration.startCount++; in noteStart()
85 duration.state = DurationState::kPaused; in noteStart()
87 duration.state = DurationState::kStarted; in noteStart()
88 duration.lastStartTime = eventTime; in noteStart()
91 duration.startCount = 1; in noteStart()
103 DurationInfo& duration = mInfos[key]; in noteStop() local
[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/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/modules/Bluetooth/system/blueberry/tests/gd/l2cap/classic/
Dl2cap_performance_test.py60 duration = self.performance_test_logger.get_duration_of_intervals("TX")[0]
61 self.log.info("Duration: %s" % str(duration))
63 return duration
97 duration = self.performance_test_logger.get_duration_of_intervals("RX")[0]
98 self.log.info("Duration: %s" % str(duration))
126 duration = self.performance_test_logger.get_duration_of_intervals("TX")[0]
127 self.log.info("Duration: %s" % str(duration))
129 return duration
154 duration = self.performance_test_logger.get_duration_of_intervals("RX")[0]
155 self.log.info("Duration: %s" % str(duration))
[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/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/mcp/
DMediaControlProfileTest.java104 mMockMetadata.duration = Long.toString(0); in setUp()
164 long duration = 10; in testGetCurrentTrackDuration() local
167 mMockMetadata.duration = Long.toString(duration); in testGetCurrentTrackDuration()
168 Assert.assertEquals(duration, mMediaControlProfile.getCurrentTrackDuration()); in testGetCurrentTrackDuration()
239 long duration = 10; in testOnCurrentPlayerStateUpdate() local
242 mMockMetadata.duration = Long.toString(duration); in testOnCurrentPlayerStateUpdate()
270 private void testHandleTrackPositionSetRequest(long position, long duration, int times) { in testHandleTrackPositionSetRequest() argument
277 else if (position > duration) { in testHandleTrackPositionSetRequest()
278 Assert.assertEquals(positionCaptor.getValue().longValue(), duration); in testHandleTrackPositionSetRequest() local
286 long duration = 50; in testHandleTrackPositionsSetRequest() local
[all …]
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DSleepSessionFormatter.kt64 return formatSleepSession(record) { duration -> formatDurationShort(context, duration) } in <lambda>() method
69 return formatSleepSession(record) { duration -> formatDurationLong(context, duration) } in <lambda>() method
78 formatDuration: (duration: Duration) -> String in <lambda>()
83 val duration = Duration.between(record.startTime, record.endTime) in <lambda>() constant
84 context.getString(R.string.sleep_session_default, formatDuration(duration)) in <lambda>()
98 title = formatStageType(stage) { duration -> formatDurationShort(context, duration) }, in <lambda>() method
100 formatStageType(stage) { duration -> formatDurationLong(context, duration) }, in <lambda>() method
106 formatDuration: (duration: Duration) -> String in <lambda>()
123 val duration = Duration.between(stage.startTime, stage.endTime) in <lambda>() constant
125 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/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/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/
DTaskbarStashController.java649 private void createAnimToIsStashed(boolean isStashed, long duration, in createAnimToIsStashed() argument
669 .setDuration(duration)); in createAnimToIsStashed()
671 .setDuration(duration)); in createAnimToIsStashed()
674 .setDuration(duration)); in createAnimToIsStashed()
676 hasAnyFlag(FLAG_STASHED_IN_APP_IME) ? 0 : 1).setDuration(duration)); in createAnimToIsStashed()
685 createTransientAnimToIsStashed(mAnimator, isStashed, duration, animationType); in createAnimToIsStashed()
687 createAnimToIsStashed(mAnimator, isStashed, duration, stashTranslation, animationType); in createAnimToIsStashed()
708 if (duration > 0 && isInApp()) { in createAnimToIsStashed()
715 private void createAnimToIsStashed(AnimatorSet as, boolean isStashed, long duration, in createAnimToIsStashed() argument
780 fullLengthAnimatorSet.setDuration(duration); in createAnimToIsStashed()
[all …]
DTaskbarLauncherStateController.java266 @NonNull RecentsAnimationCallbacks callbacks, long duration) { in createAnimToLauncher() argument
281 animatorSet.play(stashController.createApplyStateAnimator(duration)); in createAnimToLauncher()
282 animatorSet.play(applyState(duration, false)); in createAnimToLauncher()
370 public void applyState(long duration) { in applyState() argument
371 applyState(duration, true); in applyState()
374 public Animator applyState(long duration, boolean start) { in applyState() argument
392 + ", duration: " + duration in applyState()
396 animator = onStateChangeApplied(changedFlags, duration, start); in applyState()
401 private Animator onStateChangeApplied(int changedFlags, long duration, boolean start) { in onStateChangeApplied() argument
423 playStateTransitionAnim(animatorSet, duration, launcherTransitionCompleted); in onStateChangeApplied()
[all …]
/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/modules/Bluetooth/system/stack/btm/
Dbtm_ble_multi_adv.cc66 uint16_t duration; // 1 unit is 10ms member
98 duration(0), in AdvertisingInstance()
155 uint16_t duration; member
202 if (restart && (p_inst->duration || p_inst->maxExtAdvEvents)) { in ConfigureRpa()
291 std::vector<uint8_t> scan_response_data, int duration, in StartAdvertising() argument
301 int duration; in StartAdvertising() member
313 c->duration = duration; in StartAdvertising()
377 … c->self->Enable(c->inst_id, true, c->cb, c->duration, 0, std::move(c->timeout_cb)); in StartAdvertising()
391 uint16_t duration, uint8_t maxExtAdvEvents, in StartAdvertisingSet() argument
403 c->duration = duration; in StartAdvertisingSet()
[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.rs81 pub fn checked_add(&self, duration: Duration) -> Option<BootTime> { in checked_add()
82 Some(BootTime { d: self.d.checked_add(duration)? }) in checked_add()
125 fn set(&self, duration: Duration) { in set()
126 assert_ne!(duration, Duration::from_millis(0)); in set()
130 tv_sec: duration.as_secs().try_into().unwrap(), in set()
131 tv_nsec: duration.subsec_nanos().try_into().unwrap(), in set()
147 pub async fn timeout<T>(duration: Duration, future: impl Future<Output = T>) -> Result<T, Elapsed> { in timeout()
154 if duration == Duration::from_millis(0) { in timeout()
162 timer_fd.set(duration); in timeout()
172 pub async fn sleep(duration: Duration) { in sleep()
[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/Launcher3/quickstep/src/com/android/quickstep/util/
DStaggeredWorkspaceAnim.java97 long duration = grid.isTaskbarPresent ? DURATION_TASKBAR_MS : DURATION_MS; in StaggeredWorkspaceAnim() local
109 page -> addAnimationForPage((CellLayout) page, totalRows, duration)); in StaggeredWorkspaceAnim()
127 addStaggeredAnimationForView(child, lp.getCellY() + 1, 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
197 addStaggeredAnimationForView(child, lp.getCellY() + lp.cellVSpan, totalRows, duration); in addAnimationForPage()
[all …]
/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()
97 + "\" album=\"" + album + "\" duration=" + duration in toString()
132 if (empty.duration.equals(duration)) { in replaceDefaults()
133 duration = filledMetadata.duration; in replaceDefaults()
195 mMetadata.duration = "" + data.getLong(MediaMetadata.METADATA_KEY_DURATION); in fromMediaMetadata()
276 mMetadata.duration = "" + bundle.getLong(MediaMetadata.METADATA_KEY_DURATION); in fromBundle()
307 if (mMetadata.duration == null) mMetadata.duration = EMPTY_DURATION; in useDefaults()
/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/modules/NeuralNetworks/common/include/
DLegacyUtils.h105 TimePoint makeDeadline(Duration duration);
107 inline TimePoint makeDeadline(uint64_t duration) { in makeDeadline() argument
108 return makeDeadline(makeTimeoutDuration(duration)); in makeDeadline()
114 inline OptionalTimePoint makeDeadline(OptionalDuration duration) { in makeDeadline() argument
115 return duration.has_value() ? std::make_optional(makeDeadline(*duration)) : OptionalTimePoint{}; in makeDeadline()
117 inline OptionalTimePoint makeDeadline(std::optional<uint64_t> duration) { in makeDeadline() argument
118 return duration.has_value() ? std::make_optional(makeDeadline(*duration)) : OptionalTimePoint{}; in makeDeadline()
120 inline OptionalTimePoint makeDeadline(int64_t duration) { in makeDeadline() argument
121 return makeDeadline(makeTimeoutDuration(duration)); in makeDeadline()
/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/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/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/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarInstancesHelper.java189 Duration duration = new Duration(); in performInstanceExpansion() local
225 duration.parse(durationStr); in performInstanceExpansion()
232 duration.sign = 1; in performInstanceExpansion()
233 duration.weeks = 0; in performInstanceExpansion()
234 duration.days = 0; in performInstanceExpansion()
235 duration.hours = 0; in performInstanceExpansion()
236 duration.minutes = 0; in performInstanceExpansion()
237 duration.seconds = 0; in performInstanceExpansion()
303 duration.sign = 1; in performInstanceExpansion()
304 duration.weeks = 0; in performInstanceExpansion()
[all …]

12345678910>>...22