/packages/apps/Messaging/src/com/android/messaging/util/ |
H A D | Dates.java | 59 * Get the relative time as a string 61 * @param time The time 63 * @return The relative time 65 public static CharSequence getRelativeTimeSpanString(final long time) { argument 67 if (now - time < DateUtils.MINUTE_IN_MILLIS) { 75 // here and use a slightly less precise time. 77 return DateUtils.getRelativeTimeSpanString(time, now, DateUtils.MINUTE_IN_MILLIS, 80 return getShortRelativeTimeSpanString(time); 84 public static CharSequence getConversationTimeString(final long time) { argument 88 getMessageTimeString(final long time) argument 92 getWidgetTimeString(final long time, final boolean abbreviated) argument 96 getFastScrollPreviewTimeString(final long time) argument 100 getMessageDetailsTimeString(final long time) argument 113 getTimeString(final long time, final boolean abbreviated, final boolean minPeriodToday) argument 127 getTimestamp(final long time, final long now, final boolean abbreviated, final Locale locale, final int flags, final boolean minPeriodToday) argument 161 getTodayTimeStamp(final long time, final int flags) argument 166 getExplicitFormattedTime(final long time, final int flags, final String format24, final String format12) argument 177 getThisWeekTimestamp(final long time, final Locale locale, final boolean abbreviated, final int flags) argument 195 getThisYearTimestamp(final long time, final Locale locale, final boolean abbreviated, final int flags) argument 215 getOlderThanAYearTimestamp(final long time, final Locale locale, final boolean abbreviated, final int flags) argument 238 getShortRelativeTimeSpanString(final long time) argument [all...] |
/packages/apps/Camera2/src/com/android/camera/stats/profiler/ |
H A D | ProfileBase.java | 22 * Basic profiler that will compute start, end and "time since last event" 49 // In most cases this will only be used to reset the lastMark time. 54 long time = System.nanoTime(); 55 onMark(getTotalMillis(time), getTimeFromLastMillis(time), reason); 56 mLastMark = time; 61 long time = System.nanoTime(); 62 onStop(getTotalMillis(time), getTimeFromLastMillis(time)); 63 mLastMark = time; [all...] |
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/ |
H A D | DateUtilTests.java | 34 Time time = new Time(); 37 assertEquals(0, DateUtils.getDayDifference(time, date1, date2)); 38 assertEquals(0, DateUtils.getDayDifference(time, date2, date1)); 45 Time time = new Time(); 48 assertEquals(1, DateUtils.getDayDifference(time, date1, date2)); 49 assertEquals(1, DateUtils.getDayDifference(time, date2, date1)); 56 Time time = new Time(); 59 assertEquals(2, DateUtils.getDayDifference(time, date1, date2)); 60 assertEquals(2, DateUtils.getDayDifference(time, date2, date1));
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
H A D | profiler.h | 38 AKLOGI("Total time is %6.3f ms.", totalTime); 39 for (const auto &time : mTimes) { 40 AKLOGI("(%d): Used %4.2f%%, %8.4f ms. Called %d times.", time.first, 41 time.second / totalTime * 100.0f, time.second, mCounters[time.first]); 66 timespec time; local 67 clock_gettime(mClockId, &time); 68 return static_cast<int64_t>(time.tv_sec) * 1000000 69 + static_cast<int64_t>(time [all...] |
H A D | time_keeper.cpp | 28 sCurrentTime = time(0);
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/util/ |
H A D | MockClock.java | 20 /** Current time. Only updated with advance(). */ 38 public void setCurrentTimeMillis(long time) { argument 39 mCurrentTimeMillis = time;
|
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
H A D | ControllerOverlay.java | 26 void onSeekMove(int time); argument 27 void onSeekEnd(int time, int trimStartTime, int trimEndTime); argument
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
H A D | GestureStrokeRecognitionPoints.java | 180 public void duplicateLastPointWith(final int time) { argument 187 x, y, time)); 190 appendPoint(x, y, time); 191 updateIncrementalRecognitionSize(x, y, time); 206 private void appendPoint(final int x, final int y, final int time) { argument 209 // time than the next {@link MotionEvent}. To maintain the monotonicity of the event time, 211 if (lastIndex >= 0 && mEventTimes.get(lastIndex) > time) { 213 x, y, time, mXCoordinates.get(lastIndex), mYCoordinates.get(lastIndex), 217 mEventTimes.add(time); 222 updateMajorEvent(final int x, final int y, final int time) argument 232 detectFastMove(final int x, final int y, final int time) argument 272 addEventPoint(final int x, final int y, final int time, final boolean isMajorEvent) argument 292 updateIncrementalRecognitionSize(final int x, final int y, final int time) argument [all...] |
/packages/apps/Nfc/nci/jni/ |
H A D | IntervalTimer.h | 21 #include <time.h>
|
/packages/apps/Calendar/src/com/android/calendar/month/ |
H A D | SimpleWeekView.java | 77 * How many days to display at a time. Days will be displayed starting with 118 // Cache the number strings so we don't have to recompute them each time 210 * @param tz The time zone this view should reference times in 247 Time time = new Time(tz); 248 time.setJulianDay(julianMonday); 253 mDayNumbers[0] = Integer.toString(time.getWeekNumber()); 264 if (time.weekDay != mWeekStart) { 265 int diff = time.weekDay - mWeekStart; 269 time.monthDay -= diff; 270 time [all...] |
/packages/apps/Calendar/tests/src/com/android/calendar/widget/ |
H A D | CalendarAppWidgetServiceTest.java | 80 // Set the "current time" to 2am tomorrow. 81 Time time = new Time(); 82 time.setToNow(); 83 time.monthDay += 1; 84 time.hour = 2; 85 time.minute = 0; 86 time.second = 0; 87 now = time.normalize(false); 148 // Set the start time to 5 days from now at midnight UTC. 149 Time time [all...] |
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/common/ |
H A D | InputPointersTests.java | 59 final int time = i * 4; 60 src.addPointer(x, y, pointerId, time); 67 final int time = i * 4; 71 assertEquals("times at " + i, time, src.getTimes()[i]); 82 final int time = i * 4; 83 src.addPointerAt(i, x, y, pointerId, time); 90 final int time = i * 4; 94 assertEquals("times at " + i, time, src.getTimes()[i]); 105 final int time = i * 4; 106 src.addPointer(x, y, pointerId, time); [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/anim/ |
H A D | Animation.java | 23 // Animation calculates a value according to the current input time. 27 // 2. Then we should call start(). The actual start time is the first value 29 // 3. Each time we want to get an animation value, we call 68 public void setStartTime(long time) { argument 69 mStartTime = time;
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
H A D | BatteryFlagParser.java | 50 public void onDataPoint(long time, HistoryItem record) { argument 53 mData.put((int) time, isSet); 56 mLastTime = time;
|
H A D | BatteryCellParser.java | 54 public void onDataPoint(long time, HistoryItem record) { argument 57 mData.put((int) time, value); 60 mLastTime = time;
|
/packages/apps/UnifiedEmail/src/com/android/mail/analytics/ |
H A D | AnalyticsTimer.java | 25 * Generic static singleton timer that keeps track of start time of various events. It logs the 52 * Record the current time as the start time of the provided id. If the id has a previously 53 * recorded start time, that time is overwritten. 67 * start time. 84 * Same as logDuration except with the logged time returned (or exception thrown) 85 * @return logged time in millis 94 final long time = SystemClock.uptimeMillis() - value; 95 Analytics.getInstance().sendTiming(category, time, nam [all...] |
/packages/services/Car/service/jni/ |
H A D | com_android_car_CarInputService.cpp | 21 #include <sys/time.h> 70 // kernel driver is not using time now, but set it to be safe. 71 ev[0].time = now; 76 ev[1].time = now;
|
/packages/apps/Launcher3/src/com/android/launcher3/util/ |
H A D | FlingAnimation.java | 61 * - The animation runs for the time taken by the object to go out of the screen. 63 * {@link #mIconRect} in the given time. 89 * - The animation runs for the time taken by the object to go out of the screen. 91 * {@link #mIconRect} in the given time. 127 final float time = t * mDuration; 128 dragView.setTranslationX(time * mUX + mFrom.left + mAX * time * time / 2); 129 dragView.setTranslationY(time * mUY + mFrom.top + mAY * time * tim [all...] |
/packages/apps/TV/tests/unit/src/com/android/tv/data/ |
H A D | WatchedHistoryManagerTest.java | 39 // Wait time for expected success. 79 long time = System.currentTimeMillis(); 82 mWatchedHistoryManager.logChannelViewStop(channel, time, duration); 88 assertEquals(record.watchedStartTime, time - duration); 97 long time = System.currentTimeMillis(); 103 mWatchedHistoryManager.logChannelViewStop(channel, time + duration * i, duration); 129 long time = System.currentTimeMillis(); 131 WatchedRecord record = new WatchedRecord(fakeId, time, duration);
|
/packages/apps/TV/src/com/android/tv/recommendation/ |
H A D | RoutineWatchEvaluator.java | 197 static int getTimeOfDayInSec(Calendar time) { argument 198 return time.get(Calendar.HOUR_OF_DAY) * 60 * 60 199 + time.get(Calendar.MINUTE) * 60 200 + time.get(Calendar.SECOND); 227 Calendar time = Calendar.getInstance(); 229 time.setTimeInMillis(p.getStartTimeUtcMillis()); 230 int weekDay = time.get(Calendar.DAY_OF_WEEK); 231 int startTimeOfDayInSec = getTimeOfDayInSec(time); 233 time.setTimeInMillis(p.getEndTimeUtcMillis()); 234 boolean dayChanged = (weekDay != time [all...] |
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
H A D | RoutineWatchEvaluatorTest.java | 114 Calendar time = Calendar.getInstance(); 115 int todayDayOfWeek = time.get(Calendar.DAY_OF_WEEK); 166 // Check intersection time and commutative law in all cases. 242 Calendar time = Calendar.getInstance(); 243 time.set(Calendar.HOUR_OF_DAY, hour); 244 time.set(Calendar.MINUTE, minute); 245 time.set(Calendar.SECOND, second); 246 return time; 250 Calendar time = todayAtHourMin(hour, minute); 251 time [all...] |
/packages/apps/Calendar/src/com/android/calendar/widget/ |
H A D | CalendarAppWidgetService.java | 103 * Update interval used when no next-update calculated, or bad trigger time in past. 117 // Suppress unnecessary logging about update time. Need to be static as this object is 365 * until some time in the future. Widen the time range that we query by 368 * in the list of events starting at midnight local time. This may fetch 377 // Search for events from now until some time in the future 421 * Calculates and returns the next time we should push widget updates. 432 // We want to update widget when we enter/exit time range of an event. 443 Time time = new Time(); 444 time [all...] |
/packages/apps/DeskClock/src/com/android/deskclock/timer/ |
H A D | CountingTimerView.java | 36 * Class to measure and draw the time in the {@link com.android.deskclock.CircleTimerView}. 39 * drawing digits (and optional label) of the time set in {@link #setTime(long, boolean, boolean)} 63 // Hours and minutes are signed for when a timer goes past the set time and thus negative 135 protected void updateWidth(final String time) { argument 138 mWidth = time.length() * mEm; 145 public float calcTotalWidth(final String time) { argument 146 if (time != null) { 147 updateWidth(time); 160 * Draws each character with a fixed spacing from time starting at ii. 161 * @param canvas the canvas on which the time segmen 168 drawTime(Canvas canvas, final String time, int ii, float x, float y) argument 187 draw(Canvas canvas, final String time, float x, float y) argument 205 draw(Canvas canvas, final String time, float x, float y) argument 221 updateWidth(final String time) argument 243 draw(Canvas canvas, final String time, float x, float y) argument 321 setTime(long time, boolean showHundredths, boolean update) argument [all...] |
/packages/apps/Email/src/com/android/email/activity/ |
H A D | EventViewer.java | 67 long time; 69 time = Utility.parseEmailDateTimeToMillis(info.get(MeetingInfo.MEETING_DTSTART)); 74 uri = Uri.parse("content://com.android.calendar/time/" + time);
|
/packages/apps/TV/src/com/android/tv/guide/ |
H A D | TimeListAdapter.java | 33 * Adapts the time range from {@link ProgramManager} to the timeline header row of the program 40 // Nearest half hour at or before the start time. 72 TextView textView = (TextView) itemView.findViewById(R.id.time); 73 String time = DateFormat.getTimeFormat(itemView.getContext()).format(new Date(startTime)); 74 textView.setText(time);
|