Home
last modified time | relevance | path

Searched refs:mMockPackageManager (Results 1 – 17 of 17) sorted by relevance

/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/display/
DThemePreferenceControllerTest.java55 private PackageManager mMockPackageManager; field in ThemePreferenceControllerTest
60 mMockPackageManager = mock(PackageManager.class); in setup()
64 return mMockPackageManager; in setup()
76 when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> { in testUpdateState()
85 when(mMockPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn( in testUpdateState()
112 when(mMockPackageManager.getApplicationInfo(any(), anyInt())).thenAnswer(inv -> { in testUpdateState_withStaticOverlay()
123 when(mMockPackageManager.getPackageInfo(eq("com.android.Theme1"), anyInt())).thenReturn(pi); in testUpdateState_withStaticOverlay()
124 when(mMockPackageManager.getPackageInfo(eq("com.android.Theme2"), anyInt())).thenReturn( in testUpdateState_withStaticOverlay()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DInCallControllerTests.java130 @Mock PackageManager mMockPackageManager; field in InCallControllerTests
199 when(mMockPackageManager.getPermissionInfo(anyString(), anyInt())).thenReturn( in setUp()
232 }).when(mMockPackageManager).getPackagesForUid(anyInt()); in setUp()
280 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in testCarModeAppRemoval()
301 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in testRandomAppRemovalInCarMode()
319 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in testAutomotiveProjectionAppRemoval()
336 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in testBindToService_NoServicesFound_IncomingCall()
368 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in testBindToService_NoServicesFound_OutgoingCall()
406 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in testBindToService_DefaultDialer_NoEmergency()
422 verify(mMockPackageManager, times(4)).queryIntentServicesAsUser( in testBindToService_DefaultDialer_NoEmergency()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarBugreportManagerServiceTest.java59 @Mock private PackageManager mMockPackageManager; field in CarBugreportManagerServiceTest
67 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
81 when(mMockPackageManager.checkSignatures(anyInt(), anyInt())) in test_requestBugreport_failsIfNotDesignatedAppOnUserBuild()
83 when(mMockPackageManager.getNameForUid(anyInt())).thenReturn("current_app_name"); in test_requestBugreport_failsIfNotDesignatedAppOnUserBuild()
100 when(mMockPackageManager.checkSignatures(anyInt(), anyInt())) in test_requestBugreport_failsIfNotSignedWithPlatformKeys()
102 when(mMockPackageManager.getNameForUid(anyInt())).thenReturn("current_app_name"); in test_requestBugreport_failsIfNotSignedWithPlatformKeys()
DCarBluetoothServiceTest.java67 @Mock private PackageManager mMockPackageManager; field in CarBluetoothServiceTest
95 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
DBluetoothDeviceConnectionPolicyTest.java100 @Mock private PackageManager mMockPackageManager; field in BluetoothDeviceConnectionPolicyTest
148 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarZonesAudioFocusUnitTest.java74 private PackageManager mMockPackageManager; field in CarZonesAudioFocusUnitTest
87 mMockPackageManager, mMockZones, mCarAudioSettings, true, in newCarZonesAudioFocus_withNullAudioManager_throws()
104 mMockPackageManager, null, mCarAudioSettings, true, mMockCarFocusCallback) in newCarZonesAudioFocus_withNullCarAudioZones_throws()
112 mMockPackageManager, new SparseArray<>(), mCarAudioSettings, true, in newCarZonesAudioFocus_withEmptyCarAudioZones_throws()
121 mMockPackageManager, mMockZones, null, true, mMockCarFocusCallback) in newCarZonesAudioFocus_withNullCarAudioSettings_throws()
127 CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, mMockPackageManager, in newCarZonesAudioFocus_withNullCarFocusCallback_succeeds()
DCarAudioFocusUnitTest.java78 private PackageManager mMockPackageManager; field in CarAudioFocusUnitTest
895 CarAudioFocus carAudioFocus = new CarAudioFocus(mMockAudioManager, mMockPackageManager, in getCarAudioFocus()
/packages/providers/TvProvider/tests/src/com/android/providers/tv/
DMockTvProviderContext.java38 private final MockPackageManagerForTesting mMockPackageManager = field in MockTvProviderContext
55 return mMockPackageManager; in getPackageManager()
88 mMockPackageManager.setExistingPackages(new HashSet<>(Arrays.asList(packages))); in setExistingPackages()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/network/
DAddMobileNetworkPreferenceControllerTest.java63 private PackageManager mMockPackageManager; field in AddMobileNetworkPreferenceControllerTest
69 when(mContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
90 when(mMockPackageManager.queryIntentActivities(ADD_NETWORK_INTENT, /* flags= */ 0)) in getAvailabilityStatus_euiccEnabled_intentResolves_isAvailable()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dpsink/
DA2dpSinkStreamHandlerTest.java57 @Mock private PackageManager mMockPackageManager; field in A2dpSinkStreamHandlerTest
81 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
82 when(mMockPackageManager.hasSystemFeature(any())).thenReturn(false); in setUp()
147 when(mMockPackageManager.hasSystemFeature(any())).thenReturn(true); in testSrcPlayIot()
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DBillingCycleSettingsTest.java77 private PackageManager mMockPackageManager; field in BillingCycleSettingsTest
160 when(mContext.getPackageManager()).thenReturn(mMockPackageManager); in onCreate_emptyArguments_shouldSetDefaultNetworkTemplate()
161 when(mMockPackageManager.hasSystemFeature(any())).thenReturn(true); in onCreate_emptyArguments_shouldSetDefaultNetworkTemplate()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
DCarUserNoticeServiceTest.java85 private PackageManager mMockPackageManager; field in CarUserNoticeServiceTest
133 mockContextGetService(mMockContext, PackageManager.class, mMockPackageManager); in setUpMocks()
134 when(mMockPackageManager.getPackageUidAsUser(any(), anyInt())).thenReturn(1); in setUpMocks()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DAdapterServiceTest.java112 private PackageManager mMockPackageManager; field in AdapterServiceTest
149 mMockPackageManager = mock(PackageManager.class); in setUp()
150 when(mMockPackageManager.getPermissionInfo(any(), anyInt())) in setUp()
167 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
192 doReturn(Process.BLUETOOTH_UID).when(mMockPackageManager) in setUp()
346 when(mockContext.getPackageManager()).thenReturn(mMockPackageManager); in testEnableDisableOnlyGatt()
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DSystemNavigationPreferenceControllerTest.java63 private PackageManager mMockPackageManager; field in SystemNavigationPreferenceControllerTest
83 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/
DCarZonesAudioFocusTest.java86 private PackageManager mMockPackageManager; field in CarZonesAudioFocusTest
338 CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, mMockPackageManager, in getCarZonesAudioFocus()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/watchdog/
DCarWatchdogServiceUnitTest.java127 @Mock private PackageManager mMockPackageManager; field in CarWatchdogServiceUnitTest
153 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager); in setUpMocks()
1258 when(mMockPackageManager.getNamesForUids(any())).thenAnswer(args -> { in mockPackageManager()
1266 when(mMockPackageManager.getPackagesForUid(anyInt())).thenAnswer( in mockPackageManager()
1269 when(mMockPackageManager.getApplicationInfoAsUser(any(), anyInt(), anyInt())).thenAnswer( in mockPackageManager()
1393 when(mMockPackageManager.getInstalledPackagesAsUser(eq(0), anyInt())) in injectPackageInfos()
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/details2/
DWifiDetailPreferenceController2Test.java200 private PackageManager mMockPackageManager; field in WifiDetailPreferenceController2Test
274 when(mContext.getPackageManager()).thenReturn(mMockPackageManager); in setUp()
1263 when(mMockPackageManager.getPackageUidAsUser(Matchers.anyString(), Matchers.anyInt())) in lockDownNetwork()