/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | ScheduleConditionProviderTest.java | 84 Calendar now = getNow(); in testEvaluateSubscription_noAlarmExit_InSchedule() local 89 info.startHour = now.get(Calendar.HOUR_OF_DAY); in testEvaluateSubscription_noAlarmExit_InSchedule() 90 info.startMinute = now.get(Calendar.MINUTE); in testEvaluateSubscription_noAlarmExit_InSchedule() 93 info.endHour = now.get(Calendar.HOUR_OF_DAY) + 1; in testEvaluateSubscription_noAlarmExit_InSchedule() 98 assertTrue(cal.isInSchedule(now.getTimeInMillis())); in testEvaluateSubscription_noAlarmExit_InSchedule() 101 conditionId, cal, now.getTimeInMillis(), now.getTimeInMillis() + 1000); in testEvaluateSubscription_noAlarmExit_InSchedule() 108 Calendar now = getNow(); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() local 113 info.startHour = now.get(Calendar.HOUR_OF_DAY); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() 114 info.startMinute = now.get(Calendar.MINUTE); in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() 117 info.endHour = now.get(Calendar.HOUR_OF_DAY) + 1; in testEvaluateSubscription_noAlarmExit_InScheduleSnoozed() [all …]
|
/frameworks/base/core/java/com/android/internal/app/procstats/ |
D | ServiceState.java | 103 public void setMemFactor(int memFactor, long now) { in setMemFactor() argument 105 setRestarting(true, memFactor, now); in setMemFactor() 108 setStarted(true, memFactor, now); in setMemFactor() 111 setBound(true, memFactor, now); in setMemFactor() 114 setExecuting(true, memFactor, now); in setMemFactor() 117 setForeground(true, memFactor, now); in setMemFactor() 133 long now = SystemClock.uptimeMillis(); in applyNewOwner() local 138 setStarted(false, 0, now); in applyNewOwner() 144 setBound(false, 0, now); in applyNewOwner() 150 setExecuting(false, 0, now); in applyNewOwner() [all …]
|
D | UidState.java | 73 public void updateCombinedState(int state, long now) { in updateCombinedState() argument 75 updateCombinedState(now); in updateCombinedState() 83 public void updateCombinedState(long now) { in updateCombinedState() argument 84 setCombinedStateInner(calcCombinedState(), now); in updateCombinedState() local 108 private void setCombinedStateInner(int state, long now) { in setCombinedStateInner() argument 110 if (now >= 0) { in setCombinedStateInner() 111 commitStateTime(now); in setCombinedStateInner() 114 mTotalRunningDuration += now - mTotalRunningStartTime; in setCombinedStateInner() 135 public void commitStateTime(long now) { in commitStateTime() argument 137 long dur = now - mStartTime; in commitStateTime() [all …]
|
D | AssociationState.java | 113 public void trackProcState(int procState, int seq, long now) { in trackProcState() argument 129 mTrackingUptime = now; in trackProcState() 138 commonSource.trackProcState(processState, seq, now); in trackProcState() 144 final long now = start(-1); in start() local 148 commonSource.start(now); in start() 151 return now; in start() 154 long start(long now) { in start() argument 157 if (now < 0) { in start() 158 now = SystemClock.uptimeMillis(); in start() 161 mStartUptime = now; in start() [all …]
|
D | ProcessState.java | 197 long now) { in ProcessState() argument 205 mStartTime = now; in ProcessState() 207 mTotalRunningStartTime = now; in ProcessState() 213 public ProcessState clone(long now) { in clone() argument 214 ProcessState pnew = new ProcessState(this, mPackage, mUid, mVersion, mName, now); in clone() 218 pnew.mTotalRunningDuration = getTotalRunningDuration(now); in clone() 298 public void resetSafely(long now) { in resetSafely() argument 301 mStartTime = now; in resetSafely() 312 state.resetSafely(now); in resetSafely() 332 public void writeToParcel(Parcel out, long now) { in writeToParcel() argument [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | BaseAppStateDurationsTracker.java | 94 long getTotalDurations(String packageName, int uid, long now, int index, boolean bgOnly) { in getTotalDurations() argument 105 return res.getTotalDurations(now, index); in getTotalDurations() 108 return durations.getTotalDurations(now, index); in getTotalDurations() 112 long getTotalDurations(String packageName, int uid, long now, int index) { in getTotalDurations() argument 113 return getTotalDurations(packageName, uid, now, index, true /* bgOnly */); in getTotalDurations() 116 long getTotalDurations(String packageName, int uid, long now) { in getTotalDurations() argument 117 return getTotalDurations(packageName, uid, now, SimplePackageDurations.DEFAULT_INDEX); in getTotalDurations() 120 long getTotalDurations(int uid, long now, int index, boolean bgOnly) { in getTotalDurations() argument 132 return durations.getTotalDurations(now, index); in getTotalDurations() 136 long getTotalDurations(int uid, long now, int index) { in getTotalDurations() argument [all …]
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/ |
D | JobPackageTracker.java | 94 public long getActiveTime(long now) { in getActiveTime() argument 97 time += now - activeStartTime; in getActiveTime() 102 public long getActiveTopTime(long now) { in getActiveTopTime() argument 105 time += now - activeTopStartTime; in getActiveTopTime() 110 public long getPendingTime(long now) { in getPendingTime() argument 113 time += now - pendingStartTime; in getPendingTime() 162 long getTotalTime(long now) { in getTotalTime() argument 166 return now - mStartUptimeTime; in getTotalTime() 169 void incPending(int uid, String pkg, long now) { in incPending() argument 172 pe.pendingStartTime = now; in incPending() [all …]
|
/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/ |
D | MidiBtleTimeTracker.java | 40 public MidiBtleTimeTracker(long now) { in MidiBtleTimeTracker() argument 42 mBaseHostTimeNanos = now; in MidiBtleTimeTracker() 43 mPreviousNow = now; in MidiBtleTimeTracker() 53 public long convertTimestampToNanotime(int timestamp, long now) { in convertTimestampToNanotime() argument 63 if ((now - mPreviousNow) > (RANGE_NANOS / 2)) { in convertTimestampToNanotime() 65 long minimumTimeNanos = (now - mBaseHostTimeNanos) in convertTimestampToNanotime() 78 if (timestampHostNanos > now) { in convertTimestampToNanotime() 80 mBaseHostTimeNanos = now; in convertTimestampToNanotime() 81 timestampHostNanos = now; in convertTimestampToNanotime() 84 long windowBottom = now - mWindowNanos; in convertTimestampToNanotime() [all …]
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | SnapshotStatistics.java | 314 private Stats(long now) { in Stats() argument 315 mStartTimeUs = now; in Stats() 370 private void dumpPrefix(PrintWriter pw, String indent, long now, boolean header, in dumpPrefix() argument 376 pw.format(Locale.US, "%11s", durationToString(now - mStartTimeUs)); in dumpPrefix() 378 pw.format(Locale.US, " %11s", durationToString(now - mStopTimeUs)); in dumpPrefix() 394 private void dumpStats(PrintWriter pw, String indent, long now, boolean header) { in dumpStats() argument 395 dumpPrefix(pw, indent, now, header, "Summary stats"); in dumpStats() 412 private void dumpTimes(PrintWriter pw, String indent, long now, boolean header) { in dumpTimes() argument 413 dumpPrefix(pw, indent, now, header, "Build times"); in dumpTimes() 433 private void dumpUsage(PrintWriter pw, String indent, long now, boolean header) { in dumpUsage() argument [all …]
|
/frameworks/native/opengl/tests/finish/ |
D | finish.cpp | 77 long long now, t; in main() local 90 now = systemTime(); in main() 93 printf("memcpy() time = %llu us\n", (t-now)/1000); in main() 107 now = systemTime(); in main() 111 printf("glFinish() time = %llu us\n", (t-now)/1000); in main() 121 now = systemTime(); in main() 125 printf("glFinish() time = %llu us\n", (t-now)/1000); in main() 135 now = systemTime(); in main() 140 printf("glFinish() time = %llu us\n", (t-now)/1000); in main() 150 now = systemTime(); in main() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/usage/ |
D | UserUsageStatsServiceTest.java | 108 long now = System.currentTimeMillis(); in testReportEvent_eventAppearsInQueries() local 109 long startTime = now - TIME_INTERVAL_MILLIS; in testReportEvent_eventAppearsInQueries() 111 startTime, now, TEST_PACKAGE_NAME, false /* includeTaskRoot */); in testReportEvent_eventAppearsInQueries() 135 long now = System.currentTimeMillis(); in testReportEvent_packageUsedEventNotTracked() local 136 long startTime = now - TIME_INTERVAL_MILLIS; in testReportEvent_packageUsedEventNotTracked() 138 startTime, now, TEST_PACKAGE_NAME, false /* includeTaskRoot */); in testReportEvent_packageUsedEventNotTracked() 163 long now = System.currentTimeMillis(); in testQueryEarliestEventsForPackage() local 164 long startTime = now - TIME_INTERVAL_MILLIS; in testQueryEarliestEventsForPackage() 166 startTime, now, TEST_PACKAGE_NAME, ACTIVITY_RESUMED); in testQueryEarliestEventsForPackage() 200 long now = System.currentTimeMillis(); in testQueryEarliestEventsForPackage_Caching() local [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/ |
D | CountQuotaTrackerTest.java | 215 long now = mInjector.getElapsedRealtime(); in logEventAt() local 218 mInjector.mElapsedTime = now; in logEventAt() 232 final long now = mInjector.getElapsedRealtime(); in testDeleteObsoleteEventsLocked() local 234 logEventAt(now - 6 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked() 235 logEventAt(now - 5 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked() 236 logEventAt(now - 4 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked() 237 logEventAt(now - 3 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked() 238 logEventAt(now - 2 * HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked() 239 logEventAt(now - HOUR_IN_MILLIS); in testDeleteObsoleteEventsLocked() 240 logEventAt(now - 1); in testDeleteObsoleteEventsLocked() [all …]
|
/frameworks/base/services/core/java/com/android/server/notification/ |
D | RateEstimator.java | 38 public void update(long now) { in update() argument 41 mInterarrivalTime = getInterarrivalEstimate(now); in update() 43 mLastEventTime = now; in update() 47 public float getRate(long now) { in getRate() argument 51 return (float) (1.0 / getInterarrivalEstimate(now)); in getRate() 55 private double getInterarrivalEstimate(long now) { in getInterarrivalEstimate() argument 56 double dt = ((double) (now - mLastEventTime)) / 1000.0; in getInterarrivalEstimate()
|
D | NotificationBitmapJobService.java | 78 ZonedDateTime now = Instant.now().atZone(zoneId); in getRunAfterMs() local 80 LocalDate today = now.toLocalDate(); in getRunAfterMs() 86 return getTimeUntilRemoval(now, today2AM, tomorrow2AM); in getRunAfterMs() 90 static long getTimeUntilRemoval(ZonedDateTime now, ZonedDateTime today2AM, in getTimeUntilRemoval() argument 92 if (Duration.between(now, today2AM).isNegative()) { in getTimeUntilRemoval() 93 return Duration.between(now, tomorrow2AM).toMillis(); in getTimeUntilRemoval() 95 return Duration.between(now, today2AM).toMillis(); in getTimeUntilRemoval()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | WindowOrientationListener.java | 708 final long now = event.timestamp; in onSensorChanged() local 710 final float timeDeltaMS = (now - then) * 0.000001f; in onSensorChanged() 712 if (now < then in onSensorChanged() 713 || now > then + MAX_FILTER_DELTA_TIME_NANOS in onSensorChanged() 732 mLastFilteredTimestampNanos = now; in onSensorChanged() 753 mAccelerationTimestampNanos = now; in onSensorChanged() 764 addTiltHistoryEntryLocked(now, tiltAngle); in onSensorChanged() 767 if (isFlatLocked(now)) { in onSensorChanged() 769 mFlatTimestampNanos = now; in onSensorChanged() 771 if (isSwingingLocked(now, tiltAngle)) { in onSensorChanged() [all …]
|
/frameworks/native/services/surfaceflinger/Scheduler/ |
D | VSyncDispatchTimerQueue.cpp | 47 void traceEntry(const VSyncDispatchTimerQueueEntry& entry, nsecs_t now) { in traceEntry() argument 53 ns2us(*entry.wakeupTime() - now), "us; VSYNC in ", in traceEntry() 54 ns2us(*entry.targetVsync() - now), "us"); in traceEntry() 100 VSyncTracker& tracker, nsecs_t now) { in schedule() argument 104 now + timing.workDuration + in schedule() 121 nextWakeupTime = std::max(now, nextVsyncTime - timing.workDuration - timing.readyDuration); in schedule() 137 VSyncTracker& tracker, nsecs_t now, VSyncDispatch::ScheduleTiming timing) { in addPendingWorkloadUpdate() argument 139 const auto armedInfo = getArmedInfo(tracker, now, timing, mArmedInfo); in addPendingWorkloadUpdate() 171 auto VSyncDispatchTimerQueueEntry::getArmedInfo(VSyncTracker& tracker, nsecs_t now, in getArmedInfo() argument 176 const auto earliestReadyBy = now + timing.workDuration + timing.readyDuration; in getArmedInfo() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/ |
D | ActiveServicesTest.java | 91 final long now = SystemClock.uptimeMillis(); in testRescheduleServiceRestartsOnChanges() local 101 fillInRestartingServices(now, new long[] {rd0, rd1, rd2, rd3, rd4, rd5}); in testRescheduleServiceRestartsOnChanges() 104 mActiveServices.rescheduleServiceRestartOnMemoryPressureIfNeededLocked(false, true, now); in testRescheduleServiceRestartsOnChanges() 106 verifyDelays(now, new long[] {rd0, extra, btwn + extra * 2, btwn * 2 + extra * 3, rd4, in testRescheduleServiceRestartsOnChanges() 108 mActiveServices.rescheduleServiceRestartOnMemoryPressureIfNeededLocked(true, false, now); in testRescheduleServiceRestartsOnChanges() 109 verifyDelays(now, new long[] {rd0, rd1, rd2, rd3, rd4, rd5}); in testRescheduleServiceRestartsOnChanges() 112 final long now2 = now + elapsed; in testRescheduleServiceRestartsOnChanges() 127 final long now3 = now + elapsed3; in testRescheduleServiceRestartsOnChanges() 138 final long now4 = now + elapsed4; in testRescheduleServiceRestartsOnChanges() 149 final long now5 = now + elapsed5; in testRescheduleServiceRestartsOnChanges() [all …]
|
/frameworks/base/services/core/java/com/android/server/selinux/ |
D | RateLimiter.java | 61 Instant now = Instant.ofEpochMilli(mClock.currentTimeMillis()); in acquire() local 63 if (mNextPermit.isAfter(now)) { // Sleep until we can acquire. in acquire() 64 SystemClock.sleep(ChronoUnit.MILLIS.between(now, mNextPermit)); in acquire() 67 mNextPermit = now.plus(mWindow); in acquire() 77 final Instant now = Instant.ofEpochMilli(mClock.currentTimeMillis()); in tryAcquire() local 79 if (mNextPermit.isAfter(now)) { in tryAcquire() 82 mNextPermit = now.plus(mWindow); in tryAcquire()
|
/frameworks/base/core/java/android/service/notification/ |
D | ScheduleCalendar.java | 66 public void maybeSetNextAlarm(long now, long nextAlarm) { in maybeSetNextAlarm() argument 71 } else if (nextAlarm > now) { in maybeSetNextAlarm() 74 } else if (mSchedule.nextAlarm < now) { in maybeSetNextAlarm() 95 public long getNextChangeTime(long now) { in getNextChangeTime() argument 97 final long nextStart = getNextTime(now, mSchedule.startHour, mSchedule.startMinute, true); in getNextChangeTime() 98 final long nextEnd = getNextTime(now, mSchedule.endHour, mSchedule.endMinute, false); in getNextChangeTime() 104 private long getNextTime(long now, int hr, int min, boolean adjust) { in getNextTime() argument 107 final long time = adjust ? getClosestActualTime(now, hr, min) : getTime(now, hr, min); in getNextTime() 108 if (time <= now) { in getNextTime() 143 public boolean isAlarmInSchedule(long alarm, long now) { in isAlarmInSchedule() argument [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/ |
D | NetworkCycleDataLoaderTest.java | 121 final ZonedDateTime now = ZonedDateTime.now(); in loadPolicyData_shouldRecordUsageFromPolicyCycle() local 122 final Range<ZonedDateTime> cycle = new Range<>(now, now); in loadPolicyData_shouldRecordUsageFromPolicyCycle() 123 final long nowInMs = now.toInstant().toEpochMilli(); in loadPolicyData_shouldRecordUsageFromPolicyCycle() 150 final long now = System.currentTimeMillis(); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() local 151 final long fourWeeksAgo = now - (DateUtils.WEEK_IN_MILLIS * 4); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() 152 final long twoDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 2); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() 153 mLoader.addBucket(makeMockBucket(UID_ALL, 123, 456, twoDaysAgo, now)); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() 157 verify(mLoader).recordUsage(fourWeeksAgo, now); in loadFourWeeksData_shouldRecordUsageForLast4Weeks() 163 final long now = System.currentTimeMillis(); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime() local 164 final long tenDaysAgo = now - (DateUtils.DAY_IN_MILLIS * 10); in loadDataForSpecificCycles_shouldRecordUsageForSpecifiedTime() [all …]
|
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/ |
D | PrefetchController.java | 161 final long now = sSystemClock.millis(); in maybeStartTrackingJobLocked() local 164 && !willBeLaunchedSoonLocked(userId, pkgName, now)) { in maybeStartTrackingJobLocked() 165 updateThresholdAlarmLocked(userId, pkgName, now, nowElapsed); in maybeStartTrackingJobLocked() 167 updateConstraintLocked(jobStatus, now, nowElapsed); in maybeStartTrackingJobLocked() 225 @CurrentTimeMillisLong long now) { in getNextEstimatedLaunchTimeLocked() argument 228 || nextEstimatedLaunchTime < now - mLaunchTimeAllowanceMs) { in getNextEstimatedLaunchTimeLocked() 240 private boolean maybeUpdateConstraintForPkgLocked(@CurrentTimeMillisLong long now, in maybeUpdateConstraintForPkgLocked() argument 249 changed |= updateConstraintLocked(js, now, nowElapsed); in maybeUpdateConstraintForPkgLocked() 262 final long now = sSystemClock.millis(); in maybeUpdateConstraintForUid() local 272 if (updateConstraintLocked(js, now, nowElapsed)) { in maybeUpdateConstraintForUid() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/ |
D | ServiceStateStats.java | 80 final long now = getTimeMillis(); in conclude() local 83 state -> new TimestampedServiceState(state.mServiceState, now)); in conclude() 84 addServiceState(lastState, now); in conclude() 89 final long now = getTimeMillis(); in onImsVoiceRegistrationChanged() local 94 return new TimestampedServiceState(null, now); in onImsVoiceRegistrationChanged() 100 return new TimestampedServiceState(newServiceState, now); in onImsVoiceRegistrationChanged() 102 addServiceState(lastState, now); in onImsVoiceRegistrationChanged() 122 final long now = getTimeMillis(); in onServiceStateChanged() local 125 addServiceState(mLastState.getAndSet(new TimestampedServiceState(null, now)), now); in onServiceStateChanged() local 148 mLastState.getAndSet(new TimestampedServiceState(newState, now)); in onServiceStateChanged() [all …]
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
D | SmsProviderTest.java | 41 long now = System.currentTimeMillis(); in testProvider() local 49 Long.toString(now - (5 * 24 * 60 * 60 * 1000)), in testProvider() 50 Long.toString(now - (2 * 24 * 60 * 60 * 1000)), in testProvider() 51 Long.toString(now - (5 * 60 * 60 * 1000)), in testProvider() 52 Long.toString(now - (30 * 60 * 1000)), in testProvider() 53 Long.toString(now - (5 * 60 * 1000)), in testProvider() 54 Long.toString(now) in testProvider()
|
/frameworks/base/core/java/android/os/ |
D | ConditionVariable.java | 125 long now = SystemClock.elapsedRealtime(); in block() local 126 long end = now + timeoutMs; in block() 127 while (!mCondition && now < end) { in block() 129 this.wait(end-now); in block() 133 now = SystemClock.elapsedRealtime(); in block()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/ |
D | SmartspaceDedupingCoordinatorTest.kt | 80 private val now = clock.currentTimeMillis() constant in com.android.systemui.statusbar.notification.collection.coordinator.SmartspaceDedupingCoordinatorTest 124 .setLastAudiblyAlertedMs(now - 10000) in setUp() 133 .setLastAudiblyAlertedMs(now - 10000) in setUp() 160 assertTrue(filter.shouldFilterOut(entry2HasNotRecentlyAlerted, now)) in testBasicFiltering() 161 assertFalse(filter.shouldFilterOut(entry3NotAssociatedWithTarget, now)) in testBasicFiltering() 162 assertFalse(filter.shouldFilterOut(entry4HasNotRecentlyAlerted, now)) in testBasicFiltering() 176 assertFalse(filter.shouldFilterOut(entry1HasRecentlyAlerted, now)) in testDoNotFilterRecentlyAlertedNotifs() 177 assertFalse(filter.shouldFilterOut(entry2HasNotRecentlyAlerted, now)) in testDoNotFilterRecentlyAlertedNotifs() 184 .setLastAudiblyAlertedMs(now - 40000) in testFilterAlertedButNotRecentNotifs() 194 assertTrue(filter.shouldFilterOut(entryOldAlert, now)) in testFilterAlertedButNotRecentNotifs() [all …]
|