/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/service/ |
D | RoleControllerServiceImpl.java | 78 String roleName = role.getName(); in onGrantDefaultRoles() local 79 roleNames.add(roleName); in onGrantDefaultRoles() 80 if (!mRoleManager.isRoleAvailable(roleName)) { in onGrantDefaultRoles() 81 addedRoleNames.add(roleName); in onGrantDefaultRoles() 92 String roleName = addedRoleNames.valueAt(i); in onGrantDefaultRoles() local 94 Role role = roleMap.get(roleName); in onGrantDefaultRoles() 103 String roleName = role.getName(); in onGrantDefaultRoles() local 107 List<String> currentPackageNames = mRoleManager.getRoleHolders(roleName); in onGrantDefaultRoles() 121 + " package: " + packageName + ", role: " + roleName); in onGrantDefaultRoles() 128 currentPackageNames = mRoleManager.getRoleHolders(roleName); in onGrantDefaultRoles() [all …]
|
/packages/modules/Permission/framework-s/java/android/app/role/ |
D | RoleControllerService.java | 95 public void onAddRoleHolder(String roleName, String packageName, int flags, in onBind() argument 99 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in onBind() 104 mWorkerHandler.post(() -> RoleControllerService.this.onAddRoleHolder(roleName, in onBind() 109 public void onRemoveRoleHolder(String roleName, String packageName, int flags, in onBind() argument 113 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in onBind() 118 mWorkerHandler.post(() -> RoleControllerService.this.onRemoveRoleHolder(roleName, in onBind() 123 public void onClearRoleHolders(String roleName, int flags, RemoteCallback callback) { in onBind() argument 126 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in onBind() 129 mWorkerHandler.post(() -> RoleControllerService.this.onClearRoleHolders(roleName, in onBind() 141 public void isApplicationQualifiedForRole(String roleName, String packageName, in onBind() argument [all …]
|
D | RoleManager.java | 223 public Intent createRequestRoleIntent(@NonNull String roleName) { in createRequestRoleIntent() argument 224 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in createRequestRoleIntent() 227 intent.putExtra(Intent.EXTRA_ROLE_NAME, roleName); in createRequestRoleIntent() 238 public boolean isRoleAvailable(@NonNull String roleName) { in isRoleAvailable() argument 239 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in isRoleAvailable() 241 return mService.isRoleAvailable(roleName); in isRoleAvailable() 254 public boolean isRoleHeld(@NonNull String roleName) { in isRoleHeld() argument 255 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in isRoleHeld() 257 return mService.isRoleHeld(roleName, mContext.getPackageName()); in isRoleHeld() 280 public List<String> getRoleHolders(@NonNull String roleName) { in getRoleHolders() argument [all …]
|
D | IRoleManager.aidl | 28 boolean isRoleAvailable(in String roleName); in isRoleAvailable() argument 30 boolean isRoleHeld(in String roleName, in String packageName); in isRoleHeld() argument 32 List<String> getRoleHoldersAsUser(in String roleName, int userId); in getRoleHoldersAsUser() argument 34 void addRoleHolderAsUser(in String roleName, in String packageName, int flags, int userId, in addRoleHolderAsUser() argument 37 void removeRoleHolderAsUser(in String roleName, in String packageName, int flags, int userId, in removeRoleHolderAsUser() argument 40 void clearRoleHoldersAsUser(in String roleName, int flags, int userId, in clearRoleHoldersAsUser() argument 54 boolean addRoleHolderFromController(in String roleName, in String packageName); in addRoleHolderFromController() argument 56 boolean removeRoleHolderFromController(in String roleName, in String packageName); in removeRoleHolderFromController() argument
|
D | RoleControllerManager.java | 154 public void onAddRoleHolder(@NonNull String roleName, @NonNull String packageName, in onAddRoleHolder() argument 158 service.onAddRoleHolder(roleName, packageName, flags, in onAddRoleHolder() 170 public void onRemoveRoleHolder(@NonNull String roleName, @NonNull String packageName, in onRemoveRoleHolder() argument 174 service.onRemoveRoleHolder(roleName, packageName, flags, in onRemoveRoleHolder() 186 public void onClearRoleHolders(@NonNull String roleName, in onClearRoleHolders() argument 190 service.onClearRoleHolders(roleName, flags, in onClearRoleHolders() 203 public void isApplicationVisibleForRole(@NonNull String roleName, @NonNull String packageName, in isApplicationVisibleForRole() argument 207 service.isApplicationVisibleForRole(roleName, packageName, in isApplicationVisibleForRole() 220 public void isRoleVisible(@NonNull String roleName, in isRoleVisible() argument 224 service.isRoleVisible(roleName, new RemoteCallback(future::complete)); in isRoleVisible()
|
D | IRoleController.aidl | 28 void onAddRoleHolder(in String roleName, in String packageName, int flags, in onAddRoleHolder() argument 31 void onRemoveRoleHolder(in String roleName, in String packageName, int flags, in onRemoveRoleHolder() argument 34 void onClearRoleHolders(in String roleName, int flags, in RemoteCallback callback); in onClearRoleHolders() argument 36 void isApplicationQualifiedForRole(in String roleName, in String packageName, in isApplicationQualifiedForRole() argument 39 void isApplicationVisibleForRole(in String roleName, in String packageName, in isApplicationVisibleForRole() argument 42 void isRoleVisible(in String roleName, in RemoteCallback callback); in isRoleVisible() argument
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/model/ |
D | UserDeniedManager.java | 70 public boolean isDeniedOnce(@NonNull String roleName, @NonNull String packageName) { in isDeniedOnce() argument 71 return isDenied(roleName, packageName, false); in isDeniedOnce() 80 public void setDeniedOnce(@NonNull String roleName, @NonNull String packageName) { in setDeniedOnce() argument 81 setDenied(roleName, packageName, false, true); in setDeniedOnce() 92 public boolean isDeniedAlways(@NonNull String roleName, @NonNull String packageName) { in isDeniedAlways() argument 93 return isDenied(roleName, packageName, true); in isDeniedAlways() 102 public void setDeniedAlways(@NonNull String roleName, @NonNull String packageName) { in setDeniedAlways() argument 103 setDenied(roleName, packageName, true, true); in setDeniedAlways() 112 public void clearDenied(@NonNull String roleName, @NonNull String packageName) { in clearDenied() argument 113 setDenied(roleName, packageName, false, false); in clearDenied() [all …]
|
D | Role.java | 824 String roleName = otherRoleNames.get(i); in revoke() local 825 Role role = roles.get(roleName); in revoke() 834 String roleName = otherRoleNames.get(i); in revoke() local 835 Role role = roles.get(roleName); in revoke() 846 String roleName = otherRoleNames.get(i); in revoke() local 847 Role role = roles.get(roleName); in revoke()
|
/packages/modules/Permission/service/java/com/android/role/ |
D | RoleUserState.java | 169 public boolean isRoleAvailable(@NonNull String roleName) { in isRoleAvailable() argument 171 return mRoles.containsKey(roleName); in isRoleAvailable() 183 public ArraySet<String> getRoleHolders(@NonNull String roleName) { in getRoleHolders() argument 185 ArraySet<String> packageNames = mRoles.get(roleName); in getRoleHolders() 200 public boolean addRoleName(@NonNull String roleName) { in addRoleName() argument 202 if (!mRoles.containsKey(roleName)) { in addRoleName() 203 mRoles.put(roleName, new ArraySet<>()); in addRoleName() 204 Log.i(LOG_TAG, "Added new role: " + roleName); in addRoleName() 223 String roleName = mRoles.keyAt(i); in setRoleNames() local 225 if (!roleNames.contains(roleName)) { in setRoleNames() [all …]
|
D | RoleService.java | 330 public void onRoleHoldersChanged(@NonNull String roleName, @UserIdInt int userId) { in onRoleHoldersChanged() argument 331 mListenerHandler.post(() -> notifyRoleHoldersChanged(roleName, userId)); in onRoleHoldersChanged() 335 private void notifyRoleHoldersChanged(@NonNull String roleName, @UserIdInt int userId) { in notifyRoleHoldersChanged() argument 338 notifyRoleHoldersChangedForListeners(listeners, roleName, userId); in notifyRoleHoldersChanged() 344 notifyRoleHoldersChangedForListeners(allUsersListeners, roleName, userId); in notifyRoleHoldersChanged() 351 @NonNull String roleName, @UserIdInt int userId) { in notifyRoleHoldersChangedForListeners() argument 357 listener.onRoleHoldersChanged(roleName, userId); in notifyRoleHoldersChangedForListeners() 370 public boolean isRoleAvailable(@NonNull String roleName) { in isRoleAvailable() argument 371 Preconditions.checkStringNotEmpty(roleName, "roleName cannot be null or empty"); in isRoleAvailable() 374 return getOrCreateUserState(userId).isRoleAvailable(roleName); in isRoleAvailable() [all …]
|
D | RoleShellCommand.java | 111 String roleName = getNextArgRequired(); in runAddRoleHolder() local 116 mRoleManager.addRoleHolderAsUser(roleName, packageName, flags, userId, in runAddRoleHolder() 123 String roleName = getNextArgRequired(); in runRemoveRoleHolder() local 128 mRoleManager.removeRoleHolderAsUser(roleName, packageName, flags, userId, in runRemoveRoleHolder() 135 String roleName = getNextArgRequired(); in runClearRoleHolders() local 139 mRoleManager.clearRoleHoldersAsUser(roleName, flags, userId, future.createCallback()); in runClearRoleHolders()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/ |
D | ManageRoleHolderStateLiveData.java | 66 public void setRoleHolderAsUser(@NonNull String roleName, @NonNull String packageName, in setRoleHolderAsUser() argument 69 Log.e(LOG_TAG, "Already (tried) managing role holders, requested role: " + roleName in setRoleHolderAsUser() 75 + roleName + ", package: " + packageName); in setRoleHolderAsUser() 89 + " as role holder, role: " + roleName + ", package: " + packageName); in setRoleHolderAsUser() 95 + " package as role holder, role: " + roleName + ", package: " in setRoleHolderAsUser() 102 roleManager.addRoleHolderAsUser(roleName, packageName, flags, user, executor, callback); in setRoleHolderAsUser() 104 roleManager.removeRoleHolderAsUser(roleName, packageName, flags, user, executor, in setRoleHolderAsUser() 118 public void clearRoleHoldersAsUser(@NonNull String roleName, int flags, in clearRoleHoldersAsUser() argument 121 Log.e(LOG_TAG, "Already (tried) managing role holders, requested role: " + roleName); in clearRoleHoldersAsUser() 125 Log.i(LOG_TAG, "Clearing role holders, role: " + roleName); in clearRoleHoldersAsUser() [all …]
|
D | DefaultAppActivity.java | 54 public static Intent createIntent(@NonNull String roleName, @NonNull UserHandle user, in createIntent() argument 57 .putExtra(Intent.EXTRA_ROLE_NAME, roleName) in createIntent() 71 String roleName = intent.getStringExtra(Intent.EXTRA_ROLE_NAME); in onCreate() local 78 Role role = Roles.get(this).get(roleName); in onCreate() 80 Log.e(LOG_TAG, "Unknown role: " + roleName); in onCreate() 85 Log.e(LOG_TAG, "Role is unavailable: " + roleName); in onCreate() 90 Log.e(LOG_TAG, "Role is invisible: " + roleName); in onCreate() 98 fragment = AutoDefaultAppFragment.newInstance(roleName, user); in onCreate() 100 fragment = HandheldDefaultAppFragment.newInstance(roleName, user); in onCreate()
|
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/ |
D | ButtonRoleHolderController.java | 79 String roleName = button.getRoleName(); in addAllButtonsWithRoleName() local 80 if (roleName != null && button.isDefaultAppIconForRoleEnabled()) { in addAllButtonsWithRoleName() 81 addButtonWithRoleName(button, roleName); in addAllButtonsWithRoleName() 91 private void addButtonWithRoleName(CarSystemBarButton button, String roleName) { in addButtonWithRoleName() argument 92 mButtonMap.put(roleName, button); in addButtonWithRoleName() 93 updateIcon(roleName); in addButtonWithRoleName() 110 void onRoleChanged(String roleName, UserHandle user) { in onRoleChanged() argument 111 if (RoleManager.ROLE_ASSISTANT.equals(roleName) in onRoleChanged() 113 updateIcon(roleName); in onRoleChanged() 117 private void updateIcon(String roleName) { in updateIcon() argument [all …]
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | RoleListenerMultiplexer.kt | 41 override fun onRoleHoldersChanged(roleName: String, user: UserHandle) { in <lambda>() 44 callbacksCopy = callbacks[user]?.get(roleName)?.toList() in <lambda>() 51 fun addCallback(roleName: String, user: UserHandle, callback: RoleHoldersChangeCallback) { in <lambda>() 57 userCallbacks.getOrPut(roleName, { mutableListOf() }).add(callback) in <lambda>() 65 fun removeCallback(roleName: String, user: UserHandle, callback: RoleHoldersChangeCallback) { in <lambda>() 69 if (!userCallbacks.contains(roleName)) { in <lambda>() 73 if (!userCallbacks[roleName]!!.remove(callback)) { in <lambda>() 77 if (userCallbacks[roleName]!!.isEmpty()) { in <lambda>() 78 userCallbacks.remove(roleName) in <lambda>()
|
D | RoleHoldersLiveData.kt | 34 private val roleName: String, constant in com.android.permissioncontroller.permission.data.RoleHoldersLiveData 42 RoleListenerMultiplexer.addCallback(roleName, user, this) in onActive() 47 RoleListenerMultiplexer.removeCallback(roleName, user, this) in onInactive() 51 postValue(roleManager.getRoleHoldersAsUser(roleName, user)) in loadDataAndPostValue()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/specialappaccess/ |
D | SpecialAppAccessActivity.java | 51 public static Intent createIntent(@NonNull String roleName, @NonNull Context context) { in createIntent() argument 53 .putExtra(Intent.EXTRA_ROLE_NAME, roleName); in createIntent() 65 String roleName = getIntent().getStringExtra(Intent.EXTRA_ROLE_NAME); in onCreate() local 67 Role role = Roles.get(this).get(roleName); in onCreate() 69 Log.e(LOG_TAG, "Unknown role: " + roleName); in onCreate() 74 Log.e(LOG_TAG, "Role is unavailable: " + roleName); in onCreate() 79 Log.e(LOG_TAG, "Role is invisible: " + roleName); in onCreate() 87 fragment = AutoSpecialAppAccessFragment.newInstance(roleName); in onCreate() 89 fragment = HandheldSpecialAppAccessFragment.newInstance(roleName); in onCreate()
|
D | MergeRoleListLiveData.java | 63 String roleName = roleItem.getRole().getName(); in onRoleListChanged() local 64 RoleItem mergedRoleItem = mergedRoleItemMap.get(roleName); in onRoleListChanged() 68 mergedRoleItemMap.put(roleName, mergedRoleItem); in onRoleListChanged()
|
D | SpecialAppAccessListChildFragment.java | 125 String roleName = preference.getKey(); in onPreferenceClick() local 127 Role role = Roles.get(context).get(roleName); in onPreferenceClick() 131 intent = SpecialAppAccessActivity.createIntent(roleName, context); in onPreferenceClick()
|
/packages/modules/Permission/service/java/com/android/role/persistence/ |
D | RolesPersistenceImpl.java | 118 String roleName = parser.getAttributeValue(null, ATTRIBUTE_NAME); in parseRoles() local 120 roles.put(roleName, roleHolders); in parseRoles() 186 String roleName = entry.getKey(); in serializeRoles() local 190 serializer.attribute(null, ATTRIBUTE_NAME, roleName); in serializeRoles()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/specialappaccess/handheld/ |
D | HandheldSpecialAppAccessFragment.java | 47 public static HandheldSpecialAppAccessFragment newInstance(@NonNull String roleName) { in newInstance() argument 50 arguments.putString(Intent.EXTRA_ROLE_NAME, roleName); in newInstance()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/handheld/ |
D | HandheldDefaultAppFragment.java | 50 public static HandheldDefaultAppFragment newInstance(@NonNull String roleName, in newInstance() argument 54 arguments.putString(Intent.EXTRA_ROLE_NAME, roleName); in newInstance()
|
/packages/services/Telephony/src/com/android/services/telephony/rcs/ |
D | SipTransportController.java | 102 List<String> getRoleHolders(String roleName); in getRoleHolders() argument 158 public List<String> getRoleHolders(String roleName) { in getRoleHolders() argument 159 return mRoleManager.getRoleHolders(roleName); in getRoleHolders() 791 public void onRoleHoldersChanged(@NonNull String roleName, @NonNull UserHandle user) { in onRoleHoldersChanged() argument 792 logi("onRoleHoldersChanged, roleName= " + roleName + ", user= " + user); in onRoleHoldersChanged() 798 if (!RoleManager.ROLE_SMS.equals(roleName)) { in onRoleHoldersChanged()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | DefaultAppsPreferenceController.java | 71 private CharSequence getDefaultAppLabel(String roleName) { in getDefaultAppLabel() argument 72 final List<String> packageNames = mRoleManager.getRoleHolders(roleName); in getDefaultAppLabel()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/auto/ |
D | AutoSpecialAppAccessFragment.java | 44 public static AutoSpecialAppAccessFragment newInstance(@NonNull String roleName) { in newInstance() argument 47 arguments.putString(Intent.EXTRA_ROLE_NAME, roleName); in newInstance()
|