Home
last modified time | relevance | path

Searched refs:time (Results 1 – 25 of 178) sorted by relevance

12345678

/packages/apps/Messaging/src/com/android/messaging/util/
DDates.java65 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/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/
DGestureStrokeRecognitionPoints.java180 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/Calendar/src/com/android/calendar/month/
DSimpleWeekView.java247 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/apps/Camera2/src/com/android/camera/stats/profiler/
DProfileBase.java54 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/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/
DInputPointersTests.java59 final int time = i * 4; in testAdd() local
60 src.addPointer(x, y, pointerId, time); in testAdd()
67 final int time = i * 4; in testAdd() local
71 assertEquals("times at " + i, time, src.getTimes()[i]); in testAdd()
82 final int time = i * 4; in testAddAt() local
83 src.addPointerAt(i, x, y, pointerId, time); in testAddAt()
90 final int time = i * 4; in testAddAt() local
94 assertEquals("times at " + i, time, src.getTimes()[i]); in testAddAt()
105 final int time = i * 4; in testSet() local
106 src.addPointer(x, y, pointerId, time); in testSet()
[all …]
/packages/apps/Calendar/tests/src/com/android/calendar/widget/
DCalendarAppWidgetServiceTest.java81 Time time = new Time(); in setUp() local
82 time.setToNow(); in setUp()
83 time.monthDay += 1; in setUp()
84 time.hour = 2; in setUp()
85 time.minute = 0; in setUp()
86 time.second = 0; in setUp()
87 now = time.normalize(false); in setUp()
149 Time time = new Time(); in testGetAppWidgetModel_AllDayEventLater() local
150 time.set(now); in testGetAppWidgetModel_AllDayEventLater()
151 time.monthDay += 5; in testGetAppWidgetModel_AllDayEventLater()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/timer/
DCountingTimerView.java135 protected void updateWidth(final String time) { in updateWidth() argument
138 mWidth = time.length() * mEm; in updateWidth()
145 public float calcTotalWidth(final String time) { in calcTotalWidth() argument
146 if (time != null) { in calcTotalWidth()
147 updateWidth(time); in calcTotalWidth()
168 protected float drawTime(Canvas canvas, final String time, int ii, float x, float y) { in drawTime() argument
170 while (ii < time.length()) { in drawTime()
172 canvas.drawText(time.substring(ii, ii + 1), x, y, mPaint); in drawTime()
187 public float draw(Canvas canvas, final String time, float x, float y) { in draw() argument
188 return drawTime(canvas, time, 0, x, y) + getLabelWidth(); in draw()
[all …]
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/
DDateUtilTests.java34 Time time = new Time(); in testDayDiffNone() local
37 assertEquals(0, DateUtils.getDayDifference(time, date1, date2)); in testDayDiffNone()
38 assertEquals(0, DateUtils.getDayDifference(time, date2, date1)); in testDayDiffNone()
45 Time time = new Time(); in testDayDiffOne() local
48 assertEquals(1, DateUtils.getDayDifference(time, date1, date2)); in testDayDiffOne()
49 assertEquals(1, DateUtils.getDayDifference(time, date2, date1)); in testDayDiffOne()
56 Time time = new Time(); in testDayDiffTwo() local
59 assertEquals(2, DateUtils.getDayDifference(time, date1, date2)); in testDayDiffTwo()
60 assertEquals(2, DateUtils.getDayDifference(time, date2, date1)); in testDayDiffTwo()
/packages/inputmethods/LatinIME/native/jni/src/utils/
Dprofiler.h39 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/apps/Calendar/src/com/android/calendar/widget/
DCalendarAppWidgetService.java443 Time time = new Time();
444 time.setToNow();
445 time.monthDay++;
446 time.hour = 0;
447 time.minute = 0;
448 time.second = 0;
449 long midnightDeviceTz = time.normalize(true);
451 time.timezone = timezone;
452 time.setToNow();
453 time.monthDay++;
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/
DSaveImage.java318 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/apps/TV/src/com/android/tv/data/
DProgramDataManager.java121 ProgramDataManager(ContentResolver contentResolver, Clock time, Looper looper) { in ProgramDataManager() argument
122 mClock = time; in ProgramDataManager()
295 private int getProgramIndexAt(List<Program> programs, long time) { in getProgramIndexAt() argument
296 Program key = mZeroLengthProgramCache.get(time); in getProgramIndexAt()
298 key = createDummyProgram(time, time); in getProgramIndexAt()
299 mZeroLengthProgramCache.put(time, key); in getProgramIndexAt()
304 if (index > 0 && isProgramPlayedAt(programs.get(index - 1), time)) { in getProgramIndexAt()
313 private boolean isProgramPlayedAt(Program program, long time) { in isProgramPlayedAt() argument
314 return program.getStartTimeUtcMillis() <= time && time <= program.getEndTimeUtcMillis(); in isProgramPlayedAt()
443 long time = mClock.currentTimeMillis(); in ProgramsPrefetchTask() local
[all …]
/packages/apps/Calendar/src/com/android/calendar/agenda/
DAgendaWindowAdapter.java325 Time time = new Time(); in toString() local
327 time.setJulianDay(start); in toString()
328 time.normalize(false); in toString()
329 sb.append("Start:").append(time.toString()); in toString()
330 time.setJulianDay(end); in toString()
331 time.normalize(false); in toString()
332 sb.append(" End:").append(time.toString()); in toString()
534 private int findEventPositionNearestTime(Time time, long id) { in findEventPositionNearestTime() argument
535 DayAdapterInfo info = getAdapterInfoByTime(time); in findEventPositionNearestTime()
538 pos = info.offset + info.dayAdapter.findEventPositionNearestTime(time, id); in findEventPositionNearestTime()
[all …]
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DCalendarAlarmManager.java223 Time time = new Time(); in scheduleNextAlarmCheck() local
224 time.set(triggerTimeMillis); in scheduleNextAlarmCheck()
225 String timeStr = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmCheck()
307 Time time = new Time(); in scheduleNextAlarmLocked() local
313 time.set(start); in scheduleNextAlarmLocked()
314 String startTimeStr = time.format(" %a, %b %d, %Y %I:%M%P"); in scheduleNextAlarmLocked()
359 time.setToNow(); in scheduleNextAlarmLocked()
360 time.normalize(false); in scheduleNextAlarmLocked()
361 long localOffset = time.gmtoff * 1000; in scheduleNextAlarmLocked()
425 time.set(nextAlarmTime); in scheduleNextAlarmLocked()
[all …]
DCalendarDatabaseHelper.java1472 private static boolean fixAllDayTime(Time time, String timezone, Long timeInMillis) { in fixAllDayTime() argument
1473 time.set(timeInMillis); in fixAllDayTime()
1474 if(time.hour != 0 || time.minute != 0 || time.second != 0) { in fixAllDayTime()
1475 time.hour = 0; in fixAllDayTime()
1476 time.minute = 0; in fixAllDayTime()
1477 time.second = 0; in fixAllDayTime()
2541 Time time = new Time(); in upgradeToVersion69() local
2572 time.clear(timezone); in upgradeToVersion69()
2573 update |= fixAllDayTime(time, timezone, dtstart); in upgradeToVersion69()
2574 dtstart = time.normalize(false); in upgradeToVersion69()
[all …]
/packages/apps/QuickSearchBox/benchmarks/src/com/android/quicksearchbox/benchmarks/
DSourceLatency.java74 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/apps/Launcher3/src/com/android/launcher3/util/
DFlingAnimation.java99 final float time = t * mDuration; in onAnimationUpdate() local
100 dragView.setTranslationX(time * mUX + mFrom.left + mAX * time * time / 2); in onAnimationUpdate()
101 dragView.setTranslationY(time * mUY + mFrom.top + mAY * time * time / 2); in onAnimationUpdate()
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/
DRoutineWatchEvaluatorTest.java114 Calendar time = Calendar.getInstance(); in testProgramTime_createFromProgram() local
115 int todayDayOfWeek = time.get(Calendar.DAY_OF_WEEK); in testProgramTime_createFromProgram()
242 Calendar time = Calendar.getInstance(); in todayAtHourMinSec() local
243 time.set(Calendar.HOUR_OF_DAY, hour); in todayAtHourMinSec()
244 time.set(Calendar.MINUTE, minute); in todayAtHourMinSec()
245 time.set(Calendar.SECOND, second); in todayAtHourMinSec()
246 return time; in todayAtHourMinSec()
250 Calendar time = todayAtHourMin(hour, minute); in tomorrowAtHourMin() local
251 time.add(Calendar.DATE, 1); in tomorrowAtHourMin()
252 return time; in tomorrowAtHourMin()
/packages/apps/TV/src/com/android/tv/recommendation/
DRoutineWatchEvaluator.java197 static int getTimeOfDayInSec(Calendar time) { in getTimeOfDayInSec() argument
198 return time.get(Calendar.HOUR_OF_DAY) * 60 * 60 in getTimeOfDayInSec()
199 + time.get(Calendar.MINUTE) * 60 in getTimeOfDayInSec()
200 + time.get(Calendar.SECOND); in getTimeOfDayInSec()
227 Calendar time = Calendar.getInstance(); in createFromProgram() local
229 time.setTimeInMillis(p.getStartTimeUtcMillis()); in createFromProgram()
230 int weekDay = time.get(Calendar.DAY_OF_WEEK); in createFromProgram()
231 int startTimeOfDayInSec = getTimeOfDayInSec(time); in createFromProgram()
233 time.setTimeInMillis(p.getEndTimeUtcMillis()); in createFromProgram()
234 boolean dayChanged = (weekDay != time.get(Calendar.DAY_OF_WEEK)); in createFromProgram()
/packages/apps/TV/tests/unit/src/com/android/tv/data/
DWatchedHistoryManagerTest.java79 long time = System.currentTimeMillis(); in testLogChannelViewStop() local
82 mWatchedHistoryManager.logChannelViewStop(channel, time, duration); in testLogChannelViewStop()
88 assertEquals(record.watchedStartTime, time - duration); in testLogChannelViewStop()
97 long time = System.currentTimeMillis(); in testCircularHistoryQueue() local
103 mWatchedHistoryManager.logChannelViewStop(channel, time + duration * i, duration); in testCircularHistoryQueue()
129 long time = System.currentTimeMillis(); in testEncodeDecodeWatchedRecord() local
131 WatchedRecord record = new WatchedRecord(fakeId, time, duration); in testEncodeDecodeWatchedRecord()
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java307 Time time = new Time(DEFAULT_TIMEZONE); in DumpInstances() local
308 time.parse3339(startDate); in DumpInstances()
309 begin = time.toMillis(false /* use isDst */); in DumpInstances()
310 time.parse3339(endDate); in DumpInstances()
311 end = time.toMillis(false /* use isDst */); in DumpInstances()
331 Time time = new Time(DEFAULT_TIMEZONE); in QueryNumInstances() local
332 time.parse3339(startDate); in QueryNumInstances()
333 begin = time.toMillis(false /* use isDst */); in QueryNumInstances()
334 time.parse3339(endDate); in QueryNumInstances()
335 end = time.toMillis(false /* use isDst */); in QueryNumInstances()
[all …]
/packages/apps/Settings/src/com/android/settings/widget/
DChartDataUsageView.java450 final Time time = new Time(); in getTickPoints() local
451 time.set(mMax); in getTickPoints()
452 time.monthDay -= time.weekDay - FIRST_DAY_OF_WEEK; in getTickPoints()
453 time.hour = time.minute = time.second = 0; in getTickPoints()
455 time.normalize(true); in getTickPoints()
456 long timeMillis = time.toMillis(true); in getTickPoints()
461 time.monthDay -= 7; in getTickPoints()
462 time.normalize(true); in getTickPoints()
463 timeMillis = time.toMillis(true); in getTickPoints()
/packages/apps/Calendar/src/com/android/calendar/
DCalendarViewAdapter.java111 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()
305 public void setTime(long time) { in setTime() argument
306 mMilliTime = time; in setTime()
/packages/apps/Calendar/src/com/android/calendar/alerts/
DAlertUtils.java157 Time time = new Time(tz);
158 time.setToNow();
159 int today = Time.getJulianDay(time.toMillis(false), time.gmtoff);
160 time.set(startMillis);
161 int eventDay = Time.getJulianDay(time.toMillis(false), allDay ? 0 : time.gmtoff);
182 time.set(startMillis);
183 boolean isDST = time.isDst != 0;
/packages/apps/Camera2/src/com/android/camera/ui/
DDetailsDialog.java121 double time = Double.valueOf(value);
122 if (time < 1.0f) {
124 (int) (0.5f + 1 / time));
126 int integer = (int) time;
127 time -= integer;
129 if (time > 0.0001) {
131 (int) (0.5f + 1 / time));
298 return context.getString(R.string.time);

12345678