Home
last modified time | relevance | path

Searched refs:mockPackageManager (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/net/watchlist/
DWatchlistLoggingHandlerTests.java83 final PackageManager mockPackageManager = mock(PackageManager.class); in setUp() local
89 return mockPackageManager; in setUp()
121 }).when(mockPackageManager).getInstalledApplications(anyInt()); in setUp()
142 }).when(mockPackageManager).getPackagesForUid(anyInt()); in setUp()
152 }).when(mockPackageManager).getPackageInfoAsUser(anyString(), anyInt(), anyInt()); in setUp()
/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/app/
DPermissionsChangedFlowTest.kt44 private val mockPackageManager = mock<PackageManager> { in <lambda>() constant in com.android.settingslib.spaprivileged.model.app.PermissionsChangedFlowTest
53 on { packageManager } doReturn mockPackageManager in <lambda>()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayRotationCompatPolicyTests.java156 final PackageManager mockPackageManager = mock(PackageManager.class); in testOpenedCameraInSplitScreen_showToast() local
158 when(mContext.getPackageManager()).thenReturn(mockPackageManager); in testOpenedCameraInSplitScreen_showToast()
159 when(mockPackageManager.getApplicationInfo(anyString(), anyInt())) in testOpenedCameraInSplitScreen_showToast()
162 doReturn(TEST_PACKAGE_1_LABEL).when(mockPackageManager) in testOpenedCameraInSplitScreen_showToast()
DDisplayRotationTests.java1321 final PackageManager mockPackageManager = mock(PackageManager.class); in configureDisplayRotation() local
1322 when(mMockContext.getPackageManager()).thenReturn(mockPackageManager); in configureDisplayRotation()
1323 when(mockPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) in configureDisplayRotation()
1325 when(mockPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) in configureDisplayRotation()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/
DPipControllerTest.java220 PackageManager mockPackageManager = mock(PackageManager.class); in createPip_notSupported_returnsNull() local
221 when(mockPackageManager.hasSystemFeature(FEATURE_PICTURE_IN_PICTURE)).thenReturn(false); in createPip_notSupported_returnsNull()
222 when(spyContext.getPackageManager()).thenReturn(mockPackageManager); in createPip_notSupported_returnsNull()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/
DMediaDataProcessorTest.kt577 val mockPackageManager = mock(PackageManager::class.java) in testOnNotificationAdded_emptyTitle_hasPlaceholder() constant
578 context.setMockPackageManager(mockPackageManager) in testOnNotificationAdded_emptyTitle_hasPlaceholder()
579 whenever(mockPackageManager.getApplicationLabel(any())).thenReturn(APP_NAME) in testOnNotificationAdded_emptyTitle_hasPlaceholder()
608 val mockPackageManager = mock(PackageManager::class.java) in testOnNotificationAdded_blankTitle_hasPlaceholder() constant
609 context.setMockPackageManager(mockPackageManager) in testOnNotificationAdded_blankTitle_hasPlaceholder()
610 whenever(mockPackageManager.getApplicationLabel(any())).thenReturn(APP_NAME) in testOnNotificationAdded_blankTitle_hasPlaceholder()
639 val mockPackageManager = mock(PackageManager::class.java) in testOnNotificationAdded_emptyMetadata_usesNotificationTitle() constant
640 context.setMockPackageManager(mockPackageManager) in testOnNotificationAdded_emptyMetadata_usesNotificationTitle()
641 whenever(mockPackageManager.getApplicationLabel(any())).thenReturn(APP_NAME) in testOnNotificationAdded_emptyMetadata_usesNotificationTitle()