/packages/apps/Messaging/src/com/android/messaging/util/ |
D | Dates.java | 65 public static CharSequence getRelativeTimeSpanString(final long time) { in getRelativeTimeSpanString() argument 67 if (now - time < DateUtils.MINUTE_IN_MILLIS) { in getRelativeTimeSpanString() 77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, in getRelativeTimeSpanString() 80 return getShortRelativeTimeSpanString(time); in getRelativeTimeSpanString() 84 public static CharSequence getConversationTimeString(final long time) { in getConversationTimeString() argument 85 return getTimeString(time, true /*abbreviated*/, false /*minPeriodToday*/); in getConversationTimeString() 88 public static CharSequence getMessageTimeString(final long time) { in getMessageTimeString() argument 89 return getTimeString(time, false /*abbreviated*/, false /*minPeriodToday*/); in getMessageTimeString() 92 public static CharSequence getWidgetTimeString(final long time, final boolean abbreviated) { in getWidgetTimeString() argument 93 return getTimeString(time, abbreviated, true /*minPeriodToday*/); in getWidgetTimeString() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/month/ |
D | SimpleWeekView.java | 247 Time time = new Time(tz); in setWeekParams() local 248 time.setJulianDay(julianMonday); in setWeekParams() 253 mDayNumbers[0] = Integer.toString(time.getWeekNumber()); in setWeekParams() 264 if (time.weekDay != mWeekStart) { in setWeekParams() 265 int diff = time.weekDay - mWeekStart; in setWeekParams() 269 time.monthDay -= diff; in setWeekParams() 270 time.normalize(true); in setWeekParams() 273 mFirstJulianDay = Time.getJulianDay(time.toMillis(true), time.gmtoff); in setWeekParams() 274 mFirstMonth = time.month; in setWeekParams() 287 if (time.monthDay == 1) { in setWeekParams() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | GestureStrokeRecognitionPoints.java | 180 public void duplicateLastPointWith(final int time) { in duplicateLastPointWith() argument 187 x, y, time)); in duplicateLastPointWith() 190 appendPoint(x, y, time); in duplicateLastPointWith() 191 updateIncrementalRecognitionSize(x, y, time); in duplicateLastPointWith() 206 private void appendPoint(final int x, final int y, final int time) { in appendPoint() argument 211 if (lastIndex >= 0 && mEventTimes.get(lastIndex) > time) { in appendPoint() 213 x, y, time, mXCoordinates.get(lastIndex), mYCoordinates.get(lastIndex), in appendPoint() 217 mEventTimes.add(time); in appendPoint() 222 private void updateMajorEvent(final int x, final int y, final int time) { in updateMajorEvent() argument 223 mLastMajorEventTime = time; in updateMajorEvent() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
D | TraceHelper.java | 46 MutableLong time = sUpTimes.get(sectionName); in beginSection() local 47 if (time == null) { in beginSection() 48 time = new MutableLong(isLoggable(sectionName, VERBOSE) ? 0 : -1); in beginSection() 49 sUpTimes.put(sectionName, time); in beginSection() 51 if (time.value >= 0) { in beginSection() 55 time.value = SystemClock.uptimeMillis(); in beginSection() 64 MutableLong time = sUpTimes.get(sectionName); in partitionSection() local 65 if (time != null && time.value >= 0) { in partitionSection() 73 Log.d(sectionName, partition + " : " + (now - time.value)); in partitionSection() 74 time.value = now; in partitionSection() [all …]
|
D | FlingAnimation.java | 179 final float time = t * mDuration; in onAnimationUpdate() local 180 dragView.setTranslationX(time * mUX + mFrom.left + mAX * time * time / 2); in onAnimationUpdate() 181 dragView.setTranslationY(time * mUY + mFrom.top + mAY * time * time / 2); in onAnimationUpdate()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/ |
D | InputPointersTests.java | 73 final int time = i * 4; in testAdd() local 74 src.addPointer(x, y, pointerId, time); in testAdd() 81 final int time = i * 4; in testAdd() local 85 assertEquals("times at " + i, time, src.getTimes()[i]); in testAdd() 97 final int time = i * 4; in testAddAt() local 98 src.addPointerAt(i, x, y, pointerId, time); in testAddAt() 105 final int time = i * 4; in testAddAt() local 109 assertEquals("times at " + i, time, src.getTimes()[i]); in testAddAt() 121 final int time = i * 4; in testSet() local 122 src.addPointer(x, y, pointerId, time); in testSet() [all …]
|
/packages/services/Car/tools/emulator/ |
D | user_action_generator.py | 16 import time 141 time.sleep(0.2) 150 time.sleep(1) 174 time.sleep(SHORT_SLEEP_TIME_SEC) 179 time.sleep(SHORT_SLEEP_TIME_SEC) 183 time.sleep(SHORT_SLEEP_TIME_SEC) 187 time.sleep(SHORT_SLEEP_TIME_SEC) 191 time.sleep(LONG_SLEEP_TIME_SEC) 194 time.sleep(LONG_SLEEP_TIME_SEC) 197 time.sleep(SHORT_SLEEP_TIME_SEC) [all …]
|
/packages/apps/Camera2/src/com/android/camera/stats/profiler/ |
D | ProfileBase.java | 54 long time = System.nanoTime(); in mark() local 55 onMark(getTotalMillis(time), getTimeFromLastMillis(time), reason); in mark() 56 mLastMark = time; in mark() 61 long time = System.nanoTime(); in stop() local 62 onStop(getTotalMillis(time), getTimeFromLastMillis(time)); in stop() 63 mLastMark = time; in stop() 68 long time = System.nanoTime(); in stop() local 69 onStop(getTotalMillis(time), getTimeFromLastMillis(time), reason); in stop() 70 mLastMark = time; in stop()
|
/packages/apps/Calendar/tests/src/com/android/calendar/widget/ |
D | CalendarAppWidgetServiceTest.java | 82 Time time = new Time(); in setUp() local 83 time.setToNow(); in setUp() 84 time.monthDay += 1; in setUp() 85 time.hour = 2; in setUp() 86 time.minute = 0; in setUp() 87 time.second = 0; in setUp() 88 now = time.normalize(false); in setUp() 150 Time time = new Time(); in testGetAppWidgetModel_AllDayEventLater() local 151 time.set(now); in testGetAppWidgetModel_AllDayEventLater() 152 time.monthDay += 5; in testGetAppWidgetModel_AllDayEventLater() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/widget/ |
D | CalendarAppWidgetService.java | 441 Time time = new Time(); 442 time.setToNow(); 443 time.monthDay++; 444 time.hour = 0; 445 time.minute = 0; 446 time.second = 0; 447 long midnightDeviceTz = time.normalize(true); 449 time.timezone = timezone; 450 time.setToNow(); 451 time.monthDay++; [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/ |
D | SaveImage.java | 318 private void updateExifData(ExifInterface exif, long time) { in updateExifData() argument 320 exif.addDateTimeStampTag(ExifInterface.TAG_DATE_TIME, time, in updateExifData() 358 long time = System.currentTimeMillis(); in processAndSaveImage() local 359 updateExifData(exif, time); in processAndSaveImage() 362 … ContentValues values = getContentValues(mContext, mSelectedImageUri, mDestinationFile, time); in processAndSaveImage() 370 long time = System.currentTimeMillis(); in processAndSaveImage() local 371 updateExifData(exif, time); in processAndSaveImage() 383 mDestinationFile, time, !flatten); in processAndSaveImage() 420 long time = System.currentTimeMillis(); in processAndSaveImage() local 423 updateExifData(exif, time); in processAndSaveImage() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | profiler.h | 39 for (const auto &time : mTimes) { in ~Profiler() local 40 AKLOGI("(%d): Used %4.2f%%, %8.4f ms. Called %d times.", time.first, in ~Profiler() 41 time.second / totalTime * 100.0f, time.second, mCounters[time.first]); in ~Profiler() 66 timespec time; in getTimeInMicroSec() local 67 clock_gettime(mClockId, &time); in getTimeInMicroSec() 68 return static_cast<int64_t>(time.tv_sec) * 1000000 in getTimeInMicroSec() 69 + static_cast<int64_t>(time.tv_nsec) / 1000; in getTimeInMicroSec()
|
/packages/services/Car/tests/BugReportApp/utils/ |
D | bugreport_app_tester.py | 48 import time 307 timeout_at = time.time() + deadline_sec 308 last_fetch_at = time.time() 309 while time.time() < timeout_at: 310 remaining = timeout_at - time.time() 313 time.sleep(BUGREPORT_STATUS_POLL_TICK) 314 if time.time() - last_fetch_at < CHECK_STATUS_EVERY_SEC: 316 last_fetch_at = time.time() 533 time.sleep(META_BUGREPORT_WAIT_TIME_SEC)
|
/packages/apps/TV/src/com/android/tv/data/ |
D | ProgramDataManager.java | 147 Clock time, in ProgramDataManager() argument 154 mClock = time; in ProgramDataManager() 345 private int getProgramIndexAt(List<Program> programs, long time) { in getProgramIndexAt() argument 346 Program key = mZeroLengthProgramCache.get(time); in getProgramIndexAt() 348 key = createDummyProgram(time, time); in getProgramIndexAt() 349 mZeroLengthProgramCache.put(time, key); in getProgramIndexAt() 354 if (index > 0 && isProgramPlayedAt(programs.get(index - 1), time)) { in getProgramIndexAt() 363 private boolean isProgramPlayedAt(Program program, long time) { in isProgramPlayedAt() argument 364 return program.getStartTimeUtcMillis() <= time && time <= program.getEndTimeUtcMillis(); in isProgramPlayedAt() 500 long time = mClock.currentTimeMillis(); in ProgramsPrefetchTask() local [all …]
|
/packages/apps/QuickSearchBox/benchmarks/src/com/android/quicksearchbox/benchmarks/ |
D | SourceLatency.java | 74 public synchronized void addTime(long time) { in addTime() argument 75 mTotal += time; in addTime() 91 final ElapsedTime time = new ElapsedTime(); in checkSourceConcurrent() local 100 time.addTime(t); in checkSourceConcurrent() 111 while (time.getCount() < count) { in checkSourceConcurrent() 118 Log.d(TAG, src + "[DONE]: " + length + " queries in " + formatTime(time.getAverage()) in checkSourceConcurrent() 119 + " (average), " + formatTime(time.getTotal()) + " (total)"); in checkSourceConcurrent() 123 ElapsedTime time = new ElapsedTime(); in checkSource() local 127 time.addTime(t); in checkSource() 129 Log.d(TAG, src + "[DONE]: " + count + " queries in " + formatTime(time.getAverage()) in checkSource() [all …]
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarProvider2Test.java | 132 Time time = new Time(timeZone); in parseTimeStringToMillis() local 133 time.parse3339(timeStr); in parseTimeStringToMillis() 134 return time.toMillis(false /* use isDst */); in parseTimeStringToMillis() 343 Time time = new Time(DEFAULT_TIMEZONE); in DumpInstances() local 344 time.parse3339(startDate); in DumpInstances() 345 begin = time.toMillis(false /* use isDst */); in DumpInstances() 346 time.parse3339(endDate); in DumpInstances() 347 end = time.toMillis(false /* use isDst */); in DumpInstances() 367 Time time = new Time(DEFAULT_TIMEZONE); in QueryNumInstances() local 368 time.parse3339(startDate); in QueryNumInstances() [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
D | RoutineWatchEvaluatorTest.java | 137 Calendar time = Calendar.getInstance(); in testProgramTime_createFromProgram() local 138 int todayDayOfWeek = time.get(Calendar.DAY_OF_WEEK); in testProgramTime_createFromProgram() 307 Calendar time = Calendar.getInstance(); in todayAtHourMinSec() local 308 time.set(Calendar.HOUR_OF_DAY, hour); in todayAtHourMinSec() 309 time.set(Calendar.MINUTE, minute); in todayAtHourMinSec() 310 time.set(Calendar.SECOND, second); in todayAtHourMinSec() 311 return time; in todayAtHourMinSec() 315 Calendar time = todayAtHourMin(hour, minute); in tomorrowAtHourMin() local 316 time.add(Calendar.DATE, 1); in tomorrowAtHourMin() 317 return time; in tomorrowAtHourMin()
|
/packages/apps/TV/src/com/android/tv/recommendation/ |
D | RoutineWatchEvaluator.java | 205 static int getTimeOfDayInSec(Calendar time) { in getTimeOfDayInSec() argument 206 return time.get(Calendar.HOUR_OF_DAY) * 60 * 60 in getTimeOfDayInSec() 207 + time.get(Calendar.MINUTE) * 60 in getTimeOfDayInSec() 208 + time.get(Calendar.SECOND); in getTimeOfDayInSec() 236 Calendar time = Calendar.getInstance(); in createFromProgram() local 238 time.setTimeInMillis(p.getStartTimeUtcMillis()); in createFromProgram() 239 int weekDay = time.get(Calendar.DAY_OF_WEEK); in createFromProgram() 240 int startTimeOfDayInSec = getTimeOfDayInSec(time); in createFromProgram() 242 time.setTimeInMillis(p.getEndTimeUtcMillis()); in createFromProgram() 243 boolean dayChanged = (weekDay != time.get(Calendar.DAY_OF_WEEK)); in createFromProgram()
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarAlarmManager.java | 254 Time time = new Time(); in scheduleNextAlarmLocked() local 263 time.set(start); in scheduleNextAlarmLocked() 264 String startTimeStr = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked() 309 time.setToNow(); in scheduleNextAlarmLocked() 310 time.normalize(false); in scheduleNextAlarmLocked() 311 long localOffset = time.gmtoff * 1000; in scheduleNextAlarmLocked() 375 time.set(nextAlarmTime); in scheduleNextAlarmLocked() 376 String alarmTimeStr = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked() 396 time.set(alarmTime); in scheduleNextAlarmLocked() 397 String schedTime = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked() [all …]
|
/packages/services/Car/tests/carservice_test/src/com/android/car/ |
D | CarDiagnosticManagerTest.java | 291 long time = SystemClock.elapsedRealtimeNanos(); in testLiveFrameEvent() local 295 getMockedVehicleHal().injectEvent(mLiveFrameEventBuilder.build(time)); in testLiveFrameEvent() 296 assertTrue(listener.waitForEvent(time)); in testLiveFrameEvent() 580 long time = SystemClock.elapsedRealtimeNanos(); in testMultipleListeners() local 581 getMockedVehicleHal().injectEvent(mLiveFrameEventBuilder.build(time)); in testMultipleListeners() 582 assertTrue(listener1.waitForEvent(time)); in testMultipleListeners() 583 assertTrue(listener2.waitForEvent(time)); in testMultipleListeners() 610 time += 1000; in testMultipleListeners() 611 getMockedVehicleHal().injectEvent(mLiveFrameEventBuilder.build(time)); in testMultipleListeners() 612 assertFalse(listener1.waitForEvent(time)); in testMultipleListeners() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | MotionPauseDetector.java | 108 public void addPosition(float position, long time) { in addPosition() argument 116 long changeInTime = Math.max(1, time - mPreviousTime); in addPosition() 120 checkMotionPaused(velocity, mPreviousVelocity, time); in addPosition() 124 mPreviousTime = time; in addPosition() 128 private void checkMotionPaused(float velocity, float prevVelocity, long time) { in checkMotionPaused() argument 151 mSlowStartTime = time; in checkMotionPaused() 153 isPaused = time - mSlowStartTime >= HARDER_TRIGGER_TIMEOUT; in checkMotionPaused()
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | CalendarViewAdapter.java | 111 Time time = new Time(mTimeZone); in refresh() local 113 time.set(now); in refresh() 114 mTodayJulianDay = Time.getJulianDay(now, time.gmtoff); in refresh() 125 Time time = new Time(mTimeZone); in setMidnightHandler() local 126 time.set(now); in setMidnightHandler() 127 long runInMillis = (24 * 3600 - time.hour * 3600 - time.minute * 60 - in setMidnightHandler() 128 time.second + 1) * 1000; in setMidnightHandler() 291 public void setTime(long time) { in setTime() argument 292 mMilliTime = time; in setTime()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | BatteryInfo.java | 78 public void onDataPoint(long time, HistoryItem record) { in bindHistory() 79 lastTime = (int) time; in bindHistory() 299 void onDataPoint(long time, HistoryItem record); in onDataPoint() argument 323 historyStart = rec.time; in parse() 336 || rec.time < (historyStart + (5 * 60 * 1000L))) { in parse() 340 lastRealtime = rec.time; in parse() 347 historyEnd = rec.time; in parse() 364 curWalltime += rec.time - lastRealtime; in parse() 365 lastRealtime = rec.time; in parse() 380 curWalltime = startWalltime + (rec.time - historyStart); in parse() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryInfo.java | 80 public void onDataPoint(long time, HistoryItem record) { in bindHistory() 81 lastTime = (int) time; in bindHistory() 302 void onDataPoint(long time, HistoryItem record); in onDataPoint() argument 326 historyStart = rec.time; in parse() 339 || rec.time < (historyStart + (5 * 60 * 1000L))) { in parse() 343 lastRealtime = rec.time; in parse() 350 historyEnd = rec.time; in parse() 367 curWalltime += rec.time - lastRealtime; in parse() 368 lastRealtime = rec.time; in parse() 383 curWalltime = startWalltime + (rec.time - historyStart); in parse() [all …]
|
/packages/apps/Dialer/java/com/android/contacts/common/util/ |
D | DateUtils.java | 33 public static int getDayDifference(Time time, long date1, long date2) { in getDayDifference() argument 34 time.set(date1); in getDayDifference() 35 int startDay = Time.getJulianDay(date1, time.gmtoff); in getDayDifference() 37 time.set(date2); in getDayDifference() 38 int currentDay = Time.getJulianDay(date2, time.gmtoff); in getDayDifference()
|