Home
last modified time | relevance | path

Searched refs:mRoleManager (Results 1 – 20 of 20) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DDefaultAppsPreferenceControllerTest.java53 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/
DButtonRoleHolderControllerTest.java70 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/
DRoleControllerServiceImpl.java49 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/
DDefaultAppShortcutPreferenceControllerBaseTest.java63 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()
DDefaultEmergencyShortcutPreferenceControllerTest.java37 private RoleManager mRoleManager; field in DefaultEmergencyShortcutPreferenceControllerTest
44 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
DDefaultBrowserShortcutPreferenceControllerTest.java37 private RoleManager mRoleManager; field in DefaultBrowserShortcutPreferenceControllerTest
44 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
DDefaultHomeShortcutPreferenceControllerTest.java37 private RoleManager mRoleManager; field in DefaultHomeShortcutPreferenceControllerTest
44 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
DDefaultPhoneShortcutPreferenceControllerTest.java40 private RoleManager mRoleManager; field in DefaultPhoneShortcutPreferenceControllerTest
47 ShadowApplication.getInstance().setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
DDefaultSmsShortcutPreferenceControllerTest.java40 private RoleManager mRoleManager; field in DefaultSmsShortcutPreferenceControllerTest
48 shadowApplication.setSystemService(Context.ROLE_SERVICE, mRoleManager); in setUp()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DDefaultAppShortcutPreferenceControllerBase.java42 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/
DRoleManagerAdapterImpl.java44 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/
DRoleShellCommand.java38 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/
DButtonRoleHolderController.java55 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/
DRcsProvisioningMonitor.java96 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/
DDefaultAppsPreferenceController.java36 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/
DSipTransportController.java151 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/
DRcsProvisioningMonitorTest.java161 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/
DPermissionUsageV2Fragment.java112 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()
DPermissionDetailsFragment.java120 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/
DComponentContextFixture.java216 return mRoleManager; in getSystemService()
527 private final RoleManager mRoleManager = mock(RoleManager.class);