Home
last modified time | relevance | path

Searched refs:mClock (Results 1 – 25 of 137) sorted by relevance

123456

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DLinkProbeManagerTest.java63 @Mock private Clock mClock; field in LinkProbeManagerTest
85 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in setUp()
93 mLinkProbeManager = new LinkProbeManager(mClock, mWifiNative, mWifiMetrics, in initLinkProbeManager()
106 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeTriggeredAndAcked()
123 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeTriggeredAndAcked()
150 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeTriggeredAndFailed()
166 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeTriggeredAndFailed()
193 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeNotTriggeredTooFrequently()
208 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeNotTriggeredWhenTxSucceeded()
216 when(mClock.getElapsedSinceBootMillis()).thenReturn(mTimeMs); in testLinkProbeNotTriggeredWhenTxSucceeded()
[all …]
DWifiScoreReportTest.java90 FakeClock mClock; field in WifiScoreReportTest
205 mClock = new FakeClock(); in setUp()
211 mWifiScoreReport = new WifiScoreReport(mScoringParams, mClock, mWifiMetrics, mWifiInfo, in setUp()
330 oops += " " + mClock.mWallClockMillis + "," + rssi;
357 oops += " " + mClock.mWallClockMillis + "," + rssi; in stayOnIfRssiDoesNotGetBelowEntryThreshold()
430 assertTrue(oops, mClock.mWallClockMillis >= lastAskedMillis + 5000);
431 lastAskedMillis = mClock.mWallClockMillis;
458 assertTrue(oops, mClock.mWallClockMillis >= lastAskedMillis + 5000); in askForMoreNudChecksWhenNudKnobIsBigger()
459 lastAskedMillis = mClock.mWallClockMillis; in askForMoreNudChecksWhenNudKnobIsBigger()
764 mClock.mStepMillis = 0;
[all …]
DWifiChannelUtilizationTest.java53 @Mock private Clock mClock; field in WifiChannelUtilizationTest
66 mWifiChannelUtilization = new WifiChannelUtilization(mClock, mContext); in setUp()
154 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyTwoReadChanStatsWithLargeTimeGap()
164 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyTwoReadChanStatsWithLargeTimeGap()
182 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyTwoReadChanStatsWithSmallTimeGap()
192 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyTwoReadChanStatsWithSmallTimeGap()
210 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyThreeReadChanStatsRefWithSecondLast()
220 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyThreeReadChanStatsRefWithSecondLast()
230 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyThreeReadChanStatsRefWithSecondLast()
253 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in verifyThreeReadChanStatsLargeTimeGap()
[all …]
DBssidBlocklistMonitorTest.java88 @Mock private Clock mClock; field in BssidBlocklistMonitorTest
150 mWifiLastResortWatchdog, mClock, mLocalLog, mWifiScoreCard, mScoringParams); in setup()
162 when(mClock.getWallClockMillis()).thenReturn(0L); in verifyAddMultipleBssidsToBlocklist()
166 when(mClock.getWallClockMillis()).thenReturn(1L); in verifyAddMultipleBssidsToBlocklist()
212 when(mClock.getWallClockMillis()).thenReturn(BASE_BLOCKLIST_DURATION); in testBssidIsRemovedFromBlocklistAfterTimeout()
218 when(mClock.getWallClockMillis()).thenReturn(BASE_BLOCKLIST_DURATION + 1); in testBssidIsRemovedFromBlocklistAfterTimeout()
229 when(mClock.getWallClockMillis()).thenReturn(BASE_BLOCKLIST_DURATION + 1); in testBssidRemovalUpdatesFirmwareConfiguration()
243 when(mClock.getWallClockMillis()).thenReturn(BASE_BLOCKLIST_DURATION + 1); in testBssidRemovalNotUpdateFirmwareConfiguration()
262 when(mClock.getWallClockMillis()).thenReturn(0L); in testBssidIsRemoveFromBlocklistAfterTimoutExponentialBackoff()
268 when(mClock.getWallClockMillis()).thenReturn(duration); in testBssidIsRemoveFromBlocklistAfterTimoutExponentialBackoff()
[all …]
DVelocityBasedConnectedScoreTest.java55 FakeClock mClock; field in VelocityBasedConnectedScoreTest
91 mClock = new FakeClock(); in setUp()
93 new ScoringParams(mContext), mClock); in setUp()
122 mClock.getWallClockMillis()); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
128 mVelocityBasedConnectedScore.updateUsingWifiInfo(mWifiInfo, mClock.getWallClockMillis()); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
148 mClock.getWallClockMillis());
DSelfRecoveryTest.java44 @Mock Clock mClock; field in SelfRecoveryTest
54 mSelfRecovery = new SelfRecovery(mContext, mActiveModeWarden, mClock); in setUp()
67 when(mClock.getElapsedSinceBootMillis()) in testValidTriggerReasonsSendMessageToWifiController()
103 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in testTimeWindowLimiting_typicalUse()
135 when(mClock.getElapsedSinceBootMillis()) in testTimeWindowLimiting_typicalUse()
141 when(mClock.getElapsedSinceBootMillis()) in testTimeWindowLimiting_typicalUse()
155 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in testTimeWindowLimiting_NativeFailureOff()
DWifiDataStallTest.java69 @Mock Clock mClock; field in WifiDataStallTest
137 mDeviceConfigFacade, mWifiChannelUtilization, mClock, mHandler, in setUp()
237 when(mClock.getElapsedSinceBootMillis()).thenReturn(10L); in verifyDataStallTxFailure()
243 when(mClock.getElapsedSinceBootMillis()).thenReturn( in verifyDataStallTxFailure()
260 when(mClock.getElapsedSinceBootMillis()).thenReturn(10L); in verifyNoDataStallTxFailureWhenTxTputIsHigh()
266 when(mClock.getElapsedSinceBootMillis()).thenReturn( in verifyNoDataStallTxFailureWhenTxTputIsHigh()
283 when(mClock.getElapsedSinceBootMillis()).thenReturn(10L); in verifyNoDataStallWhenTxFailureIsNotConsecutive()
290 when(mClock.getElapsedSinceBootMillis()).thenReturn( in verifyNoDataStallWhenTxFailureIsNotConsecutive()
308 when(mClock.getElapsedSinceBootMillis()).thenReturn(10L); in verifyDataStallRxFailure()
312 when(mClock.getElapsedSinceBootMillis()).thenReturn( in verifyDataStallRxFailure()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DTimedQuotaManagerTest.java43 @Mock private Clock mClock; field in TimedQuotaManagerTest
48 when(mClock.getElapsedSinceBootMillis()).thenReturn(100000000L); in setUp()
58 TimedQuotaManager qm = new TimedQuotaManager(mClock, 10, DAY_MILLIS); in exhaustQuota_newDay_exhaustQuotaAgain()
67 long now = mClock.getElapsedSinceBootMillis(); in exhaustQuota_newDay_exhaustQuotaAgain()
68 when(mClock.getElapsedSinceBootMillis()).thenReturn(now + DAY_MILLIS + 1000); in exhaustQuota_newDay_exhaustQuotaAgain()
85 TimedQuotaManager qm = new TimedQuotaManager(mClock, 10, DAY_MILLIS); in exhaustQuota_sameDay_stillExhausted()
94 long now = mClock.getElapsedSinceBootMillis(); in exhaustQuota_sameDay_stillExhausted()
95 when(mClock.getElapsedSinceBootMillis()).thenReturn(now + DAY_MILLIS - 1000); in exhaustQuota_sameDay_stillExhausted()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/concurrency/
DFakeExecutor.java27 private final FakeSystemClock mClock; field in FakeExecutor
39 mClock = clock; in FakeExecutor()
40 mClock.addListener(() -> { in FakeExecutor()
58 if (!mQueuedRunnables.isEmpty() && mQueuedRunnables.peek().mWhen <= mClock.uptimeMillis()) { in runNextReady()
99 long startTime = mClock.uptimeMillis(); in advanceClockToNext()
123 long startTime = mClock.uptimeMillis(); in advanceClockToLast()
146 return executeAtTime(r, mClock.uptimeMillis() + unit.toMillis(delay)); in executeDelayed()
183 mClock.setUptimeMillis(nextTime); in updateClock()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DAnqpCache.java39 private Clock mClock; field in AnqpCache
44 mClock = clock; in AnqpCache()
46 mLastSweep = mClock.getElapsedSinceBootMillis(); in AnqpCache()
57 ANQPData data = new ANQPData(mClock, anqpElements); in addEntry()
75 long now = mClock.getElapsedSinceBootMillis(); in sweep()
97 out.println("Last sweep " + Utils.toHMS(mClock.getElapsedSinceBootMillis() - mLastSweep) in dump()
109 mLastSweep = mClock.getElapsedSinceBootMillis(); in flush()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DLinkProbeManager.java67 private final Clock mClock; field in LinkProbeManager
107 mClock = clock; in LinkProbeManager()
155 long now = mClock.getElapsedSinceBootMillis(); in resetOnNewConnection()
169 mLastScreenOnTimestampMs = mClock.getElapsedSinceBootMillis(); in resetOnScreenTurnedOn()
184 long now = mClock.getElapsedSinceBootMillis(); in updateConnectionStats()
256 mLastLinkProbeTimestampMs = mClock.getElapsedSinceBootMillis(); in updateConnectionStats()
263 Experiment experiment = new Experiment(mClock, mWifiMetrics, in initExperiments()
274 private final Clock mClock; field in LinkProbeManager.Experiment
291 mClock = clock; in Experiment()
314 long now = mClock.getElapsedSinceBootMillis(); in resetOnNewConnection()
[all …]
DWifiInjector.java113 private final Clock mClock = new Clock(); field in WifiInjector
218 WifiAwareMetrics awareMetrics = new WifiAwareMetrics(mClock); in WifiInjector()
219 RttMetrics rttMetrics = new RttMetrics(mClock); in WifiInjector()
220 mWifiP2pMetrics = new WifiP2pMetrics(mClock); in WifiInjector()
222 mWifiMetrics = new WifiMetrics(mContext, mFrameworkFacade, mClock, wifiLooper, in WifiInjector()
228 mHalDeviceManager = new HalDeviceManager(mClock, wifiHandler); in WifiInjector()
231 mContext, mWifiMonitor, mFrameworkFacade, wifiHandler, mClock, mWifiMetrics); in WifiInjector()
259 mWifiConfigStore = new WifiConfigStore(mContext, wifiHandler, mClock, mWifiMetrics, in WifiInjector()
267 mWifiScoreCard = new WifiScoreCard(mClock, l2KeySeed, mDeviceConfigFacade); in WifiInjector()
272 mWifiConfigManager = new WifiConfigManager(mContext, mClock, in WifiInjector()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DANQPRequestManagerTest.java99 Clock mClock; field in ANQPRequestManagerTest
108 mManager = new ANQPRequestManager(mHandler, mClock); in setUp()
178 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsWithPendingRequest()
185 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime + 1); in requestANQPElementsWithPendingRequest()
193 when(mClock.getElapsedSinceBootMillis()) in requestANQPElementsWithPendingRequest()
210 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestSendFailure()
217 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestSendFailure()
233 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestSucceeded()
243 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime + 1); in requestANQPElementsAfterRequestSucceeded()
260 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestFailed()
[all …]
DAnqpCacheTest.java46 @Mock Clock mClock; field in AnqpCacheTest
56 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in setUp()
57 mCache = new AnqpCache(mClock); in setUp()
93 when(mClock.getElapsedSinceBootMillis()) in sweepRemoveExpiredEntry()
99 when(mClock.getElapsedSinceBootMillis()).thenReturn(ANQPData.DATA_LIFETIME_MILLISECONDS); in sweepRemoveExpiredEntry()
DANQPDataTest.java45 @Mock Clock mClock; field in ANQPDataTest
54 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in setUp()
64 ANQPData data = new ANQPData(mClock, null); in createWithNullElements()
76 ANQPData data = new ANQPData(mClock, null); in verifyExpiration()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DMissingCounterTimerLockList.java35 private final Clock mClock; field in MissingCounterTimerLockList
45 mClock = clock; in MissingCounterTimerLockList()
125 mStartTimeStamp = mClock.getWallClockMillis(); in LockListEntry()
133 mStartTimeStamp = mClock.getWallClockMillis(); in onPresent()
146 mStartTimeStamp = mClock.getWallClockMillis(); in onAbsent()
150 return mCount == 0 && mStartTimeStamp + mExpiryMs < mClock.getWallClockMillis(); in isExpired()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coalescer/
DGroupCoalescerTest.java70 private final FakeSystemClock mClock = new FakeSystemClock(); field in GroupCoalescerTest
71 private final FakeExecutor mExecutor = new FakeExecutor(mClock);
80 mClock, in setUp()
99 mClock.advanceTime(MIN_LINGER_DURATION); in testUngroupedNotificationsAreNotCoalesced()
147 mClock.advanceTime(2); in testCoalescedNotificationsArePosted()
155 mClock.advanceTime(3); in testCoalescedNotificationsArePosted()
168 mClock.advanceTime(MIN_LINGER_DURATION); in testCoalescedNotificationsArePosted()
219 mClock.advanceTime(MIN_LINGER_DURATION); in testCoalescedEventsThatAreLaterUngroupedAreEmittedImmediatelyAndNotLater()
232 mClock.advanceTime(2); in testUpdatingCoalescedNotifTriggersBatchEmit()
238 mClock.advanceTime(4); in testUpdatingCoalescedNotifTriggersBatchEmit()
[all …]
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/keys/
DTertiaryKeyRotationWindowedCountTest.java44 @Mock private Clock mClock; field in TertiaryKeyRotationWindowedCountTest
54 mWindowedcount = new TertiaryKeyRotationWindowedCount(mFile, mClock); in setUp()
60 new TertiaryKeyRotationWindowedCount(mTemporaryFolder.newFolder(), mClock); in constructor_doesNotFailForBadFile() local
103 new TertiaryKeyRotationWindowedCount(mTemporaryFolder.newFolder(), mClock).record(); in record_doesNotFailForBadFile()
111 assertThat(new TertiaryKeyRotationWindowedCount(mFile, mClock).getCount()).isEqualTo(1); in record_persistsStateToDisk()
129 when(mClock.millis()).thenReturn(timeMillis); in setTimeMillis()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/p2p/
DWifiP2pMetrics.java48 private Clock mClock; field in WifiP2pMetrics
105 mClock = clock; in WifiP2pMetrics()
332 mCurrentConnectionEventStartTime = mClock.getElapsedSinceBootMillis(); in startConnectionEvent()
335 mCurrentConnectionEvent.startTimeMillis = mClock.getWallClockMillis(); in startConnectionEvent()
362 (mClock.getElapsedSinceBootMillis() in endConnectionEvent()
390 mCurrentGroupEventStartTime = mClock.getElapsedSinceBootMillis(); in startGroupEvent()
392 mCurrentGroupEventIdleStartTime = mClock.getElapsedSinceBootMillis(); in startGroupEvent()
399 mCurrentGroupEvent.startTimeMillis = mClock.getWallClockMillis(); in startGroupEvent()
441 (mClock.getElapsedSinceBootMillis() in updateGroupEvent()
447 mCurrentGroupEventIdleStartTime = mClock.getElapsedSinceBootMillis(); in updateGroupEvent()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DPendingRemoteAnimationRegistryTest.java49 private final OffsettableClock mClock = new OffsettableClock.Stopped(); field in PendingRemoteAnimationRegistryTest
56 mHandler = new TestHandler(null, mClock); in setUp()
85 mClock.fastForward(5000); in testTimeout()
93 mClock.fastForward(2500); in testTimeout_overridenEntry()
96 mClock.fastForward(1000); in testTimeout_overridenEntry()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DForegroundServiceNotificationListenerTest.java46 private final FakeSystemClock mClock = new FakeSystemClock(); field in ForegroundServiceNotificationListenerTest
54 mExtender = new ForegroundServiceLifetimeExtender(mInteractionTracker, mClock); in setup()
63 .setCreationTime(mClock.uptimeMillis()) in setup()
86 mClock.advanceTime(MIN_FGS_TIME_MS + 1); in testShouldExtendLifetime_shouldNot_foreground()
95 mClock.advanceTime(MIN_FGS_TIME_MS + 1); in testShouldExtendLifetime_shouldNot_notForeground()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/keys/
DTertiaryKeyRotationWindowedCount.java51 private final Clock mClock; field in TertiaryKeyRotationWindowedCount
65 mClock = clock; in TertiaryKeyRotationWindowedCount()
76 mEvents.add(mClock.millis()); in record()
93 long now = mClock.millis(); in compact()
104 return mClock.millis() - TimeUnit.HOURS.toMillis(WINDOW_IN_HOURS) + 1; in getMinimumTimestamp()
/frameworks/base/location/java/android/location/
DGpsMeasurementsEvent.java58 private final GpsClock mClock; field in GpsMeasurementsEvent
91 mClock = clock; in GpsMeasurementsEvent()
98 return mClock; in getClock()
137 parcel.writeParcelable(mClock, flags); in writeToParcel()
151 builder.append(mClock.toString()); in toString()
DGnssMeasurementsEvent.java37 private final GnssClock mClock; field in GnssMeasurementsEvent
113 mClock = clock; in GnssMeasurementsEvent()
122 return mClock; in getClock()
161 parcel.writeParcelable(mClock, flags); in writeToParcel()
174 builder.append(mClock.toString()); in toString()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DClockPreference.java33 private final String mClock; field in ClockPreference
43 mClock = context.getString(com.android.internal.R.string.status_bar_clock); in ClockPreference()
65 mClockEnabled = !mBlacklist.contains(mClock); in onTuningChanged()
90 mBlacklist.add(mClock); in persistString()
92 mBlacklist.remove(mClock); in persistString()

123456