/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/Nfc/tests/unit/src/com/android/nfc/cardemulation/ |
D | WalletRoleObserverTest.java | 61 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/ |
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/service/java/com/android/role/ |
D | RoleShellCommand.java | 41 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/ |
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() 120 final String packageName = CollectionUtils.firstOrNull(mRoleManager.getRoleHolders( in isDefaultApp()
|
/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 | 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 | DefaultEmergencyShortcutPreferenceControllerTest.java | 37 private RoleManager mRoleManager; field in DefaultEmergencyShortcutPreferenceControllerTest 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/Nfc/src/com/android/nfc/cardemulation/ |
D | WalletRoleObserver.java | 42 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/ |
D | RoleManagerAdapterImpl.java | 46 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/ |
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/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/ |
D | DefaultPaymentSettingsPreferenceControllerTest.java | 65 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/ |
D | DefaultAppsPreferenceController.java | 41 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/ |
D | RcsProvisioningMonitor.java | 106 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/ |
D | DefaultAssistantPickerEntryPreferenceController.java | 49 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/ |
D | SatelliteAccessController.java | 95 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/ |
D | BaseEmulatorActivity.java | 96 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/ |
D | DeviceManagementRoleHolderHelper.java | 73 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/ |
D | SetupSuccessFragment.java | 107 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/ |
D | TvUnblockSensorActivity.java | 67 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/ |
D | SipTransportController.java | 157 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/ |
D | DeviceLockServiceImpl.java | 103 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,
|