Searched refs:mockPackageManager (Results 1 – 6 of 6) sorted by relevance
83 final PackageManager mockPackageManager = mock(PackageManager.class); in setUp() local89 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()
44 private val mockPackageManager = mock<PackageManager> { in <lambda>() constant53 on { packageManager } doReturn mockPackageManager in <lambda>()
156 final PackageManager mockPackageManager = mock(PackageManager.class); in testOpenedCameraInSplitScreen_showToast() local158 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()
1321 final PackageManager mockPackageManager = mock(PackageManager.class); in configureDisplayRotation() local1322 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()
220 PackageManager mockPackageManager = mock(PackageManager.class); in createPip_notSupported_returnsNull() local221 when(mockPackageManager.hasSystemFeature(FEATURE_PICTURE_IN_PICTURE)).thenReturn(false); in createPip_notSupported_returnsNull()222 when(spyContext.getPackageManager()).thenReturn(mockPackageManager); in createPip_notSupported_returnsNull()
577 val mockPackageManager = mock(PackageManager::class.java) in testOnNotificationAdded_emptyTitle_hasPlaceholder() constant578 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() constant609 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() constant640 context.setMockPackageManager(mockPackageManager) in testOnNotificationAdded_emptyMetadata_usesNotificationTitle()641 whenever(mockPackageManager.getApplicationLabel(any())).thenReturn(APP_NAME) in testOnNotificationAdded_emptyMetadata_usesNotificationTitle()