Home
last modified time | relevance | path

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

/frameworks/support/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/
DDefaultSelectionTrackerTest.java54 private DefaultSelectionTracker<String> mTracker; field in DefaultSelectionTrackerTest
87 mTracker = new DefaultSelectionTracker<>( in setUp()
93 EventBridge.install(mAdapter, mTracker, keyProvider); in setUp()
95 mTracker.addObserver(mListener); in setUp()
97 mSelection = new SelectionProbe(mTracker, mListener); in setUp()
104 mTracker.select(mItems.get(7)); in testSelect()
111 mTracker.select(mItems.get(7)); in testDeselect()
112 mTracker.deselect(mItems.get(7)); in testDeselect()
120 boolean selected = mTracker.select(mItems.get(7)); in testSelection_DoNothingOnUnselectableItem()
128 mTracker.select(mItems.get(7)); in testSelect_NotifiesListenersOfChange()
[all …]
DDefaultSelectionTracker_SingleSelectTest.java40 private SelectionTracker<String> mTracker; field in DefaultSelectionTracker_SingleSelectTest
53 mTracker = new DefaultSelectionTracker<>( in setUp()
58 EventBridge.install(adapter, mTracker, keyProvider); in setUp()
60 mTracker.addObserver(mListener); in setUp()
62 mSelection = new SelectionProbe(mTracker); in setUp()
67 mTracker.select(mItems.get(3)); in testSimpleSelect()
68 mTracker.select(mItems.get(4)); in testSimpleSelect()
75 mTracker.select(mItems.get(3)); in testRangeSelectionNotEstablished()
79 mTracker.extendRange(10); in testRangeSelectionNotEstablished()
89 mTracker.startRange(13); in testProvisionalRangeSelection_Ignored()
[all …]
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/constraints/trackers/
DConstraintTrackerTest.java40 private TestConstraintTracker mTracker; field in ConstraintTrackerTest
47 mTracker = new TestConstraintTracker(mMockContext); in setUp()
53 mTracker.stopTracking(); in tearDown()
64 assertThat(mTracker.mIsTracking, is(false)); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
65 assertThat(mTracker.mStartTrackingCount, is(0)); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
66 assertThat(mTracker.mGetInitialStateCount, is(0)); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
68 mTracker.addListener(constraintListener1); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
69 assertThat(mTracker.mIsTracking, is(true)); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
70 assertThat(mTracker.mStartTrackingCount, is(1)); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
71 assertThat(mTracker.mGetInitialStateCount, is(1)); in testAddListener_manyListeners_doesNotCallGetInitialStateAndStartTrackingTwice()
[all …]
DBatteryChargingTrackerTest.java52 private BatteryChargingTracker mTracker; field in BatteryChargingTrackerTest
61 mTracker = new BatteryChargingTracker(mMockContext); in setUp()
98 assertThat(mTracker.getInitialState(), is(nullValue())); in testGetInitialState_nullIntent()
105 assertThat(mTracker.getInitialState(), is(true)); in testGetInitialState_chargingIntent()
112 assertThat(mTracker.getInitialState(), is(false)); in testGetInitialState_dischargingIntent()
119 IntentFilter intentFilter = mTracker.getIntentFilter(); in testGetIntentFilter_beforeApi23()
129 IntentFilter intentFilter = mTracker.getIntentFilter(); in testGetIntentFilter_afterApi23()
139 mTracker.addListener(mListener); in testOnBroadcastReceive_invalidIntentAction_doesNotNotifyListeners()
142 mTracker.onBroadcastReceive( in testOnBroadcastReceive_invalidIntentAction_doesNotNotifyListeners()
153 mTracker.addListener(mListener); in testOnBroadcastReceive_notifiesListeners_beforeApi23()
[all …]
DStorageNotLowTrackerTest.java45 private StorageNotLowTracker mTracker; field in StorageNotLowTrackerTest
54 mTracker = new StorageNotLowTracker(mMockContext); in setUp()
67 assertThat(mTracker.getInitialState(), is(true)); in testGetInitialState_nullIntent()
74 assertThat(mTracker.getInitialState(), is(true)); in testGetInitialState_storageOkIntent()
81 assertThat(mTracker.getInitialState(), is(false)); in testGetInitialState_storageLowIntent()
87 IntentFilter intentFilter = mTracker.getIntentFilter(); in testGetIntentFilter()
97 mTracker.addListener(mListener); in testOnBroadcastReceive_invalidIntentAction_doesNotNotifyListeners()
100 mTracker.onBroadcastReceive(mMockContext, new Intent("INVALID")); in testOnBroadcastReceive_invalidIntentAction_doesNotNotifyListeners()
108 mTracker.addListener(mListener); in testOnBroadcastReceive_notifiesListeners()
111 mTracker.onBroadcastReceive(mMockContext, new Intent(Intent.ACTION_DEVICE_STORAGE_OK)); in testOnBroadcastReceive_notifiesListeners()
[all …]
DNetworkStateTrackerTest.java44 private NetworkStateTracker mTracker; field in NetworkStateTrackerTest
57 mTracker = new NetworkStateTracker(mMockContext); in setUp()
66 assertThat(mTracker.getInitialState(), is(expectedState)); in testGetInitialState_nullNetworkInfoSdk15()
74 assertThat(mTracker.getInitialState(), is(expectedState)); in testGetInitialState_nullNetworkInfo()
81 mTracker.startTracking(); in testStartTracking_afterApi24()
90 mTracker.startTracking(); in testStartTracking_beforeApi24()
103 mTracker.stopTracking(); in testStopTracking_afterApi24()
112 mTracker.stopTracking(); in testStopTracking_beforeApi24()
DBatteryNotLowTrackerTest.java56 private BatteryNotLowTracker mTracker; field in BatteryNotLowTrackerTest
64 mTracker = new BatteryNotLowTracker(mMockContext); in setUp()
88 assertThat(mTracker.getInitialState(), is(expectedBatteryNotLow)); in testGetInitialStateHelper()
95 assertThat(mTracker.getInitialState(), is(nullValue())); in testGetInitialState_nullIntent()
149 IntentFilter intentFilter = mTracker.getIntentFilter(); in testGetIntentFilter()
160 mTracker.addListener(mListener); in testOnBroadcastReceive_invalidIntentAction_doesNotNotifyListeners()
163 mTracker.onBroadcastReceive(mMockContext, new Intent("INVALID")); in testOnBroadcastReceive_invalidIntentAction_doesNotNotifyListeners()
172 mTracker.addListener(mListener); in testOnBroadcastReceive_notifiesListeners()
175 mTracker.onBroadcastReceive(mMockContext, new Intent(Intent.ACTION_BATTERY_OKAY)); in testOnBroadcastReceive_notifiesListeners()
177 mTracker.onBroadcastReceive(mMockContext, new Intent(Intent.ACTION_BATTERY_LOW)); in testOnBroadcastReceive_notifiesListeners()
/frameworks/support/room/runtime/src/test/java/androidx/room/
DObservedTableTrackerTest.java39 private InvalidationTracker.ObservedTableTracker mTracker; field in ObservedTableTrackerTest
43 mTracker = new InvalidationTracker.ObservedTableTracker(TABLE_COUNT); in setup()
48 mTracker.onAdded(2, 3); in basicAdd()
49 assertThat(mTracker.getTablesToSync(), is(createResponse(2, ADD, 3, ADD))); in basicAdd()
55 mTracker.onRemoved(3); in basicRemove()
56 assertThat(mTracker.getTablesToSync(), is(createResponse(3, REMOVE))); in basicRemove()
62 mTracker.onAdded(3); in noChange()
63 assertThat(mTracker.getTablesToSync(), is(nullValue())); in noChange()
69 mTracker.onAdded(4); in returnNullUntilSync()
70 assertThat(mTracker.getTablesToSync(), is(createResponse(4, ADD))); in returnNullUntilSync()
[all …]
DInvalidationTrackerTest.java64 private InvalidationTracker mTracker; field in InvalidationTrackerTest
85 mTracker = new InvalidationTracker(mRoomDatabase, "a", "B", "i"); in setup()
86 mTracker.internalInit(sqliteDb); in setup()
101 assertThat(mTracker.mTableIdLookup.get("a"), is(0)); in tableIds()
102 assertThat(mTracker.mTableIdLookup.get("b"), is(1)); in tableIds()
114 mTracker.addWeakObserver(observer); in testWeak()
128 mTracker.addObserver(observer); in addRemoveObserver()
129 assertThat(mTracker.mObserverMap.size(), is(1)); in addRemoveObserver()
130 mTracker.removeObserver(new LatchObserver(1, "a")); in addRemoveObserver()
131 assertThat(mTracker.mObserverMap.size(), is(1)); in addRemoveObserver()
[all …]
/frameworks/opt/net/ethernet/java/com/android/server/ethernet/
DEthernetServiceImpl.java48 private EthernetTracker mTracker; field in EthernetServiceImpl
85 mTracker = new EthernetTracker(mContext, mHandler); in start()
86 mTracker.start(); in start()
93 return mTracker.getInterfaces(checkUseRestrictedNetworksPermission()); in getAvailableInterfaces()
104 if (mTracker.isRestrictedInterface(iface)) { in getConfiguration()
108 return new IpConfiguration(mTracker.getIpConfiguration(iface)); in getConfiguration()
122 if (mTracker.isRestrictedInterface(iface)) { in setConfiguration()
128 mTracker.updateIpConfiguration(iface, new IpConfiguration(config)); in setConfiguration()
138 if (mTracker.isRestrictedInterface(iface)) { in isAvailable()
142 return mTracker.isTrackingInterface(iface); in isAvailable()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DPlatformVelocityTracker.java32 private VelocityTracker mTracker; field in PlatformVelocityTracker
44 mTracker = tracker; in setTracker()
49 mTracker.addMovement(event); in addMovement()
54 mTracker.computeCurrentVelocity(units); in computeCurrentVelocity()
59 return mTracker.getXVelocity(); in getXVelocity()
64 return mTracker.getYVelocity(); in getYVelocity()
69 mTracker.recycle(); in recycle()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DBrightnessTrackerTest.java76 private BrightnessTracker mTracker; field in BrightnessTrackerTest
99 mTracker = new BrightnessTracker(InstrumentationRegistry.getContext(), mInjector); in setUp()
105 startTracker(mTracker); in testStartStopTrackerScreenOnOff()
129 mTracker.stop(); in testStartStopTrackerScreenOnOff()
139 startTracker(mTracker); in testAdaptiveOnOff()
159 mTracker.stop(); in testAdaptiveOnOff()
170 startTracker(mTracker); in testBrightnessEvent()
173 notifyBrightnessChanged(mTracker, brightness); in testBrightnessEvent()
174 List<BrightnessChangeEvent> events = mTracker.getEvents(0, true).getList(); in testBrightnessEvent()
175 mTracker.stop(); in testBrightnessEvent()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/
DBaseLeakChecker.java28 private final Tracker mTracker; field in BaseLeakChecker
31 mTracker = test.getTracker(tag); in BaseLeakChecker()
35 return mTracker; in getTracker()
40 mTracker.getLeakInfo(listener).addAllocation(new Throwable()); in addCallback()
45 mTracker.getLeakInfo(listener).clearAllocations(); in removeCallback()
DFakeExtensionController.java28 private final Tracker mTracker; field in FakeExtensionController
31 mTracker = test.getTracker("extension"); in FakeExtensionController()
37 mTracker.getLeakInfo(o).addAllocation(new Throwable()); in newExtension()
119 mTracker.getLeakInfo(mAllocation).clearAllocations(); in destroy()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/imsphone/
DImsExternalCallTrackerTest.java49 ImsExternalCallTracker mTracker; field in ImsExternalCallTrackerTest
61 mTracker = new ImsExternalCallTracker(mImsPhone, mImsPullCall, mCallNotifier); in setUp()
76 mTracker.refreshExternalCallState(dep); in testAddExternalCall()
93 mTracker.getConnectionById(CALL_ID); in testRemoveExternalCall()
96 mTracker.refreshExternalCallState(dep); in testRemoveExternalCall()
99 assertNull(mTracker.getConnectionById(CALL_ID)); in testRemoveExternalCall()
/frameworks/support/work/workmanager/src/main/java/androidx/work/impl/constraints/controllers/
DConstraintController.java59 private ConstraintTracker<T> mTracker; field in ConstraintController
63 mTracker = tracker; in ConstraintController()
86 mTracker.removeListener(this); in replace()
88 mTracker.addListener(this); in replace()
99 mTracker.removeListener(this); in reset()
/frameworks/base/services/core/java/com/android/server/slice/
DSliceProviderPermissions.java48 private final DirtyTracker mTracker; field in SliceProviderPermissions
52 mTracker = tracker; in SliceProviderPermissions()
75 mTracker.onPersistableDirty(this); in onPersistableDirty()
136 private final DirtyTracker mTracker; field in SliceProviderPermissions.SliceAuthority
141 mTracker = tracker; in SliceAuthority()
150 mTracker.onPersistableDirty(this); in addPkg()
156 mTracker.onPersistableDirty(this); in removePkg()
DSliceClientPermissions.java56 private final DirtyTracker mTracker; field in SliceClientPermissions
61 mTracker = tracker; in SliceClientPermissions()
93 mTracker.onPersistableDirty(this); in setHasFullAccess()
98 mTracker.onPersistableDirty(this); in removeAuthority()
131 mTracker.onPersistableDirty(this); in onPersistableDirty()
202 private final DirtyTracker mTracker; field in SliceClientPermissions.SliceAuthority
209 mTracker = tracker; in SliceAuthority()
233 mTracker.onPersistableDirty(this); in addPath()
247 mTracker.onPersistableDirty(this); in removePath()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/settings/
DCurrentUserTrackerTest.java33 private CurrentUserTracker mTracker; field in CurrentUserTrackerTest
39 mTracker = new CurrentUserTracker(mReceiver) { in setUp()
49 mTracker.startTracking(); in testBroadCastDoesntCrashOnConcurrentModification()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DSmsDispatchersControllerTest.java56 private SMSDispatcher.SmsTracker mTracker; field in SmsDispatchersControllerTest
143 replaceInstance(SMSDispatcher.SmsTracker.class, "mFormat", mTracker, in testSendRetrySmsCdmaTest()
146 mSmsDispatchersController.sendRetrySms(mTracker); in testSendRetrySmsCdmaTest()
157 replaceInstance(SMSDispatcher.SmsTracker.class, "mFormat", mTracker, in testSendRetrySmsGsmTest()
159 mSmsDispatchersController.sendRetrySms(mTracker); in testSendRetrySmsGsmTest()
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/workers/
DConstraintTrackingWorkerTest.java82 private Trackers mTracker; field in ConstraintTrackingWorkerTest
106 mTracker = mock(Trackers.class); in setUp()
108 when(mTracker.getBatteryChargingTracker()).thenReturn(mBatteryChargingTracker); in setUp()
109 when(mTracker.getBatteryNotLowTracker()).thenReturn(mBatteryNotLowTracker); in setUp()
110 when(mTracker.getNetworkStateTracker()).thenReturn(mNetworkStateTracker); in setUp()
111 when(mTracker.getStorageNotLowTracker()).thenReturn(mStorageNotLowTracker); in setUp()
114 Trackers.setInstance(mTracker); in setUp()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DSMSDispatcher.java352 protected final SmsTracker mTracker; field in SMSDispatcher.SmsSender
357 mTracker = tracker; in SmsSender()
391 HashMap<String, Object> map = mTracker.getData(); in onServiceReady()
397 mTracker.mDestAddress, getSendSmsFlag(mTracker.mDeliveryIntent), in onServiceReady()
423 HashMap<String, Object> map = mTracker.getData(); in onServiceReady()
430 mTracker.mDestAddress, destPort, in onServiceReady()
431 getSendSmsFlag(mTracker.mDeliveryIntent), mSenderCallback); in onServiceReady()
466 processSendSmsResponse(mSmsSender.mTracker, result, messageRef); in onSendSmsComplete()
1816 private final SmsTracker mTracker; field in SMSDispatcher.ConfirmDialogListener
1827 mTracker = tracker; in ConfirmDialogListener()
[all …]
/frameworks/support/work/workmanager/src/androidTest/java/androidx/work/impl/background/systemalarm/
DSystemAlarmDispatcherTest.java94 private Trackers mTracker; field in SystemAlarmDispatcherTest
136 mTracker = mock(Trackers.class); in setUp()
138 when(mTracker.getBatteryChargingTracker()).thenReturn(mBatteryChargingTracker); in setUp()
139 when(mTracker.getBatteryNotLowTracker()).thenReturn(mBatteryNotLowTracker); in setUp()
140 when(mTracker.getNetworkStateTracker()).thenReturn(mNetworkStateTracker); in setUp()
141 when(mTracker.getStorageNotLowTracker()).thenReturn(mStorageNotLowTracker); in setUp()
144 Trackers.setInstance(mTracker); in setUp()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DMultipathPolicyTrackerTest.java107 private MultipathPolicyTracker mTracker; field in MultipathPolicyTrackerTest
153 mTracker = new MultipathPolicyTracker(mContext, mHandler, mDeps); in setUp()
228 mTracker.start(); in testGetMultipathPreference()
326 mTracker.mSettingsObserver.onChange( in testGetMultipathPreference_SettingChanged()
/frameworks/support/room/runtime/src/main/java/androidx/room/
DInvalidationTracker.java673 final InvalidationTracker mTracker; field in InvalidationTracker.WeakObserver
678 mTracker = tracker; in WeakObserver()
686 mTracker.removeObserver(this); in onInvalidated()