/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | DefaultAppsPreferenceControllerTest.java | 53 private RoleManager mRoleManager; field in DefaultAppsPreferenceControllerTest 68 when(mContext.getSystemService(RoleManager.class)).thenReturn(mRoleManager); in setUp() 90 when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn( in getSummary_allAvailable_shouldReturnAll() 92 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_allAvailable_shouldReturnAll() 94 when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn( in getSummary_allAvailable_shouldReturnAll() 102 when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn( in getSummary_browserAndDialerAvailable_shouldReturnBrowserAndDialer() 104 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_browserAndDialerAvailable_shouldReturnBrowserAndDialer() 106 when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn(Collections.emptyList()); in getSummary_browserAndDialerAvailable_shouldReturnBrowserAndDialer() 113 when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn( in getSummary_browserAndSmsAvailable_shouldReturnBrowserAndSms() 115 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_browserAndSmsAvailable_shouldReturnBrowserAndSms() [all …]
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/systembar/ |
D | ButtonRoleHolderControllerTest.java | 70 private RoleManager mRoleManager; field in ButtonRoleHolderControllerTest 98 mPackageManager, mRoleManager, mDeviceProvisionedController); in setUp() 103 when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any())) in addAllButtonsWithRoleName_roleAssigned_appIconEnabled_useAssignedAppIcon() 113 when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any())) in addAllButtonsWithRoleName_roleUnassigned_appIconEnabled_useDefaultIcon() 123 when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_ASSISTANT), any())) in onRoleChanged_currentUser_appIconEnabled_useAssignedAppIcon() 126 when(mRoleManager in onRoleChanged_currentUser_appIconEnabled_useAssignedAppIcon() 137 when(mRoleManager in onRoleChanged_nonCurrentUser_appIconEnabled_iconIsNotUpdated() 142 when(mRoleManager in onRoleChanged_nonCurrentUser_appIconEnabled_iconIsNotUpdated() 154 when(mRoleManager in onRoleChanged_invalidPackage_useDefaultIcon() 165 when(mRoleManager in addAllButtonsWithRoleName_appIconDisabled_useDefaultIcon() [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/service/ |
D | RoleControllerServiceImpl.java | 49 private RoleManager mRoleManager; field in RoleControllerServiceImpl 55 mRoleManager = getSystemService(RoleManager.class); in onCreate() 80 if (!mRoleManager.isRoleAvailable(roleName)) { in onGrantDefaultRoles() 88 mRoleManager.setRoleNamesFromController(roleNames); in onGrantDefaultRoles() 107 List<String> currentPackageNames = mRoleManager.getRoleHolders(roleName); in onGrantDefaultRoles() 128 currentPackageNames = mRoleManager.getRoleHolders(roleName); in onGrantDefaultRoles() 167 currentPackageNames = mRoleManager.getRoleHolders(roleName); in onGrantDefaultRoles() 214 List<String> currentPackageNames = mRoleManager.getRoleHolders(roleName); in onAddRoleHolder() 330 added = mRoleManager.addRoleHolderFromController(roleName, packageName); in addRoleHolderInternal() 352 boolean removed = mRoleManager.removeRoleHolderFromController(roleName, packageName); in removeRoleHolderInternal() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/ |
D | DefaultAppShortcutPreferenceControllerBaseTest.java | 63 private RoleManager mRoleManager; field in DefaultAppShortcutPreferenceControllerBaseTest 76 shadowApplication.setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp() 85 verify(mRoleManager).isApplicationVisibleForRole(eq(TEST_ROLE_NAME), eq( in constructor_callsIsApplicationVisibleForRole() 152 verify(mRoleManager).isRoleVisible(eq(TEST_ROLE_NAME), any(Executor.class), in setRoleIsVisible() 161 verify(mRoleManager).isApplicationVisibleForRole(eq(TEST_ROLE_NAME), eq( in setApplicationIsVisibleForRole() 169 when(mRoleManager.getRoleHolders(eq(TEST_ROLE_NAME))).thenReturn(Collections.singletonList( in updateState_isRoleHolder_shouldSetSummaryToYes() 179 when(mRoleManager.getRoleHolders(eq(TEST_ROLE_NAME))).thenReturn(Collections.emptyList()); in updateState_notRoleHoler_shouldSetSummaryToNo()
|
D | DefaultEmergencyShortcutPreferenceControllerTest.java | 37 private RoleManager mRoleManager; field in DefaultEmergencyShortcutPreferenceControllerTest 44 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
|
D | DefaultBrowserShortcutPreferenceControllerTest.java | 37 private RoleManager mRoleManager; field in DefaultBrowserShortcutPreferenceControllerTest 44 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
|
D | DefaultHomeShortcutPreferenceControllerTest.java | 37 private RoleManager mRoleManager; field in DefaultHomeShortcutPreferenceControllerTest 44 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
|
D | DefaultPhoneShortcutPreferenceControllerTest.java | 40 private RoleManager mRoleManager; field in DefaultPhoneShortcutPreferenceControllerTest 47 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
|
D | DefaultSmsShortcutPreferenceControllerTest.java | 40 private RoleManager mRoleManager; field in DefaultSmsShortcutPreferenceControllerTest 48 shadowApplication.setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | DefaultAppShortcutPreferenceControllerBase.java | 42 private final RoleManager mRoleManager; field in DefaultAppShortcutPreferenceControllerBase 57 mRoleManager = context.getSystemService(RoleManager.class); in DefaultAppShortcutPreferenceControllerBase() 60 mRoleManager.isRoleVisible(mRoleName, executor, visible -> { in DefaultAppShortcutPreferenceControllerBase() 64 mRoleManager.isApplicationVisibleForRole(mRoleName, mPackageName, executor, in DefaultAppShortcutPreferenceControllerBase() 119 final String packageName = CollectionUtils.firstOrNull(mRoleManager.getRoleHolders( in isDefaultApp()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | RoleManagerAdapterImpl.java | 44 private RoleManager mRoleManager; field in RoleManagerAdapterImpl 49 mRoleManager = roleManager; in RoleManagerAdapterImpl() 88 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, (roleName, user) -> { in observeDefaultDialerApp() 122 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(ROLE_CALL_SCREENING, in getRoleManagerCallScreeningApp() 131 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(ROLE_DIALER, in getRoleManagerDefaultDialerApp() 145 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(ROLE_CALL_REDIRECTION_APP, in getRoleManagerCallRedirectionApp()
|
/packages/modules/Permission/service/java/com/android/role/ |
D | RoleShellCommand.java | 38 private final IRoleManager mRoleManager; field in RoleShellCommand 41 mRoleManager = roleManager; in RoleShellCommand() 116 mRoleManager.addRoleHolderAsUser(roleName, packageName, flags, userId, in runAddRoleHolder() 128 mRoleManager.removeRoleHolderAsUser(roleName, packageName, flags, userId, in runRemoveRoleHolder() 139 mRoleManager.clearRoleHoldersAsUser(roleName, flags, userId, future.createCallback()); in runClearRoleHolders()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/ |
D | ButtonRoleHolderController.java | 55 private final RoleManager mRoleManager; field in ButtonRoleHolderController 66 mRoleManager = roleManager; in ButtonRoleHolderController() 95 mRoleManager.addOnRoleHoldersChangedListenerAsUser(mContext.getMainExecutor(), in addButtonWithRoleName() 104 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(mListener, UserHandle.ALL); in removeAll() 122 List<String> holders = mRoleManager.getRoleHoldersAsUser(button.getRoleName(), in updateIcon()
|
/packages/services/Telephony/src/com/android/phone/ |
D | RcsProvisioningMonitor.java | 96 private final RoleManagerAdapter mRoleManager; field in RcsProvisioningMonitor 138 mRoleManager.addOnRoleHoldersChangedListenerAsUser( in register() 147 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(this, UserHandle.SYSTEM); in unregister() 447 mRoleManager = roleManager; in RcsProvisioningMonitor() 819 return CollectionUtils.firstOrNull(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)); in getDmaPackageName() 879 private final RoleManager mRoleManager; field in RcsProvisioningMonitor.RoleManagerAdapterImpl 882 mRoleManager = context.getSystemService(RoleManager.class); in RoleManagerAdapterImpl() 887 return mRoleManager.getRoleHolders(roleName); in getRoleHolders() 893 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, listener, user); in addOnRoleHoldersChangedListenerAsUser() 899 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(listener, user); in removeOnRoleHoldersChangedListenerAsUser()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | DefaultAppsPreferenceController.java | 36 private final RoleManager mRoleManager; field in DefaultAppsPreferenceController 42 mRoleManager = context.getSystemService(RoleManager.class); in DefaultAppsPreferenceController() 72 final List<String> packageNames = mRoleManager.getRoleHolders(roleName); in getDefaultAppLabel()
|
/packages/services/Telephony/src/com/android/services/telephony/rcs/ |
D | SipTransportController.java | 151 private final RoleManager mRoleManager; field in SipTransportController.RoleManagerAdapterImpl 154 mRoleManager = context.getSystemService(RoleManager.class); in RoleManagerAdapterImpl() 159 return mRoleManager.getRoleHolders(roleName); in getRoleHolders() 165 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, listener, user); in addOnRoleHoldersChangedListenerAsUser() 171 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(listener, user); in removeOnRoleHoldersChangedListenerAsUser()
|
/packages/services/Telephony/tests/src/com/android/phone/ |
D | RcsProvisioningMonitorTest.java | 161 private RcsProvisioningMonitor.RoleManagerAdapter mRoleManager; field in RcsProvisioningMonitorTest 273 }).when(mRoleManager).addOnRoleHoldersChangedListenerAsUser(any(Executor.class), in setUp() 277 when(mRoleManager.getRoleHolders(eq(RoleManager.ROLE_SMS))).thenReturn(dmas); in setUp() 758 mRoleManager, mFeatureFactory); in createMonitor() 789 when(mRoleManager.getRoleHolders(eq(RoleManager.ROLE_SMS))).thenReturn(dmas); in updateDefaultMessageApplication()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/dashboard/ |
D | PermissionUsageV2Fragment.java | 112 private @NonNull RoleManager mRoleManager; field in PermissionUsageV2Fragment 146 mRoleManager = Utils.getSystemServiceSafe(context, RoleManager.class); in onCreate() 328 Set<String> exemptedPackages = Utils.getExemptedPackages(mRoleManager); in updateUI()
|
D | PermissionDetailsFragment.java | 120 private @NonNull RoleManager mRoleManager; field in PermissionDetailsFragment 154 mRoleManager = Utils.getSystemServiceSafe(context, RoleManager.class); in onCreate() 297 Set<String> exemptedPackages = Utils.getExemptedPackages(mRoleManager); in updateUI()
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | ComponentContextFixture.java | 216 return mRoleManager; in getSystemService() 527 private final RoleManager mRoleManager = mock(RoleManager.class);
|