Home
last modified time | relevance | path

Searched refs:nowElapsed (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/
DTimeController.java431 final long nowElapsed = sElapsedRealtimeClock.millis(); in dumpControllerStateLocked() local
432 pw.println("Elapsed clock: " + nowElapsed); in dumpControllerStateLocked()
435 TimeUtils.formatDuration(mNextDelayExpiredElapsedMillis, nowElapsed, pw); in dumpControllerStateLocked()
438 TimeUtils.formatDuration(nowElapsed, mLastFiredDelayExpiredElapsedMillis, pw); in dumpControllerStateLocked()
441 TimeUtils.formatDuration(mNextJobExpiredElapsedMillis, nowElapsed, pw); in dumpControllerStateLocked()
455 TimeUtils.formatDuration(ts.getEarliestRunTime(), nowElapsed, pw); in dumpControllerStateLocked() local
461 TimeUtils.formatDuration(ts.getLatestRunTimeElapsed(), nowElapsed, pw); in dumpControllerStateLocked() local
475 final long nowElapsed = sElapsedRealtimeClock.millis(); in dumpControllerStateLocked() local
476 proto.write(StateControllerProto.TimeController.NOW_ELAPSED_REALTIME, nowElapsed); in dumpControllerStateLocked()
478 mNextDelayExpiredElapsedMillis - nowElapsed); in dumpControllerStateLocked()
[all …]
DQuotaController.java626 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() local
637 setConstraintSatisfied(jobStatus, nowElapsed, isWithinQuota); in maybeStartTrackingJobLocked()
641 setExpeditedConstraintSatisfied(jobStatus, nowElapsed, isWithinEJQuota); in maybeStartTrackingJobLocked()
850 final long nowElapsed = sElapsedRealtimeClock.millis(); in isWithinEJQuotaLocked() local
854 || nowElapsed < tempAllowlistGracePeriodEndElapsed; in isWithinEJQuotaLocked()
861 || nowElapsed < topAppGracePeriodEndElapsed; in isWithinEJQuotaLocked()
986 final long nowElapsed = sElapsedRealtimeClock.millis();
987 final long windowStartTimeElapsed = nowElapsed - mEJLimitWindowSizeMs;
1008 remainingMs += topAppTimer.getPendingReward(nowElapsed);
1036 final long nowElapsed = sElapsedRealtimeClock.millis();
[all …]
DJobStatus.java1143 boolean setChargingConstraintSatisfied(final long nowElapsed, boolean state) { in setChargingConstraintSatisfied() argument
1144 return setConstraintSatisfied(CONSTRAINT_CHARGING, nowElapsed, state); in setChargingConstraintSatisfied()
1148 boolean setBatteryNotLowConstraintSatisfied(final long nowElapsed, boolean state) { in setBatteryNotLowConstraintSatisfied() argument
1149 return setConstraintSatisfied(CONSTRAINT_BATTERY_NOT_LOW, nowElapsed, state); in setBatteryNotLowConstraintSatisfied()
1153 boolean setStorageNotLowConstraintSatisfied(final long nowElapsed, boolean state) { in setStorageNotLowConstraintSatisfied() argument
1154 return setConstraintSatisfied(CONSTRAINT_STORAGE_NOT_LOW, nowElapsed, state); in setStorageNotLowConstraintSatisfied()
1158 boolean setTimingDelayConstraintSatisfied(final long nowElapsed, boolean state) { in setTimingDelayConstraintSatisfied() argument
1159 return setConstraintSatisfied(CONSTRAINT_TIMING_DELAY, nowElapsed, state); in setTimingDelayConstraintSatisfied()
1163 boolean setDeadlineConstraintSatisfied(final long nowElapsed, boolean state) { in setDeadlineConstraintSatisfied() argument
1164 if (setConstraintSatisfied(CONSTRAINT_DEADLINE, nowElapsed, state)) { in setDeadlineConstraintSatisfied()
[all …]
DConnectivityController.java516 final long nowElapsed = sElapsedRealtimeClock.millis(); in onUserRemovedLocked() local
520 unregisterDefaultNetworkCallbackLocked(uidStats.uid, nowElapsed); in onUserRemovedLocked()
742 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeAdjustRegisteredCallbacksLocked() local
743 if (nowElapsed - mLastCallbackAdjustmentTimeElapsed < MIN_ADJUST_CALLBACK_INTERVAL_MS) { in maybeAdjustRegisteredCallbacksLocked()
748 mLastCallbackAdjustmentTimeElapsed = nowElapsed; in maybeAdjustRegisteredCallbacksLocked()
755 unregisterDefaultNetworkCallbackLocked(us.uid, nowElapsed); in maybeAdjustRegisteredCallbacksLocked()
760 if (us.lastUpdatedElapsed + MIN_STATS_UPDATE_INTERVAL_MS < nowElapsed) { in maybeAdjustRegisteredCallbacksLocked()
792 us.lastUpdatedElapsed = nowElapsed; in maybeAdjustRegisteredCallbacksLocked()
804 changed |= unregisterDefaultNetworkCallbackLocked(us.uid, nowElapsed); in maybeAdjustRegisteredCallbacksLocked()
827 private boolean unregisterDefaultNetworkCallbackLocked(int uid, long nowElapsed) { in unregisterDefaultNetworkCallbackLocked() argument
[all …]
DBatteryController.java68 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() local
71 taskStatus.setChargingConstraintSatisfied(nowElapsed, mChargeTracker.isOnStablePower()); in maybeStartTrackingJobLocked()
73 nowElapsed, mChargeTracker.isBatteryNotLow()); in maybeStartTrackingJobLocked()
102 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeReportNewChargingStateLocked() local
106 boolean previous = ts.setChargingConstraintSatisfied(nowElapsed, stablePower); in maybeReportNewChargingStateLocked()
110 previous = ts.setBatteryNotLowConstraintSatisfied(nowElapsed, batteryNotLow); in maybeReportNewChargingStateLocked()
DIdleController.java63 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() local
66 taskStatus.setIdleConstraintSatisfied(nowElapsed, mIdleTracker.isIdle()); in maybeStartTrackingJobLocked()
96 final long nowElapsed = sElapsedRealtimeClock.millis(); in reportNewIdleState() local
98 mTrackedTasks.valueAt(i).setIdleConstraintSatisfied(nowElapsed, isIdle); in reportNewIdleState()
DStorageController.java64 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() local
68 nowElapsed, mStorageTracker.isStorageNotLow()); in maybeStartTrackingJobLocked()
81 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeReportNewStorageState() local
87 reportChange |= ts.setStorageNotLowConstraintSatisfied(nowElapsed, storageNotLow); in maybeReportNewStorageState()
DDeviceIdleJobsController.java108 final long nowElapsed = sElapsedRealtimeClock.millis();
111 updateTaskStateLocked(mAllowInIdleJobs.valueAt(i), nowElapsed);
208 private boolean updateTaskStateLocked(JobStatus task, final long nowElapsed) { in updateTaskStateLocked() argument
213 return task.setDeviceNotDozingConstraintSatisfied(nowElapsed, enableTask, whitelisted); in updateTaskStateLocked()
DContentObserverController.java79 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeStartTrackingJobLocked() local
116 taskStatus.setContentTriggerConstraintSatisfied(nowElapsed, havePendingUris); in maybeStartTrackingJobLocked()
324 final long nowElapsed = sElapsedRealtimeClock.millis(); in trigger() local
325 if (mJobStatus.setContentTriggerConstraintSatisfied(nowElapsed, true)) { in trigger()
DBackgroundJobsController.java199 boolean updateSingleJobRestrictionLocked(JobStatus jobStatus, final long nowElapsed, in updateSingleJobRestrictionLocked() argument
217 jobStatus.setBackgroundNotRestrictedConstraintSatisfied(nowElapsed, canRun, in updateSingleJobRestrictionLocked()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/alarm/
DLazyAlarmStore.java165 public ArrayList<Alarm> removePendingAlarms(long nowElapsed) { in removePendingAlarms() argument
179 if (alarm.getWhenElapsed() > nowElapsed) { in removePendingAlarms()
184 if (alarm.wakeup && alarm.getMaxWhenElapsed() <= nowElapsed + ALARM_DEADLINE_SLOP) { in removePendingAlarms()
230 public void dump(IndentingPrintWriter ipw, long nowElapsed, SimpleDateFormat sdf) { in dump() argument
233 dumpAlarmList(ipw, mAlarms, nowElapsed, sdf); in dump()
239 public void dumpProto(ProtoOutputStream pos, long nowElapsed) { in dumpProto() argument
241 a.dumpDebug(pos, AlarmManagerServiceDumpProto.PENDING_ALARMS, nowElapsed); in dumpProto()
DAlarmStore.java99 ArrayList<Alarm> removePendingAlarms(long nowElapsed); in removePendingAlarms() argument
129 void dump(IndentingPrintWriter ipw, long nowElapsed, SimpleDateFormat sdf); in dump() argument
134 void dumpProto(ProtoOutputStream pos, long nowElapsed); in dumpProto() argument
DBatchingAlarmStore.java156 public ArrayList<Alarm> removePendingAlarms(long nowElapsed) { in removePendingAlarms() argument
160 if (batch.mStart > nowElapsed) { in removePendingAlarms()
198 public void dump(IndentingPrintWriter ipw, long nowElapsed, SimpleDateFormat sdf) { in dump() argument
205 dumpAlarmList(ipw, b.mAlarms, nowElapsed, sdf); in dump()
212 public void dumpProto(ProtoOutputStream pos, long nowElapsed) { in dumpProto() argument
214 b.dumpDebug(pos, AlarmManagerServiceDumpProto.PENDING_ALARM_BATCHES, nowElapsed); in dumpProto()
395 public void dumpDebug(ProtoOutputStream proto, long fieldId, long nowElapsed) { in dumpDebug() argument
402 a.dumpDebug(proto, BatchProto.ALARMS, nowElapsed); in dumpDebug()
DAlarmManagerService.java344 void recordAlarmForPackage(String packageName, int userId, long nowElapsed) { in recordAlarmForPackage() argument
351 if (history.size() == 0 || history.peekLast() < nowElapsed) { in recordAlarmForPackage()
352 history.addLast(nowElapsed); in recordAlarmForPackage()
395 void dump(IndentingPrintWriter pw, long nowElapsed) { in dump() argument
407 TimeUtils.formatDuration(timestamps.get(j), nowElapsed, pw); in dump() local
428 RemovedAlarm(Alarm a, int removeReason, long nowRtc, long nowElapsed) { in RemovedAlarm() argument
432 mWhenRemovedElapsed = nowElapsed; in RemovedAlarm()
456 void dump(IndentingPrintWriter pw, long nowElapsed, SimpleDateFormat sdf) { in dump() argument
460 TimeUtils.formatDuration(mWhenRemovedElapsed, nowElapsed, pw); in dump()
1202 long getMinimumAllowedWindow(long nowElapsed, long triggerElapsed) { in getMinimumAllowedWindow() argument
[all …]
DAlarm.java354 public void dumpDebug(ProtoOutputStream proto, long fieldId, long nowElapsed) { in dumpDebug() argument
359 proto.write(AlarmProto.TIME_UNTIL_WHEN_ELAPSED_MS, getWhenElapsed() - nowElapsed); in dumpDebug()
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySavingStats.java400 final long nowElapsed = injectCurrentTime();
419 pw.print(sdf.format(new Date(now - nowElapsed + mLastBatterySaverEnabledTime)));
421 TimeUtils.formatDuration(mLastBatterySaverEnabledTime, nowElapsed, pw);
427 pw.print(sdf.format(new Date(now - nowElapsed + mLastBatterySaverDisabledTime)));
429 TimeUtils.formatDuration(mLastBatterySaverDisabledTime, nowElapsed, pw);
439 new Date(now - nowElapsed + mLastAdaptiveBatterySaverEnabledTime)));
441 TimeUtils.formatDuration(mLastAdaptiveBatterySaverEnabledTime, nowElapsed, pw);
447 new Date(now - nowElapsed + mLastAdaptiveBatterySaverDisabledTime)));
449 TimeUtils.formatDuration(mLastAdaptiveBatterySaverDisabledTime, nowElapsed, pw);
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/
DJobServiceContext.java582 final long nowElapsed = sElapsedRealtimeClock.millis(); in assertCallerLocked() local
584 && (nowElapsed - mLastUnsuccessfulFinishElapsed) < 15_000L) { in assertCallerLocked()
594 TimeUtils.formatDuration(nowElapsed - cb.mStoppedTime, sb); in assertCallerLocked()
694 final long nowElapsed = sElapsedRealtimeClock.millis(); in doCancelLocked() local
695 if (nowElapsed < earliestStopTimeElapsed) { in doCancelLocked()
872 final long nowElapsed = sElapsedRealtimeClock.millis(); in handleOpTimeoutLocked() local
873 if (nowElapsed >= latestStopTimeElapsed) { in handleOpTimeoutLocked()
1021 final long nowElapsed = sElapsedRealtimeClock.millis(); in scheduleOpTimeOutLocked() local
1022 if (nowElapsed < earliestStopTimeElapsed) { in scheduleOpTimeOutLocked()
1023 timeoutMillis = earliestStopTimeElapsed - nowElapsed; in scheduleOpTimeOutLocked()
[all …]
DJobPackageTracker.java318 void dump(IndentingPrintWriter pw, String header, long now, long nowElapsed, in dump() argument
324 TimeUtils.formatDuration(mStartElapsedTime, nowElapsed, pw); in dump()
395 void dump(ProtoOutputStream proto, long fieldId, long now, long nowElapsed, int filterUid) { in dump() argument
400 proto.write(DataSetProto.ELAPSED_TIME_MS, nowElapsed - mStartElapsedTime); in dump()
538 final long nowElapsed = sElapsedRealtimeClock.millis(); in dump() local
549 mLastDataSets[i].dump(pw, "Historical stats", now, nowElapsed, filterAppId); in dump()
553 total.dump(pw, "Current stats", now, nowElapsed, filterAppId); in dump()
559 final long nowElapsed = sElapsedRealtimeClock.millis(); in dump() local
573 now, nowElapsed, filterUid); in dump()
577 now, nowElapsed, filterUid); in dump()
DJobSchedulerService.java2228 final long nowElapsed = sElapsedRealtimeClock.millis();
2230 && nowElapsed - job.getFirstForceBatchedTimeElapsed()
3277 final long nowElapsed = sElapsedRealtimeClock.millis();
3321 job.dump(pw, true, nowElapsed);
3454 job.dump(pw, false, nowElapsed);
3482 jsc.dumpLocked(pw, nowElapsed);
3488 job.dump(pw, false, nowElapsed);
3518 TimeUtils.formatDuration(mLastCompletedJobTimeElapsed[idx], nowElapsed, pw);
3523 job.dump(pw, true, nowElapsed);
3541 mConcurrencyManager.dumpLocked(pw, now, nowElapsed);
[all …]
/frameworks/base/services/core/java/com/android/server/utils/quota/
DCountQuotaTracker.java187 final long nowElapsed = mInjector.getElapsedRealtime(); in noteEvent() local
191 times.addLast(nowElapsed); in noteEvent()
195 nowElapsed + stats.windowSizeMs); in noteEvent()
197 final long windowEdgeElapsed = nowElapsed - stats.windowSizeMs; in noteEvent()
418 final long nowElapsed = mInjector.getElapsedRealtime(); in updateExecutionStatsLocked() local
419 stats.expirationTimeElapsed = nowElapsed + mMaxPeriodMs; in updateExecutionStatsLocked()
428 long emptyTimeMs = Long.MAX_VALUE - nowElapsed; in updateExecutionStatsLocked()
430 final long eventStartWindowElapsed = nowElapsed - stats.windowSizeMs; in updateExecutionStatsLocked()
446 stats.expirationTimeElapsed = nowElapsed + emptyTimeMs; in updateExecutionStatsLocked()
452 final long nowElapsed = mInjector.getElapsedRealtime(); in invalidateAllExecutionStatsLocked() local
[all …]
/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/controllers/idle/
DDeviceIdlenessTracker.java223 final long nowElapsed = sElapsedRealtimeClock.millis(); in maybeScheduleIdlenessCheck() local
224 final long when = nowElapsed + mInactivityIdleThreshold; in maybeScheduleIdlenessCheck()
226 Slog.v(TAG, "Scheduling idle : " + reason + " now:" + nowElapsed + " when=" + when); in maybeScheduleIdlenessCheck()
/frameworks/base/services/core/java/com/android/server/policy/
DBurnInProtectionHelper.java161 final long nowElapsed = SystemClock.elapsedRealtime(); in updateBurnInProtection() local
167 final long nextElapsed = nowElapsed + (nextWall - nowWall); in updateBurnInProtection()
170 + ", next wall: " + nextWall + ", now elapsed: " + nowElapsed in updateBurnInProtection()
/frameworks/base/services/core/java/com/android/server/am/
DOomAdjuster.java861 final long nowElapsed = SystemClock.elapsedRealtime(); in updateOomAdjInnerLSP() local
968 boolean allChanged = updateAndTrimProcessLSP(now, nowElapsed, oldTime, activeUids); in updateOomAdjInnerLSP()
982 updateUidsLSP(activeUids, nowElapsed); in updateOomAdjInnerLSP()
1142 private boolean updateAndTrimProcessLSP(final long now, final long nowElapsed, in updateAndTrimProcessLSP() argument
1163 applyOomAdjLSP(app, true, now, nowElapsed); in updateAndTrimProcessLSP()
1276 private void updateUidsLSP(ActiveUids activeUids, final long nowElapsed) { in updateUidsLSP() argument
1303 uidRec.setLastBackgroundTime(nowElapsed); in updateUidsLSP()
2574 long nowElapsed) { in applyOomAdjLSP() argument
2786 maybeUpdateUsageStatsLSP(app, nowElapsed); in applyOomAdjLSP()
2810 if ((nowElapsed - state.getInteractionEventTime()) > interactionThreshold) { in applyOomAdjLSP()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/
DDeviceIdleControllerTest.java149 long nowElapsed; field in DeviceIdleControllerTest.InjectorForTest
153 nowElapsed = SystemClock.elapsedRealtime(); in InjectorForTest()
179 return nowElapsed; in getElapsedRealtime()
1797 mInjector.nowElapsed += mConstants.IDLE_AFTER_INACTIVE_TIMEOUT + mConstants.SENSING_TIMEOUT in testStationaryDetection_QuickDozeOff()
1829 mInjector.nowElapsed += mConstants.QUICK_DOZE_DELAY_TIMEOUT; in testStationaryDetection_QuickDozeOn_NoMotion()
1853 mInjector.nowElapsed += mConstants.MOTION_INACTIVE_TIMEOUT / 2; in testStationaryDetection_QuickDozeOn_NoMotion()
1859 mInjector.nowElapsed += mConstants.MOTION_INACTIVE_TIMEOUT; in testStationaryDetection_QuickDozeOn_NoMotion()
1879 mInjector.nowElapsed += mConstants.MOTION_INACTIVE_TIMEOUT / 2; in testStationaryDetection_QuickDozeOn_NoMotion()
1889 mInjector.nowElapsed += mConstants.MOTION_INACTIVE_TIMEOUT; in testStationaryDetection_QuickDozeOn_NoMotion()
1907 mInjector.nowElapsed += mConstants.QUICK_DOZE_DELAY_TIMEOUT; in testStationaryDetection_QuickDozeOn_OneShot()
[all …]
/frameworks/base/services/core/java/android/app/usage/
DUsageStatsManagerInternal.java165 @UserIdInt int userId, long nowElapsed); in getAppStandbyBucket() argument

12