/aosp14/frameworks/base/core/tests/coretests/src/android/util/ |
H A D | TimeSparseArrayTest.java | 48 for (long time = -43; time <= 10; time++) { in closestIndexOnOrAfter() 49 assertThat(timeSparseArray.closestIndexOnOrAfter(time)).isEqualTo(0); in closestIndexOnOrAfter() 52 for (long time = 11; time <= 51; time++) { in closestIndexOnOrAfter() 53 assertThat(timeSparseArray.closestIndexOnOrAfter(time)).isEqualTo(1); in closestIndexOnOrAfter() 56 for (long time = 52; time <= 59; time++) { in closestIndexOnOrAfter() 60 for (long time = 60; time <= 102; time++) { in closestIndexOnOrAfter() 81 for (long time = -42; time < 4; time++) { in closestIndexOnOrBefore() 85 for (long time = 4; time < 21; time++) { in closestIndexOnOrBefore() 89 for (long time = 21; time < 39; time++) { in closestIndexOnOrBefore() 93 for (long time = 39; time < 91; time++) { in closestIndexOnOrBefore() [all …]
|
/aosp14/frameworks/base/core/java/android/service/notification/ |
H A D | ScheduleCalendar.java | 108 if (time <= now) { in getNextTime() 112 return time; in getNextTime() 128 public boolean isInSchedule(long time) { in isInSchedule() argument 135 return isInSchedule(-1, time, start, end) || isInSchedule(0, time, start, end); in isInSchedule() 160 public boolean shouldExitForAlarm(long time) { in shouldExitForAlarm() argument 166 && time >= mSchedule.nextAlarm in shouldExitForAlarm() 175 return mDays.contains(day) && time >= start && time < end; in isInSchedule() 178 private int getDayOfWeek(long time) { in getDayOfWeek() argument 179 mCalendar.setTimeInMillis(time); in getDayOfWeek() 192 private long addDays(long time, int days) { in addDays() argument [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/display/utils/ |
H A D | AmbientFilter.java | 75 public boolean addValue(long time, float value) { in addValue() argument 79 truncateOldValues(time); in addValue() 81 Slog.d(mTag, "add value: " + value + " @ " + time); in addValue() 83 mBuffer.add(time, value); in addValue() 95 public float getEstimate(long time) { in getEstimate() argument 96 truncateOldValues(time); in getEstimate() 97 final float value = filter(time, mBuffer); in getEstimate() 99 Slog.d(mTag, "get estimate: " + value + " @ " + time); in getEstimate() 146 private void truncateOldValues(long time) { in truncateOldValues() argument 147 final long minTime = time - mHorizon; in truncateOldValues() [all …]
|
/aosp14/frameworks/base/core/java/android/os/ |
H A D | SystemClock.java | 21 import android.app.time.UnixEpochTime; 31 import java.time.Clock; 32 import java.time.DateTimeException; 33 import java.time.ZoneOffset; 303 UnixEpochTime time; 305 time = timeDetectorService.latestNetworkTime(); 313 if (time == null) { 319 return time.getUnixEpochTimeMillis() + deltaMs; 369 LocationTime time; 371 time = mMgr.getGnssTimeMillis(); [all …]
|
/aosp14/frameworks/base/tests/notification/src/com/android/frameworks/tests/notification/ |
H A D | NotificationTests.java | 391 time = SystemClock.currentThreadTimeMillis() - time; in testCreate() 405 time = SystemClock.currentThreadTimeMillis() - time; in testCreate() 406 L(" %s: cancel=%dms", summarize(n), time); in testCreate() 424 time = SystemClock.currentThreadTimeMillis() - time; in testCreate() 426 summarize(n), time, p.dataPosition(), in testCreate() 435 time = SystemClock.currentThreadTimeMillis() - time; in testCreate() 438 time = SystemClock.currentThreadTimeMillis(); in testCreate() 440 time = SystemClock.currentThreadTimeMillis() - time; in testCreate() 441 L(" %s: notify=%dms", summarize(n2), time); in testCreate() 451 time = SystemClock.currentThreadTimeMillis() - time; in testCreate() [all …]
|
/aosp14/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/tv/ |
H A D | TvPipBoundsControllerTest.kt | 67 var time = 0L regex 91 time = 0L 95 testLooper = TestLooper { time } 105 { time }, 117 assertNoMovementUpTo(time + FAR_FUTURE) 168 assertNoMovementUpTo(time + STASH_DURATION / 2) 201 assertNoMovementUpTo(time + FAR_FUTURE) 210 assertNoMovementUpTo(time + FAR_FUTURE) 219 assertNoMovementUpTo(time + FAR_FUTURE) 231 assertNoMovementUpTo(time + FAR_FUTURE) [all …]
|
/aosp14/frameworks/base/core/java/android/util/ |
H A D | TimeUtils.java | 33 import java.time.Instant; 34 import java.time.LocalTime; 358 if (time == 0) { in formatDuration() 362 formatDuration(time-now, sb, 0); in formatDuration() 367 if (time == 0) { in formatDuration() 371 formatDuration(time-now, pw, 0); in formatDuration() 375 public static String formatUptime(long time) { in formatUptime() argument 386 long diff = time - referenceTime; in formatTime() 388 return time + " (in " + diff + " ms)"; in formatTime() 393 return time + " (now)"; in formatTime() [all …]
|
H A D | TimeSparseArray.java | 38 public int closestIndexOnOrAfter(long time) { in closestIndexOnOrAfter() argument 47 if (time > key) { in closestIndexOnOrAfter() 49 } else if (time < key) { in closestIndexOnOrAfter() 85 public int closestIndexOnOrBefore(long time) { in closestIndexOnOrBefore() argument 86 final int index = closestIndexOnOrAfter(time); in closestIndexOnOrBefore() 88 if (index < size() && keyAt(index) == time) { in closestIndexOnOrBefore()
|
/aosp14/frameworks/base/services/core/java/com/android/server/power/ |
H A D | WakeLockLog.java | 236 time); in onWakeLockEvent() 248 long time) { in handleWakeLockEventInternal() argument 372 public long time; field in WakeLockLog.LogEntry 387 set(time, type, tag, flags); in LogEntry() 400 this.time = time; in set() 637 long time = entry.time; in toBytes() local 668 if (time < timeReference) { in getRelativeTime() 674 long relativeTime = time - timeReference; in getRelativeTime() 818 mLatestTime = entry.time; in addEntry() 932 timeReference = entry.time; in removeTagIndex() [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/notification/ |
H A D | SystemConditionProviderService.java | 40 protected static String ts(long time) { in ts() argument 41 return new Date(time) + " (" + time + ")"; in ts() 50 protected static void dumpUpcomingTime(PrintWriter pw, String var, long time, long now) { in dumpUpcomingTime() argument 52 if (time > 0) { in dumpUpcomingTime() 53 pw.printf("%s, in %s, now=%s", ts(time), formatDuration(time - now), ts(now)); in dumpUpcomingTime() 55 pw.print(time); in dumpUpcomingTime()
|
/aosp14/frameworks/base/telephony/java/android/telephony/ |
H A D | TelephonyHistogram.java | 173 if (time <= bucketEndPoints[i]) { in addToBucketCounter() 194 public void addTimeTaken(int time) { in addTimeTaken() argument 199 mMinTimeMs = time; in addTimeTaken() 200 mMaxTimeMs = time; in addTimeTaken() 201 mAverageTimeMs = time; in addTimeTaken() 207 mInitialTimings[0] = time; in addTimeTaken() 211 if (time < mMinTimeMs) { in addTimeTaken() 212 mMinTimeMs = time; in addTimeTaken() 214 if (time > mMaxTimeMs) { in addTimeTaken() 215 mMaxTimeMs = time; in addTimeTaken() [all …]
|
/aosp14/frameworks/base/core/java/android/app/timedetector/ |
H A D | ITimeDetectorService.aidl | 19 import android.app.time.ExternalTimeSuggestion; 20 import android.app.time.ITimeDetectorListener; 21 import android.app.time.TimeCapabilitiesAndConfig; 22 import android.app.time.TimeConfiguration; 23 import android.app.time.TimeState; 24 import android.app.time.UnixEpochTime; 50 boolean confirmTime(in UnixEpochTime time); in confirmTime() argument
|
/aosp14/frameworks/base/core/tests/benchmarks/src/android/text/format/ |
H A D | AndroidTimeVsOthersBenchmark.java | 21 import java.time.LocalDateTime; 22 import java.time.ZoneId; 23 import java.time.ZoneOffset; 38 Time time = new Time(timezoneId); in toMillis_androidTime() local 39 time.set(1, 2, 3, 4, 5, 2010); in toMillis_androidTime() 40 answer = time.toMillis(false); in toMillis_androidTime() 50 LocalDateTime time = LocalDateTime.of(2010, 5 + 1, 4, 3, 2, 1); in toMillis_javaTime() local 51 ZoneOffset offset = ZoneId.of(timezoneId).getRules().getOffset(time); in toMillis_javaTime() 52 answer = time.toInstant(offset).toEpochMilli(); in toMillis_javaTime()
|
/aosp14/frameworks/base/core/tests/coretests/src/android/text/format/ |
H A D | TimeTest.java | 535 Time time = new Time(); in disableTestGetJulianDay() local 547 long millis = time.normalize(true); in disableTestGetJulianDay() 564 + time.hour + ":" + time.minute in disableTestGetJulianDay() 577 Time time = new Time(); in disableTestSetJulianDay() local 588 long millis = time.normalize(true); in disableTestSetJulianDay() 594 time.setJulianDay(julianDay); in disableTestSetJulianDay() 602 assertTrue(time.hour == 0 || time.hour == 1); in disableTestSetJulianDay() 603 assertEquals(0, time.minute); in disableTestSetJulianDay() 604 assertEquals(0, time.second); in disableTestSetJulianDay() 606 millis = time.toMillis(false); in disableTestSetJulianDay() [all …]
|
/aosp14/frameworks/base/core/java/android/text/format/ |
H A D | Time.java | 954 long millis = time.toMillis(true); in isEpoch() 1261 time.hour = wallTime.getHour(); in copyFieldsToTime() 1264 time.year = wallTime.getYear(); in copyFieldsToTime() 1277 wallTime.setSecond(time.second); in copyFieldsFromTime() 1278 wallTime.setMinute(time.minute); in copyFieldsFromTime() 1279 wallTime.setHour(time.hour); in copyFieldsFromTime() 1281 wallTime.setMonth(time.month); in copyFieldsFromTime() 1282 wallTime.setYear(time.year); in copyFieldsFromTime() 1285 wallTime.setIsDst(time.isDst); in copyFieldsFromTime() 1288 if (time.allDay && (time.second != 0 || time.minute != 0 || time.hour != 0)) { in copyFieldsFromTime() [all …]
|
/aosp14/frameworks/base/core/proto/android/app/ |
H A D | alarmmanager.proto | 31 // Alarm time in System.currentTimeMillis() (wall clock time in UTC), which 34 // Alarm time in System.currentTimeMillis() (wall clock time in UTC). This 36 // asleep, it will not be delivered until the next time the device wakes up. 38 // Alarm time in SystemClock.elapsedRealtime() (time since boot, including 41 // Alarm time in SystemClock.elapsedRealtime() (time since boot, including 43 // device is asleep, it will not be delivered until the next time the device 53 // This value is UTC wall clock time in milliseconds, as returned by
|
/aosp14/frameworks/base/services/core/java/com/android/server/timezonedetector/location/ |
H A D | LocationTimeZoneManagerShellCommand.java | 24 import static android.app.time.LocationTimeZoneManager.SERVICE_NAME; 29 import static android.app.time.LocationTimeZoneManager.SHELL_COMMAND_STOP; 58 import android.app.time.DetectorStatusTypes.DetectionAlgorithmStatus; 59 import android.app.time.GeolocationTimeZoneSuggestionProto; 60 import android.app.time.LocationTimeZoneAlgorithmStatus; 61 import android.app.time.LocationTimeZoneAlgorithmStatusProto; 62 import android.app.time.LocationTimeZoneManagerProto; 63 import android.app.time.LocationTimeZoneManagerServiceStateProto; 64 import android.app.time.LocationTimeZoneProviderEventProto; 65 import android.app.time.TimeZoneDetectorProto; [all …]
|
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/os/ |
H A D | LongArrayMultiStateCounterPerfTest.java | 147 long time = 1000; in javaImplementation() local 150 counter.setState(1, time); in javaImplementation() 151 counter.setState(0, time + 1000); in javaImplementation() 152 counter.updateValue(timeInFreq, time + 2000); in javaImplementation() 153 time += 10000; in javaImplementation() 161 long time = 1000; in nativeImplementation() local 166 counter.setState(1, time); in nativeImplementation() 167 counter.setState(0, time + 1000); in nativeImplementation() 168 counter.updateValues(timeInFreq, time + 2000); in nativeImplementation() 169 time += 10000; in nativeImplementation()
|
/aosp14/frameworks/base/libs/hwui/ |
H A D | SkiaInterpolator.cpp | 137 float SkiaInterpolatorBase::ComputeRelativeT(SkMSec time, SkMSec prevTime, SkMSec nextTime, in ComputeRelativeT() argument 139 SkASSERT(time > prevTime && time < nextTime); in ComputeRelativeT() 141 float t = (float)(time - prevTime) / (float)(nextTime - prevTime); in ComputeRelativeT() 153 SkMSec offsetTime = time - startTime; in timeToT() 168 time = offsetTime + startTime; in timeToT() 171 int index = SkTSearch<SkMSec>(&fTimes[0].fTime, fFrameCount, time, sizeof(SkTimeCode)); in timeToT() 197 *T = ComputeRelativeT(time, prevT, nextT, nextTime[-1].fBlend); in timeToT() 229 bool SkiaInterpolator::setKeyFrame(int index, SkMSec time, const float values[], in setKeyFrame() argument 241 timeCode->fTime = time; in setKeyFrame() 249 SkiaInterpolator::Result SkiaInterpolator::timeToValues(SkMSec time, float values[]) const { in timeToValues() argument [all …]
|
/aosp14/frameworks/base/tests/ActivityManagerPerfTests/ |
H A D | README.txt | 12 * For example, the time it takes from sending an Intent to start a Service 13 to the time the Service runs its callbacks 14 * System.nanoTime() is monotonic and consistent between processes, so we use that for measuring time 15 * If the test app is involved, it will measure the time and send it back to the instrumentation test 17 * Each sent time is tagged with an id since there can be multiple events that send back a time 25 * Sends the time it measures back to the test package 39 * Each test should call runPerfFunction() returning the elapsed time for a single iteration 41 * If you are measuring the time elapsed of something that either starts or ends in the target 43 * The target package can report the time it measures through an ITimeReceiverCallback passed 46 * The instrumentation test can collect that time by calling getReceivedTimeNs("tag") and [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/app/time/ |
H A D | TimeManagerTest.java | 17 package android.app.time; 19 import static android.app.time.Capabilities.CAPABILITY_NOT_ALLOWED; 20 import static android.app.time.Capabilities.CAPABILITY_POSSESSED; 21 import static android.app.time.cts.shell.DeviceConfigKeys.NAMESPACE_SYSTEM_TIME; 22 import static android.app.time.cts.shell.DeviceConfigKeys.TimeZoneDetector.KEY_TIME_ZONE_DETECTOR_A… 23 import static android.app.time.cts.shell.DeviceConfigShellHelper.SYNC_DISABLED_MODE_UNTIL_REBOOT; 31 import android.app.time.cts.shell.DeviceConfigShellHelper; 32 import android.app.time.cts.shell.DeviceShellCommandExecutor; 33 import android.app.time.cts.shell.TimeZoneDetectorShellHelper; 34 import android.app.time.cts.shell.device.InstrumentationShellCommandExecutor;
|
H A D | TimeZoneDetectorStatusTest.java | 17 package android.app.time; 19 import static android.app.time.DetectorStatusTypes.DETECTION_ALGORITHM_STATUS_NOT_RUNNING; 20 import static android.app.time.DetectorStatusTypes.DETECTION_ALGORITHM_STATUS_RUNNING; 21 import static android.app.time.DetectorStatusTypes.DETECTOR_STATUS_NOT_RUNNING; 22 import static android.app.time.DetectorStatusTypes.DETECTOR_STATUS_RUNNING; 23 import static android.app.time.ParcelableTestSupport.assertEqualsAndHashCode; 24 import static android.app.time.ParcelableTestSupport.assertRoundTripParcelable;
|
H A D | DetectorStatusTypesTest.java | 17 package android.app.time; 19 import static android.app.time.DetectorStatusTypes.DETECTION_ALGORITHM_STATUS_RUNNING; 20 import static android.app.time.DetectorStatusTypes.DETECTION_ALGORITHM_STATUS_UNKNOWN; 21 import static android.app.time.DetectorStatusTypes.DETECTOR_STATUS_RUNNING; 22 import static android.app.time.DetectorStatusTypes.DETECTOR_STATUS_UNKNOWN; 27 import android.app.time.DetectorStatusTypes.DetectionAlgorithmStatus; 28 import android.app.time.DetectorStatusTypes.DetectorStatus;
|
/aosp14/frameworks/base/core/java/android/app/ |
H A D | EventLogTags.logtags | 9 30021 wm_on_paused_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3) 11 30022 wm_on_resume_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3) 14 30049 wm_on_stop_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3) 17 30057 wm_on_create_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3) 19 30058 wm_on_restart_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3) 21 30059 wm_on_start_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3) 23 30060 wm_on_destroy_called (Token|1|5),(Component Name|3),(Reason|3),(time|2|3)
|
/aosp14/frameworks/base/libs/hwui/jni/ |
H A D | MovieImpl.cpp | 53 bool Movie::setTime(SkMSec time) in setTime() argument 56 if (time > dur) in setTime() 57 time = dur; in setTime() 60 if (time != fCurrTime) in setTime() 62 fCurrTime = time; in setTime() 63 changed = this->onSetTime(time); in setTime()
|