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()
259 PackageManager mockPackageManager = mock(PackageManager.class); in testPackageNameMatchesCallingUid() local260 doReturn(mockPackageManager).when(mMockContext).getPackageManager(); in testPackageNameMatchesCallingUid()264 doReturn(Binder.getCallingUid()).when(mockPackageManager) in testPackageNameMatchesCallingUid()275 doReturn(Binder.getCallingUid() + 1).when(mockPackageManager) in testPackageNameMatchesCallingUid()
629 final PackageManager mockPackageManager = mock(PackageManager.class); in configureDisplayRotation() local630 when(mMockContext.getPackageManager()).thenReturn(mockPackageManager); in configureDisplayRotation()631 when(mockPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) in configureDisplayRotation()633 when(mockPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) in configureDisplayRotation()
348 PackageManagerInternal mockPackageManager = mock(PackageManagerInternal.class, in prepareStarter() local352 doReturn(mockPackageManager).when(mService).getPackageManagerInternalLocked(); in prepareStarter()355 doReturn(false).when(mockPackageManager).isPermissionsReviewRequired(any(), anyInt()); in prepareStarter()356 doNothing().when(mockPackageManager).grantEphemeralAccess( in prepareStarter()
648 PackageManagerInternal mockPackageManager = mock(PackageManagerInternal.class); in TestActivityManagerService() local649 doReturn(mockPackageManager).when(this).getPackageManagerInternalLocked(); in TestActivityManagerService()650 doReturn(null).when(mockPackageManager).getDefaultHomeActivity(anyInt()); in TestActivityManagerService()
96 public PackageManager mockPackageManager; field in WifiAwareManagerTest116 when(mockPackageManager.getApplicationInfo(anyString(), anyInt())).thenReturn( in setUp()119 when(mockContext.getPackageManager()).thenReturn(mockPackageManager); in setUp()