/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ |
H A D | SliceBroadcastRelayHandlerTest.java | 53 private Context mSpyContext; field in SliceBroadcastRelayHandlerTest 60 mSpyContext = spy(mContext); in setup() 62 mRelayHandler = new SliceBroadcastRelayHandler(mSpyContext, mBroadcastDispatcher); in setup() 82 verify(mSpyContext).registerReceiver(any(), eq(value)); in testRegister() 102 verify(mSpyContext).registerReceiver(relay.capture(), eq(value)); in testUnregister() 107 verify(mSpyContext).unregisterReceiver(eq(relay.getValue())); in testUnregister() 141 verify(mSpyContext).registerReceiver(relay.capture(), eq(value)); in testRelay() 142 relay.getValue().onReceive(mSpyContext, new Intent(TEST_ACTION)); in testRelay() 153 verify(mSpyContext, never()) in testRegisteredWithDispatcher()
|
/aosp12/packages/services/Car/experimental/tests/experimentalcarservice_unit_test/src/com/android/experimentalcar/ |
H A D | TouchDriverAwarenessSupplierTest.java | 59 private Context mSpyContext; field in TouchDriverAwarenessSupplierTest 63 mSpyContext = spy(InstrumentationRegistry.getInstrumentation().getTargetContext()); in setUp() 64 mMaxPermitsConfig = mSpyContext.getResources().getInteger( in setUp() 66 mPermitThrottleMs = mSpyContext.getResources().getInteger( in setUp() 70 new TouchDriverAwarenessSupplier(mSpyContext, mSupplierCallback, in setUp() 112 Resources spyResources = spy(mSpyContext.getResources()); in testconsumePermitLocked_decrementsToMinOf0() 113 doReturn(spyResources).when(mSpyContext).getResources(); in testconsumePermitLocked_decrementsToMinOf0()
|
H A D | GazeDriverAwarenessSupplierTest.java | 48 private Context mSpyContext; field in GazeDriverAwarenessSupplierTest 60 mSpyContext = spy(InstrumentationRegistry.getInstrumentation().getTargetContext()); in setUp() 63 mSpyContext in setUp() 67 mSpyContext.getResources().getFloat(R.fraction.driverAwarenessGazeModelGrowthRate); in setUp() 69 mSpyContext.getResources().getFloat(R.fraction.driverAwarenessGazeModelDecayRate); in setUp() 72 mGazeSupplier = spy(new GazeDriverAwarenessSupplier(mSpyContext, mTimeSource)); in setUp()
|
H A D | DriverDistractionExperimentalFeatureServiceTest.java | 153 private final Context mSpyContext = spy( field in DriverDistractionExperimentalFeatureServiceTest 179 .when(mSpyContext).checkCallingOrSelfPermission(any()); in setUp() 180 mService = new DriverDistractionExperimentalFeatureService(mSpyContext, mTimeSource, in setUp() 183 mManager = new CarDriverDistractionManager(Car.createCar(mSpyContext), mService); in setUp()
|
/aosp12/packages/services/Car/tests/carservice_test/src/com/android/car/ |
H A D | CarUxRestrictionsManagerServiceTest.java | 122 private Context mSpyContext; field in CarUxRestrictionsManagerServiceTest 130 mSpyContext = spy(getInstrumentation().getTargetContext()); in setUp() 139 mService = new CarUxRestrictionsManagerService(mSpyContext, in setUp() 179 Resources spyResources = spy(mSpyContext.getResources()); in testLoadConfig_UseDefaultConfigWhenNoSavedConfigFileNoXml() 180 doReturn(spyResources).when(mSpyContext).getResources(); in testLoadConfig_UseDefaultConfigWhenNoSavedConfigFileNoXml() 192 mSpyContext, R.xml.car_ux_restrictions_map); in testLoadConfig_UseXml() 417 mService = new CarUxRestrictionsManagerService(mSpyContext, in testGetCurrentUxRestrictions_ReportedVirtualDisplay_ReturnsRestrictionsForPort() 454 mSpyContext, drivingStateService, mMockCarPropertyService); in testInitService_NoDeadlockWithCarDrivingStateService() 638 when(mSpyContext.checkCallingOrSelfPermission( in testSetRestrictionMode_missingPermission_throwsException() 646 when(mSpyContext.checkCallingOrSelfPermission( in testGetRestrictionMode_missingPermission_throwsException() [all …]
|
/aosp12/packages/modules/IPsec/tests/iketests/src/java/android/net/ipsec/ike/ |
H A D | IkeSessionTest.java | 89 mSpyContext, in testConstructIkeSession() 119 mSpyContext, in testConstructFromDifferentThreads() 152 mSpyContext, in testOpensIkeSession() 172 doReturn(mockPackageMgr).when(mSpyContext).getPackageManager(); in testThrowWhenSetupTunnelWithMissingFeature() 178 mSpyContext, in testThrowWhenSetupTunnelWithMissingFeature() 197 mSpyContext, in testThrowWhenSetupMobikeWithTransport()
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/ |
H A D | WindowMagnificationPromptControllerTest.java | 179 private Context mSpyContext; field in WindowMagnificationPromptControllerTest.A11yTestableContext 183 mSpyContext = Mockito.mock(Context.class); in A11yTestableContext() 188 mSpyContext.startActivityAsUser(intent, options, user); in startActivityAsUser() 194 return mSpyContext.registerReceiver(receiver, filter, broadcastPermission, scheduler); in registerReceiver() 199 mSpyContext.unregisterReceiver(receiver); in unregisterReceiver() 203 return mSpyContext; in getSpyContext()
|
/aosp12/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/ |
H A D | IkeSessionTestBase.java | 75 protected Context mSpyContext; field in IkeSessionTestBase 89 mSpyContext = spy(mMockIpSecTestUtils.getContext()); in setUp() 91 .when(mSpyContext) in setUp() 97 doNothing().when(mSpyContext).unregisterReceiver(any(IkeAlarmReceiver.class)); in setUp() 102 doReturn(mPowerManager).when(mSpyContext).getSystemService(eq(PowerManager.class)); in setUp() 124 .when(mSpyContext) in setUp()
|
H A D | IkeLocalRequestSchedulerTest.java | 69 private Context mSpyContext; field in IkeLocalRequestSchedulerTest 77 mSpyContext = spy(InstrumentationRegistry.getContext()); in setUp() 81 doReturn(mMockPowerManager).when(mSpyContext).getSystemService(eq(PowerManager.class)); in setUp() 84 mScheduler = new IkeLocalRequestScheduler(mMockConsumer, mSpyContext); in setUp()
|
H A D | IkeSessionStateMachineTest.java | 896 mSpyContext, in makeAndStartIkeSession() 1964 eq(mSpyContext), in setupChildStateMachineFactory() 2024 eq(mSpyContext), in testCreateAdditionalChild() 2859 eq(mSpyContext), in verifyAuthenticationCommonAndGetIkeMessage() 3272 eq(mSpyContext), in verifyEapAuthenticatorCreatedAndGetCallback() 5033 eq(mSpyContext), in testOpenChildSession()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
H A D | BluetoothSnoopLogPreferenceControllerTest.java | 47 private Context mSpyContext = RuntimeEnvironment.application; field in BluetoothSnoopLogPreferenceControllerTest 61 doReturn(mSpyResources).when(mSpyContext).getResources(); in setup() 64 mPreference = new ListPreference(mSpyContext); in setup() 68 mController = new BluetoothSnoopLogPreferenceController(mSpyContext); in setup()
|
H A D | BluetoothMaxConnectedAudioDevicesPreferenceControllerTest.java | 53 private Context mSpyContext = RuntimeEnvironment.application; field in BluetoothMaxConnectedAudioDevicesPreferenceControllerTest 66 doReturn(mSpyResources).when(mSpyContext).getResources(); in setup() 69 mPreference = new ListPreference(mSpyContext); in setup() 76 mController = new BluetoothMaxConnectedAudioDevicesPreferenceController(mSpyContext); in setup()
|
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/ |
H A D | MediaOutputControllerTest.java | 99 private Context mSpyContext; field in MediaOutputControllerTest 109 mSpyContext = spy(mContext); in setUp() 113 doReturn(mMediaSessionManager).when(mSpyContext).getSystemService( in setUp() 118 mMediaOutputController = new MediaOutputController(mSpyContext, TEST_PACKAGE_NAME, false, in setUp() 162 mMediaOutputController = new MediaOutputController(mSpyContext, null, false, in start_withoutPackageName_verifyMediaControllerInit() 183 mMediaOutputController = new MediaOutputController(mSpyContext, null, false, in stop_withoutPackageName_verifyMediaControllerDeinit() 454 mMediaOutputController = new MediaOutputController(mSpyContext, null, false, in getNotificationLargeIcon_withoutPackageName_returnsNull()
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
H A D | PolicyWarningUIControllerTest.java | 88 private Context mSpyContext; field in PolicyWarningUIControllerTest 201 verify(mSpyContext).startActivityAsUser(intentCaptor.capture(), in verifyLaunchA11ySettings() 216 mSpyContext.startActivityAsUser(intent, options, user); in startActivityAsUser()
|
/aosp12/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
H A D | MissedInformationTest.java | 94 doReturn(mContentResolver).when(mSpyContext).getContentResolver(); in setUp() 252 when(mEmergencyCall.getContext()).thenReturn(mSpyContext); in setUpEmergencyCall() 257 mIncomingCall = spy(new Call("0", mSpyContext, mCallsManager, in setUpIncomingCall()
|
H A D | TelecomSystemTest.java | 325 Context mSpyContext; field in TelecomSystemTest 346 mSpyContext = mComponentContextFixture.getTestDouble().getApplicationContext(); in setUp() 347 doReturn(mSpyContext).when(mSpyContext).getApplicationContext(); in setUp() 348 doNothing().when(mSpyContext).sendBroadcastAsUser(any(), any(), any()); in setUp() 350 doReturn(mock(AppOpsManager.class)).when(mSpyContext).getSystemService(AppOpsManager.class); in setUp()
|
H A D | AnalyticsTests.java | 155 TelecomManager tm = (TelecomManager) mSpyContext.getSystemService(Context.TELECOM_SERVICE); in testAnalyticsDumping() 312 TelecomManager tm = (TelecomManager) mSpyContext.getSystemService(Context.TELECOM_SERVICE); in testAnalyticsLogSessionTiming()
|
H A D | BasicCallTests.java | 854 return mSpyContext.getContentResolver().acquireProvider(BlockedNumberContract.AUTHORITY); in getBlockedNumberProvider()
|
/aosp12/frameworks/base/tests/PackageWatchdog/src/com/android/server/ |
H A D | PackageWatchdogTest.java | 103 private Context mSpyContext; field in PackageWatchdogTest 133 mSpyContext = spy(InstrumentationRegistry.getContext()); in setUp() 134 when(mSpyContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp() 1414 new AtomicFile(new File(mSpyContext.getFilesDir(), "package-watchdog.xml")); in createWatchdog() 1417 new PackageWatchdog(mSpyContext, policyFile, handler, handler, controller, in createWatchdog()
|