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/appsearch/visibilitystore/
DVisibilityStoreImplTest.java124 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testDoesCallerHaveSystemAccess() local
125 when(mockPackageManager in testDoesCallerHaveSystemAccess()
130 when(mockPackageManager in testDoesCallerHaveSystemAccess()
140 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testSetVisibility_displayedBySystem() local
141 when(mockPackageManager in testSetVisibility_displayedBySystem()
250 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testSetVisibility_visibleToPackages() local
251 when(mockPackageManager in testSetVisibility_visibleToPackages()
254 when(mockPackageManager in testSetVisibility_visibleToPackages()
286 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetVisibility_visibleToPackages()
288 when(mockPackageManager.hasSigningCertificate( in testSetVisibility_visibleToPackages()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/appsearch/
DAppSearchImplPlatformTest.java112 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testSetSchema_existingSchemaRetainsVisibilitySetting() local
113 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testSetSchema_existingSchemaRetainsVisibilitySetting()
115 when(mockPackageManager.hasSigningCertificate( in testSetSchema_existingSchemaRetainsVisibilitySetting()
120 when(mockPackageManager.checkPermission( in testSetSchema_existingSchemaRetainsVisibilitySetting()
123 when(mockPackageManager.checkPermission(READ_GLOBAL_APP_SEARCH_DATA, packageNameFoo)) in testSetSchema_existingSchemaRetainsVisibilitySetting()
219 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testRemoveSchema_removedFromVisibilityStore() local
220 when(mockPackageManager.getPackageUid(eq(packageNameFoo), /*flags=*/ anyInt())) in testRemoveSchema_removedFromVisibilityStore()
222 when(mockPackageManager.hasSigningCertificate( in testRemoveSchema_removedFromVisibilityStore()
227 when(mockPackageManager.checkPermission( in testRemoveSchema_removedFromVisibilityStore()
230 when(mockPackageManager.checkPermission(READ_GLOBAL_APP_SEARCH_DATA, packageNameFoo)) in testRemoveSchema_removedFromVisibilityStore()
[all …]
/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/services/tests/servicestests/src/com/android/server/appsearch/stats/
DPlatformLoggerTest.java152 PackageManager mockPackageManager = getMockPackageManager(mContext.getUser()); in testGetPackageUidAsUser() local
153 when(mockPackageManager.getPackageUid(testPackageName, /*flags=*/0)).thenReturn(testUid); in testGetPackageUidAsUser()
158 verify(mockPackageManager, times(1)) in testGetPackageUidAsUser()
167 verify(mockPackageManager, times(1)) in testGetPackageUidAsUser()
177 verify(mockPackageManager, times(2)) in testGetPackageUidAsUser()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/
DPipControllerTest.java125 PackageManager mockPackageManager = mock(PackageManager.class); in createPip_notSupported_returnsNull() local
126 when(mockPackageManager.hasSystemFeature(FEATURE_PICTURE_IN_PICTURE)).thenReturn(false); in createPip_notSupported_returnsNull()
127 when(spyContext.getPackageManager()).thenReturn(mockPackageManager); in createPip_notSupported_returnsNull()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayRotationTests.java705 final PackageManager mockPackageManager = mock(PackageManager.class); in configureDisplayRotation() local
706 when(mMockContext.getPackageManager()).thenReturn(mockPackageManager); in configureDisplayRotation()
707 when(mockPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)) in configureDisplayRotation()
709 when(mockPackageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)) in configureDisplayRotation()