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/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DSmsPermissionsTest.java259 PackageManager mockPackageManager = mock(PackageManager.class); in testPackageNameMatchesCallingUid() local
260 doReturn(mockPackageManager).when(mMockContext).getPackageManager(); in testPackageNameMatchesCallingUid()
264 doReturn(Binder.getCallingUid()).when(mockPackageManager) in testPackageNameMatchesCallingUid()
275 doReturn(Binder.getCallingUid() + 1).when(mockPackageManager) in testPackageNameMatchesCallingUid()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayRotationTests.java629 final PackageManager mockPackageManager = mock(PackageManager.class); in configureDisplayRotation() local
630 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()
DActivityStarterTests.java348 PackageManagerInternal mockPackageManager = mock(PackageManagerInternal.class, in prepareStarter() local
352 doReturn(mockPackageManager).when(mService).getPackageManagerInternalLocked(); in prepareStarter()
355 doReturn(false).when(mockPackageManager).isPermissionsReviewRequired(any(), anyInt()); in prepareStarter()
356 doNothing().when(mockPackageManager).grantEphemeralAccess( in prepareStarter()
DActivityTestsBase.java648 PackageManagerInternal mockPackageManager = mock(PackageManagerInternal.class); in TestActivityManagerService() local
649 doReturn(mockPackageManager).when(this).getPackageManagerInternalLocked(); in TestActivityManagerService()
650 doReturn(null).when(mockPackageManager).getDefaultHomeActivity(anyInt()); in TestActivityManagerService()
/frameworks/base/wifi/tests/src/android/net/wifi/aware/
DWifiAwareManagerTest.java96 public PackageManager mockPackageManager; field in WifiAwareManagerTest
116 when(mockPackageManager.getApplicationInfo(anyString(), anyInt())).thenReturn( in setUp()
119 when(mockContext.getPackageManager()).thenReturn(mockPackageManager); in setUp()