Home
last modified time | relevance | path

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

123

/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DANQPRequestManagerTest.java90 @Mock Clock mClock; field in ANQPRequestManagerTest
99 mManager = new ANQPRequestManager(mHandler, mClock); in setUp()
165 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsWithPendingRequest()
171 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime + 1); in requestANQPElementsWithPendingRequest()
178 when(mClock.getElapsedSinceBootMillis()) in requestANQPElementsWithPendingRequest()
194 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestSendFailure()
200 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestSendFailure()
215 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestSucceeded()
224 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime + 1); in requestANQPElementsAfterRequestSucceeded()
240 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsAfterRequestFailed()
[all …]
DAnqpCacheTest.java45 @Mock Clock mClock; field in AnqpCacheTest
55 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in setUp()
56 mCache = new AnqpCache(mClock); in setUp()
92 when(mClock.getElapsedSinceBootMillis()) in sweepRemoveExpiredEntry()
98 when(mClock.getElapsedSinceBootMillis()).thenReturn(ANQPData.DATA_LIFETIME_MILLISECONDS); in sweepRemoveExpiredEntry()
DANQPDataTest.java44 @Mock Clock mClock; field in ANQPDataTest
53 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in setUp()
63 ANQPData data = new ANQPData(mClock, null); in createWithNullElements()
75 ANQPData data = new ANQPData(mClock, null); in verifyExpiration()
/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()
DANQPData.java38 private final Clock mClock; field in ANQPData
43 mClock = clock; in ANQPData()
48 mExpiryTime = mClock.getElapsedSinceBootMillis() + DATA_LIFETIME_MILLISECONDS; in ANQPData()
74 long now = mClock.getElapsedSinceBootMillis(); in toString()
DANQPRequestManager.java40 private final Clock mClock; field in ANQPRequestManager
100 mClock = clock; in ANQPRequestManager()
161 long currentTime = mClock.getElapsedSinceBootMillis(); in canSendRequestNow()
183 info.holdOffExpirationTime = mClock.getElapsedSinceBootMillis() in updateHoldOffInfo()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiNetworkSelectorTest.java70 mWifiConfigManager, mClock, in setUp()
74 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp()
144 @Mock private Clock mClock; field in WifiNetworkSelectorTest
214 freqs, caps, levels, securities, mWifiConfigManager, mClock); in emptyScanResults()
244 freqs, caps, levels, securities, mWifiConfigManager, mClock); in verifyMinimumRssiThreshold()
275 freqs, caps, levels, securities, mWifiConfigManager, mClock); in verifyMinimumTimeGapWhenConnected()
281 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime() in verifyMinimumTimeGapWhenConnected()
314 freqs, caps, levels, securities, mWifiConfigManager, mClock); in verifyNoMinimumTimeGapWhenDisconnected()
322 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime() in verifyNoMinimumTimeGapWhenDisconnected()
356 freqs, caps, levels, securities, mWifiConfigManager, mClock); in openNetworkIsNotSufficient()
[all …]
DVelocityBasedConnectedScoreTest.java52 FakeClock mClock; field in VelocityBasedConnectedScoreTest
88 mClock = new FakeClock(); in setUp()
90 new ScoringParams(mContext), mClock); in setUp()
119 mClock.getWallClockMillis()); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
125 mVelocityBasedConnectedScore.updateUsingWifiInfo(mWifiInfo, mClock.getWallClockMillis()); in allowLowRssiIfErrorRateIsLowAndSomeDataIsMoving()
145 mClock.getWallClockMillis());
DScoredNetworkEvaluatorTest.java69 @Mock private Clock mClock; field in ScoredNetworkEvaluatorTest
107 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp()
126 ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock); in testUpdate_recommendationsDisabled()
150 ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock); in testUpdate_emptyScanList()
168 ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock); in testUpdate_allNetworksUnscored()
193 ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock); in testUpdate_oneScored_oneUnscored()
239 ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock); in testUpdate_externalScorerNotPermittedToSeeScanResults()
262 ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock); in testUpdate_externalScorerNotPermittedToSeeScanResultsWithException()
286 ssids, bssids, freqs, caps, levels, mClock); in testEvaluateNetworks_chooseEphemeralNetworkBecauseOfNoSavedNetwork()
325 ssids, bssids, freqs, caps, levels, mClock); in testEvaluateNetworks_chooseHigherScoredEphemeralNetwork()
[all …]
DSavedNetworkEvaluatorTest.java60 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp()
77 mClock, mLocalLog, mWifiConnectivityHelper); in setUp()
91 @Mock private Clock mClock; field in SavedNetworkEvaluatorTest
162 freqs, caps, levels, securities, mWifiConfigManager, mClock); in ignoreNetworksIfUseExternalScores()
189 freqs, caps, levels, securities, mWifiConfigManager, mClock); in ignoreEphemeralNetworks()
218 freqs, caps, levels, securities, mWifiConfigManager, mClock); in setCandidateScanResultsForAllSavedNetworks()
256 freqs, caps, levels, securities, mWifiConfigManager, mClock); in chooseStrongerRssi2GNetwork()
284 freqs, caps, levels, securities, mWifiConfigManager, mClock); in chooseStrongerRssi5GNetwork()
311 freqs, caps, levels, securities, mWifiConfigManager, mClock); in chooseSecureNetworkOverOpenNetwork()
338 freqs, caps, levels, securities, mWifiConfigManager, mClock); in choose5GNetworkOver2GNetwork()
[all …]
DScanRequestProxyTest.java74 @Mock private Clock mClock; field in ScanRequestProxyTest
104 mWifiConfigManager, mWifiPermissionsUtil, mWifiMetrics, mClock); in setUp()
484 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs); in testSuccessiveScanRequestFromSameFgAppThrottled()
486 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs + i); in testSuccessiveScanRequestFromSameFgAppThrottled()
507 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs); in testSuccessiveScanRequestFromSameFgAppNotThrottled()
509 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs + i); in testSuccessiveScanRequestFromSameFgAppNotThrottled()
514 when(mClock.getElapsedSinceBootMillis()).thenReturn(lastRequestMs); in testSuccessiveScanRequestFromSameFgAppNotThrottled()
532 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs); in testSuccessiveScanRequestFromSameAppWithNetworkSettingsPermissionNotThrottled()
534 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs + i); in testSuccessiveScanRequestFromSameAppWithNetworkSettingsPermissionNotThrottled()
552 when(mClock.getElapsedSinceBootMillis()).thenReturn(firstRequestMs); in testSuccessiveScanRequestFromSameAppWithNetworkSetupWizardPermissionNotThrottled()
[all …]
DSelfRecoveryTest.java35 @Mock Clock mClock; field in SelfRecoveryTest
40 mSelfRecovery = new SelfRecovery(mWifiController, mClock); in setUp()
53 when(mClock.getElapsedSinceBootMillis()) in testValidTriggerReasonsSendMessageToWifiController()
89 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in testTimeWindowLimiting_typicalUse()
135 when(mClock.getElapsedSinceBootMillis()) in testTimeWindowLimiting_typicalUse()
141 when(mClock.getElapsedSinceBootMillis()) in testTimeWindowLimiting_typicalUse()
DWifiConnectivityManagerTest.java98 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp()
130 @Mock private Clock mClock; field in WifiConnectivityManagerTest
319 mCarrierNetworkConfig, mWifiMetrics, mLooper.getLooper(), mClock, mLocalLog, true, in createConnectivityManager()
450 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in connectionAttemptRateLimitedWhenScreenOff()
458 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in connectionAttemptRateLimitedWhenScreenOff()
489 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in connectionAttemptNotRateLimitedWhenScreenOff()
497 when(mClock.getElapsedSinceBootMillis()).thenReturn( in connectionAttemptNotRateLimitedWhenScreenOff()
529 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in connectionAttemptNotRateLimitedWhenScreenOffAfterUserSelection()
541 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in connectionAttemptNotRateLimitedWhenScreenOffAfterUserSelection()
902 when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp); in checkPeriodicScanIntervalWhenDisconnected()
[all …]
DWakeupLockTest.java44 @Mock private Clock mClock; field in WakeupLockTest
57 when(mClock.getElapsedSinceBootMillis()).thenReturn(0L); in setUp()
67 mWakeupLock = new WakeupLock(mWifiConfigManager, mWifiWakeMetrics, mClock); in setUp()
119 when(mClock.getElapsedSinceBootMillis()) in verifyInitializingLockByTimeout()
276 when(mClock.getElapsedSinceBootMillis()) in unlockingShouldRecordEventInMetrics()
287 when(mClock.getElapsedSinceBootMillis()) in setLockAndInitializeByTimeout()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardDisplayManager.java144 private View mClock; field in KeyguardDisplayManager.KeyguardPresentation
152 int x = mMarginLeft + (int) (Math.random() * (mUsableWidth - mClock.getWidth()));
153 int y = mMarginTop + (int) (Math.random() * (mUsableHeight - mClock.getHeight()));
154 mClock.setTranslationX(x);
155 mClock.setTranslationY(y);
156 mClock.postDelayed(mMoveTextRunnable, MOVE_CLOCK_TIMEOUT);
167 mClock.removeCallbacks(mMoveTextRunnable); in onDetachedFromWindow()
182 mClock = findViewById(R.id.clock); in onCreate()
185 mClock.post(mMoveTextRunnable); in onCreate()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiInjector.java103 private final Clock mClock = new Clock(); field in WifiInjector
180 WifiAwareMetrics awareMetrics = new WifiAwareMetrics(mClock); in WifiInjector()
181 RttMetrics rttMetrics = new RttMetrics(mClock); in WifiInjector()
182 mWifiMetrics = new WifiMetrics(mClock, wifiStateMachineLooper, awareMetrics, rttMetrics); in WifiInjector()
185 mHalDeviceManager = new HalDeviceManager(mClock); in WifiInjector()
213 mContext, wifiStateMachineLooper, mClock, in WifiInjector()
223 mWifiConfigManager = new WifiConfigManager(mContext, mClock, in WifiInjector()
235 mWifiConfigManager, mClock, in WifiInjector()
239 mWifiConfigManager, mClock, mConnectivityLocalLog, mWifiConnectivityHelper); in WifiInjector()
244 mPasspointManager = new PasspointManager(mContext, mWifiNative, mWifiKeyStore, mClock, in WifiInjector()
[all …]
DSelfRecovery.java51 private final Clock mClock; field in SelfRecovery
56 mClock = clock; in SelfRecovery()
94 mPastRestartTimes.add(mClock.getElapsedSinceBootMillis()); in trigger()
104 long now = mClock.getElapsedSinceBootMillis(); in trimPastRestartTimes()
DConnectedScore.java35 final Clock mClock; field in ConnectedScore
45 mClock = clock; in ConnectedScore()
62 return mClock.getWallClockMillis(); in getMillis()
DWifiConfigStore.java101 private final Clock mClock; field in WifiConfigStore
153 mClock = clock; in WifiConfigStore()
307 mClock.getElapsedSinceBootMillis() + BUFFERED_WRITE_ALARM_INTERVAL_MS, in startBufferedWriteAlarm()
330 long writeStartTime = mClock.getElapsedSinceBootMillis(); in writeBufferedData()
335 long writeTime = mClock.getElapsedSinceBootMillis() - writeStartTime; in writeBufferedData()
352 long readStartTime = mClock.getElapsedSinceBootMillis(); in read()
358 long readTime = mClock.getElapsedSinceBootMillis() - readStartTime; in read()
383 long readStartTime = mClock.getElapsedSinceBootMillis(); in switchUserStoreAndRead()
385 long readTime = mClock.getElapsedSinceBootMillis() - readStartTime; in switchUserStoreAndRead()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DClockPreference.java32 private final String mClock; field in ClockPreference
42 mClock = context.getString(com.android.internal.R.string.status_bar_clock); in ClockPreference()
64 mClockEnabled = !mBlacklist.contains(mClock); in onTuningChanged()
89 mBlacklist.add(mClock); in persistString()
91 mBlacklist.remove(mClock); in persistString()
/frameworks/base/location/java/android/location/
DGpsMeasurementsEvent.java55 private final GpsClock mClock; field in GpsMeasurementsEvent
88 mClock = clock; in GpsMeasurementsEvent()
95 return mClock; in getClock()
134 parcel.writeParcelable(mClock, flags); in writeToParcel()
147 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/services/tests/servicestests/src/com/android/server/am/
DPendingRemoteAnimationRegistryTest.java53 private final OffsettableClock mClock = new OffsettableClock.Stopped(); field in PendingRemoteAnimationRegistryTest
63 mHandler = new TestHandler(null, mClock); in setUp()
87 mClock.fastForward(5000); in testTimeout()
95 mClock.fastForward(2500); in testTimeout_overridenEntry()
98 mClock.fastForward(1000); in testTimeout_overridenEntry()
/frameworks/base/services/tests/servicestests/src/com/android/server/testutils/
DTestHandler.java57 private final LongSupplier mClock; field in TestHandler
65 mClock = clock; in TestHandler()
75 if (mClock != DEFAULT_CLOCK) { in sendMessageAtTime()
76 uptimeMillis = uptimeMillis - SystemClock.uptimeMillis() + mClock.getAsLong(); in sendMessageAtTime()
86 long now = mClock.getAsLong(); in timeAdvance()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareMetricsTest.java53 @Mock Clock mClock; field in WifiAwareMetricsTest
100 mDut = new WifiAwareMetrics(mClock); in setUp()
237 mClock.getElapsedSinceBootMillis())); in testAttachSessionMetrics()
243 mClock.getElapsedSinceBootMillis())); in testAttachSessionMetrics()
249 mClock.getElapsedSinceBootMillis())); in testAttachSessionMetrics()
255 mClock.getElapsedSinceBootMillis())); in testAttachSessionMetrics()
271 mClock.getElapsedSinceBootMillis())); in testAttachSessionMetrics()
316 false, mClock.getElapsedSinceBootMillis())); in testDiscoverySessionMetrics()
322 false, mClock.getElapsedSinceBootMillis())); in testDiscoverySessionMetrics()
328 true, mClock.getElapsedSinceBootMillis())); in testDiscoverySessionMetrics()
[all …]

123