Home
last modified time | relevance | path

Searched refs:mPermissionHelper (Results 1 – 5 of 5) sorted by relevance

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DPermissionHelperTest.java77 private PermissionHelper mPermissionHelper; field in PermissionHelperTest
84 mPermissionHelper = new PermissionHelper(mContext, mPackageManager, mPermManager); in setUp()
96 assertThat(mPermissionHelper.hasPermission(1)).isTrue(); in testHasPermission()
101 assertThat(mPermissionHelper.hasPermission(1)).isFalse(); in testHasPermission()
136 Set<Pair<Integer, String>> actual = mPermissionHelper.getAppsRequestingPermission(0); in testGetAppsRequestingPermission()
153 assertThat(mPermissionHelper.hasRequestedPermission(permission, packageName, 0)).isFalse(); in testHasRequestedPermission_otherPermission()
168 assertThat(mPermissionHelper.hasRequestedPermission(permission, packageName, 0)).isFalse(); in testHasRequestedPermission_noPermissions()
184 assertThat(mPermissionHelper.hasRequestedPermission(permission, packageName, 0)).isTrue(); in testHasRequestedPermission_singlePermissions()
200 assertThat(mPermissionHelper.hasRequestedPermission(permission, packageName, 0)).isTrue(); in testHasRequestedPermission_twoPermissions()
210 assertThat(mPermissionHelper.getAppsGrantedPermission(userId)).isNotNull(); in testGetAppsGrantedPermission_noApps()
[all …]
DPreferencesHelperTest.java210 @Mock PermissionHelper mPermissionHelper; field in PreferencesHelperTest
350 when(mPermissionHelper.getNotificationPermissionValues(USER_SYSTEM)) in setUp()
361 mPermissionHelper, mPermissionManager, mLogger, mAppOpsManager, mUserProfiles, in setUp()
364 mPermissionHelper, mPermissionManager, mLogger, mAppOpsManager, mUserProfiles, in setUp()
533 when(mPermissionHelper.getNotificationPermissionValues(10)) in testWriteXml_onlyBackupsTargetUser()
564 when(mPermissionHelper.getNotificationPermissionValues(USER_SYSTEM)) in testReadXml_onlyRestoresTargetUser()
740 mPermissionHelper, mPermissionManager, mLogger, mAppOpsManager, mUserProfiles, in testReadXml_oldXml_migrates()
853 verify(mPermissionHelper, never()).setNotificationPermission(any()); in testReadXml_oldXml_backup_migratesWhenPkgInstalled()
868 verify(mPermissionHelper).setNotificationPermission(pkg1Expected); in testReadXml_oldXml_backup_migratesWhenPkgInstalled()
869 verify(mPermissionHelper).setNotificationPermission(pkg2Expected); in testReadXml_oldXml_backup_migratesWhenPkgInstalled()
[all …]
DNotificationManagerServiceTest.java402 private PermissionHelper mPermissionHelper; field in NotificationManagerServiceTest
753 mAmi, mToastRateLimiter, mPermissionHelper, mock(UsageStatsManagerInternal.class), in initNMS()
866 when(mPermissionHelper.hasPermission(mUid)).thenReturn(true); in initNMS()
1739 when(mPermissionHelper.hasPermission(mUid)).thenReturn(false); in testEnqueuedBlockedNotifications_blockedApp()
1752 when(mPermissionHelper.hasPermission(mUid)).thenReturn(false); in testEnqueuedBlockedNotifications_blockedAppForegroundService()
1848 when(mPermissionHelper.hasPermission(mUid)).thenReturn(true); in testSetNotificationsEnabledForPackage_noChange()
1851 verify(mPermissionHelper, never()).setNotificationPermission( in testSetNotificationsEnabledForPackage_noChange()
1857 when(mPermissionHelper.hasPermission(mUid)).thenReturn(true); in testSetNotificationsEnabledForPackage()
1860 verify(mPermissionHelper).setNotificationPermission( in testSetNotificationsEnabledForPackage()
1905 when(mPermissionHelper.hasPermission(anyInt())).thenReturn(false); in testBlockedNotifications_blockedByUser()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DPreferencesHelper.java204 private final PermissionHelper mPermissionHelper; field in PreferencesHelper
233 mPermissionHelper = permHelper; in PreferencesHelper()
620 notifPermissions = mPermissionHelper.getNotificationPermissionValues(userId); in writeXml()
1449 boolean fixed = mPermissionHelper.isPermissionFixed( in updateFixedImportance()
1898 if (!mPermissionHelper.hasPermission(app.second)) { in updateCurrentUserHasChannelsBypassingDnd()
2283 final boolean requestedFSIPermission = mPermissionHelper.hasRequestedPermission( in pullPackagePreferencesStats()
2687 mPermissionHelper.setNotificationPermission(p); in onPackagesChanged()
2925 mPermissionHelper.setNotificationPermission(pkgPerm); in migrateNotificationPermissions()
DNotificationManagerService.java627 private PermissionHelper mPermissionHelper; field in NotificationManagerService
2507 mPermissionHelper = permissionHelper; in init()
2514 mPermissionHelper, in init()
3086 mPermissionHelper.setNotificationPermission(pkg, UserHandle.getUserId(uid),
3824 boolean wasEnabled = mPermissionHelper.hasPermission(uid);
3828 mPermissionHelper.setNotificationPermission(
3973 if (mPermissionHelper.hasPermission(Binder.getCallingUid())) {
6431 return mPermissionHelper.isPermissionFixed(pkg, userId);
6542 boolean hasPermission = mPermissionHelper.hasPermission(uid);
6682 boolean isPermissionFixed = mPermissionHelper.isPermissionFixed(pkg, userId);
[all …]