Home
last modified time | relevance | path

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

12

/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/Nfc/tests/unit/src/com/android/nfc/cardemulation/
DWalletRoleObserverTest.java61 RoleManager mRoleManager; field in WalletRoleObserverTest
84 new WalletRoleObserver(mContext, mRoleManager, mCallback, mNfcInjector); in setUp()
90 verify(mRoleManager).addOnRoleHoldersChangedListenerAsUser(mExecutorCaptor.capture(),any(), in testConstructor()
99 when(mRoleManager.isRoleAvailable(eq(RoleManager.ROLE_WALLET))).thenReturn(true); in testGetDefaultWalletRoleHolder_roleAvailable_returnsTheHolder()
100 when(mRoleManager.getRoleHoldersAsUser(eq(RoleManager.ROLE_WALLET), in testGetDefaultWalletRoleHolder_roleAvailable_returnsTheHolder()
105 verify(mRoleManager).isRoleAvailable(mRoleNameCaptor.capture()); in testGetDefaultWalletRoleHolder_roleAvailable_returnsTheHolder()
106 verify(mRoleManager).getRoleHoldersAsUser(mRoleNameCaptor.capture(), in testGetDefaultWalletRoleHolder_roleAvailable_returnsTheHolder()
115 when(mRoleManager.isRoleAvailable(eq(RoleManager.ROLE_WALLET))).thenReturn(false); in testGetDefaultWalletRoleHolder_roleNotAvailable_returnsNull()
125 when(mRoleManager.getRoleHolders(eq(RoleManager.ROLE_WALLET))).thenReturn(roleHolders); in testCallbackFiringOnRoleChange_roleWallet()
129 verify(mRoleManager).getRoleHolders(mRoleNameCaptor.capture()); in testCallbackFiringOnRoleChange_roleWallet()
[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/service/java/com/android/role/
DRoleShellCommand.java41 private final IRoleManager mRoleManager; field in RoleShellCommand
44 mRoleManager = roleManager; in RoleShellCommand()
120 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(roleName, userId); in runGetRoleHolders()
132 mRoleManager.addRoleHolderAsUser(roleName, packageName, flags, userId, in runAddRoleHolder()
144 mRoleManager.removeRoleHolderAsUser(roleName, packageName, flags, userId, in runRemoveRoleHolder()
155 mRoleManager.clearRoleHoldersAsUser(roleName, flags, userId, future.createCallback()); in runClearRoleHolders()
161 mRoleManager.setBypassingRoleQualification(value); in runSetBypassingRoleQualification()
/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()
120 final String packageName = CollectionUtils.firstOrNull(mRoleManager.getRoleHolders( in isDefaultApp()
/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()
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()
DDefaultEmergencyShortcutPreferenceControllerTest.java37 private RoleManager mRoleManager; field in DefaultEmergencyShortcutPreferenceControllerTest
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/Nfc/src/com/android/nfc/cardemulation/
DWalletRoleObserver.java42 private RoleManager mRoleManager; field in WalletRoleObserver
50 this.mRoleManager = roleManager; in WalletRoleObserver()
70 this.mRoleManager.addOnRoleHoldersChangedListenerAsUser(context.getMainExecutor(), in WalletRoleObserver()
77 if (!mRoleManager.isRoleAvailable(RoleManager.ROLE_WALLET)) { in getDefaultWalletRoleHolder()
80 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(RoleManager.ROLE_WALLET, in getDefaultWalletRoleHolder()
/packages/services/Telecomm/src/com/android/server/telecom/
DRoleManagerAdapterImpl.java46 private RoleManager mRoleManager; field in RoleManagerAdapterImpl
51 mRoleManager = roleManager; in RoleManagerAdapterImpl()
104 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, (roleName, user) -> { in observeDefaultDialerApp()
138 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(ROLE_CALL_SCREENING, in getRoleManagerCallScreeningApp()
147 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(ROLE_DIALER, in getRoleManagerDefaultDialerApp()
161 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(ROLE_CALL_REDIRECTION_APP, in getRoleManagerCallRedirectionApp()
/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/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/
DDefaultPaymentSettingsPreferenceControllerTest.java65 private RoleManager mRoleManager; field in DefaultPaymentSettingsPreferenceControllerTest
78 when(mContext.getSystemService(RoleManager.class)).thenReturn(mRoleManager); in setUp()
114 when(mRoleManager.isRoleAvailable(anyString())).thenReturn(true); in handlePreferenceTreeClick_walletRoleEnabled_shouldReturnTrue()
120 verify(mRoleManager).isRoleAvailable(roleTypeCaptor.capture()); in handlePreferenceTreeClick_walletRoleEnabled_shouldReturnTrue()
/packages/apps/Settings/src/com/android/settings/applications/
DDefaultAppsPreferenceController.java41 private final RoleManager mRoleManager; field in DefaultAppsPreferenceController
47 mRoleManager = context.getSystemService(RoleManager.class); in DefaultAppsPreferenceController()
88 final List<String> packageNames = mRoleManager.getRoleHolders(roleName); in getDefaultAppLabel()
/packages/services/Telephony/src/com/android/phone/
DRcsProvisioningMonitor.java106 private final RoleManagerAdapter mRoleManager; field in RcsProvisioningMonitor
150 mRoleManager.addOnRoleHoldersChangedListenerAsUser( in register()
159 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(this, UserHandle.SYSTEM); in unregister()
490 mRoleManager = roleManager; in RcsProvisioningMonitor()
882 return CollectionUtils.firstOrNull(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)); in getDmaPackageName()
946 private final RoleManager mRoleManager; field in RcsProvisioningMonitor.RoleManagerAdapterImpl
949 mRoleManager = context.getSystemService(RoleManager.class); in RoleManagerAdapterImpl()
954 return mRoleManager.getRoleHolders(roleName); in getRoleHolders()
960 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, listener, user); in addOnRoleHoldersChangedListenerAsUser()
966 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(listener, user); in removeOnRoleHoldersChangedListenerAsUser()
/packages/apps/Car/Settings/src/com/android/car/settings/applications/defaultapps/
DDefaultAssistantPickerEntryPreferenceController.java49 private final RoleManager mRoleManager; field in DefaultAssistantPickerEntryPreferenceController
54 mRoleManager = getContext().getSystemService(RoleManager.class); in DefaultAssistantPickerEntryPreferenceController()
94 mRoleManager.getRoleHolders(RoleManager.ROLE_ASSISTANT)); in getComponentName()
/packages/modules/Connectivity/service/src/com/android/server/connectivity/
DSatelliteAccessController.java95 private final RoleManager mRoleManager; field in SatelliteAccessController.Dependencies
98 mRoleManager = context.getSystemService(RoleManager.class); in Dependencies()
103 return mRoleManager.getRoleHoldersAsUser(roleName, userHandle); in getRoleHoldersAsUser()
109 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, listener, user); in addOnRoleHoldersChangedListenerAsUser()
/packages/apps/Nfc/testutils/src/com/android/nfc/emulator/
DBaseEmulatorActivity.java96 protected RoleManager mRoleManager; field in BaseEmulatorActivity
121 mRoleManager = getSystemService(RoleManager.class); in onCreate()
275 assert mRoleManager != null; in isWalletRoleHeld()
276 return mRoleManager.isRoleHeld(RoleManager.ROLE_WALLET); in isWalletRoleHeld()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DDeviceManagementRoleHolderHelper.java73 var mRoleManager = requireNonNull(context.getSystemService(RoleManager.class), in DeviceManagementRoleHolderHelper()
75 if (mRoleManager.getRoleHoldersAsUser(roleName, user).contains(packageName)) { in DeviceManagementRoleHolderHelper()
82 mRoleManager.addRoleHolderAsUser(roleName, packageName, /* flags= */ 0, in DeviceManagementRoleHolderHelper()
/packages/apps/Settings/src/com/android/settings/privatespace/
DSetupSuccessFragment.java107 RoleManager mRoleManager = getContext().getSystemService(RoleManager.class); in onClickNext() local
108 final List<String> packageNames = mRoleManager in onClickNext()
/packages/apps/TvSystemUI/src/com/android/systemui/tv/sensorprivacy/
DTvUnblockSensorActivity.java67 private final RoleManager mRoleManager; field in TvUnblockSensorActivity
83 mRoleManager = roleManager; in TvUnblockSensorActivity()
328 List<String> assistantPkgs = mRoleManager.getRoleHolders(RoleManager.ROLE_ASSISTANT); in isHTTAccessDisabled()
/packages/services/Telephony/src/com/android/services/telephony/rcs/
DSipTransportController.java157 private final RoleManager mRoleManager; field in SipTransportController.RoleManagerAdapterImpl
160 mRoleManager = context.getSystemService(RoleManager.class); in RoleManagerAdapterImpl()
165 return mRoleManager.getRoleHolders(roleName); in getRoleHolders()
171 mRoleManager.addOnRoleHoldersChangedListenerAsUser(executor, listener, user); in addOnRoleHoldersChangedListenerAsUser()
177 mRoleManager.removeOnRoleHoldersChangedListenerAsUser(listener, user); in removeOnRoleHoldersChangedListenerAsUser()
/packages/modules/DeviceLock/service/java/com/android/server/devicelock/
DDeviceLockServiceImpl.java103 private final RoleManager mRoleManager; field in DeviceLockServiceImpl
231 mRoleManager = context.getSystemService(RoleManager.class); in DeviceLockServiceImpl()
676 List<String> roleHolders = mRoleManager.getRoleHoldersAsUser(
721 mRoleManager.addRoleHolderAsUser(RoleManager.ROLE_FINANCED_DEVICE_KIOSK, packageName,
769 mRoleManager.removeRoleHolderAsUser(RoleManager.ROLE_FINANCED_DEVICE_KIOSK, packageName,

12