Home
last modified time | relevance | path

Searched refs:role (Results 1 – 25 of 408) sorted by relevance

12345678910>>...17

/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/service/
DRoleControllerServiceImpl.java17 package com.android.permissioncontroller.role.service;
19 import android.app.role.RoleControllerService;
20 import android.app.role.RoleManager;
32 import com.android.permissioncontroller.role.utils.PackageUtils;
33 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
34 import com.android.role.controller.model.Role;
35 import com.android.role.controller.model.Roles;
73 Role role = roleMap.valueAt(i); in onGrantDefaultRoles() local
75 if (!role.isAvailable(this)) { in onGrantDefaultRoles()
78 roles.add(role); in onGrantDefaultRoles()
[all …]
DRoleSearchIndexablesProvider.java17 package com.android.permissioncontroller.role.service;
30 import com.android.permissioncontroller.role.model.RoleParserInitializer;
31 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
32 import com.android.role.controller.model.Role;
33 import com.android.role.controller.model.Roles;
60 Role role = roles.valueAt(i); in queryRawData() local
64 if (!role.isAvailable(context) || !RoleUiBehaviorUtils.isVisible(role, in queryRawData()
72 String label = context.getString(role.getLabelResource()); in queryRawData()
73 int searchKeywordsResource = role.getSearchKeywordsResource(); in queryRawData()
74 boolean isExclusive = role.isExclusive(); in queryRawData()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/utils/
DRoleUiBehaviorUtils.java17 package com.android.permissioncontroller.role.utils;
31 import com.android.permissioncontroller.role.ui.RoleApplicationPreference;
32 import com.android.permissioncontroller.role.ui.RolePreference;
33 import com.android.permissioncontroller.role.ui.UserRestrictionAwarePreference;
34 import com.android.permissioncontroller.role.ui.behavior.RoleUiBehavior;
35 import com.android.role.controller.model.Role;
48 private static RoleUiBehavior getUiBehavior(@NonNull Role role) { in getUiBehavior() argument
49 String uiBehaviorName = role.getUiBehaviorName(); in getUiBehavior()
68 public static boolean isVisibleAsUser(@NonNull Role role, @NonNull UserHandle user, in isVisibleAsUser() argument
70 RoleUiBehavior uiBehavior = getUiBehavior(role); in isVisibleAsUser()
[all …]
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/behavior/
DSmsRoleBehavior.java17 package com.android.role.controller.behavior;
31 import com.android.role.controller.model.Permissions;
32 import com.android.role.controller.model.Role;
33 import com.android.role.controller.model.RoleBehavior;
34 import com.android.role.controller.util.CollectionUtils;
35 import com.android.role.controller.util.PackageUtils;
36 import com.android.role.controller.util.UserUtils;
59 public boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() argument
93 && role.getDefaultHolders(context).isEmpty()) { in isAvailableAsUser()
101 public String getFallbackHolder(@NonNull Role role, @NonNull Context context) { in getFallbackHolder() argument
[all …]
DBrowserRoleBehavior.java17 package com.android.role.controller.behavior;
32 import com.android.role.controller.model.Permissions;
33 import com.android.role.controller.model.Role;
34 import com.android.role.controller.model.RoleBehavior;
35 import com.android.role.controller.util.CollectionUtils;
36 import com.android.role.controller.util.PackageUtils;
37 import com.android.role.controller.util.UserUtils;
64 public String getFallbackHolder(@NonNull Role role, @NonNull Context context) { in getFallbackHolder() argument
79 List<String> defaultPackageNames = role.getDefaultHolders(context); in getFallbackHolder()
91 public List<String> getQualifyingPackagesAsUser(@NonNull Role role, @NonNull UserHandle user, in getQualifyingPackagesAsUser() argument
[all …]
DAssistantRoleBehavior.java17 package com.android.role.controller.behavior;
20 import android.app.role.RoleManager;
39 import com.android.role.controller.model.Role;
40 import com.android.role.controller.model.RoleBehavior;
41 import com.android.role.controller.util.UserUtils;
62 public void onRoleAdded(@NonNull Role role, @NonNull Context context) { in onRoleAdded() argument
66 List<String> packageNames = roleManager.getRoleHolders(role.getName()); in onRoleAdded()
70 role.onNoneHolderSelectedAsUser(Process.myUserHandle(), context); in onRoleAdded()
76 public boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() argument
83 public List<String> getQualifyingPackagesAsUser(@NonNull Role role, @NonNull UserHandle user, in getQualifyingPackagesAsUser() argument
[all …]
DHomeRoleBehavior.java17 package com.android.role.controller.behavior;
31 import com.android.role.controller.model.Permissions;
32 import com.android.role.controller.model.Role;
33 import com.android.role.controller.model.RoleBehavior;
34 import com.android.role.controller.util.UserUtils;
55 public boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() argument
65 public String getFallbackHolder(@NonNull Role role, @NonNull Context context) { in getFallbackHolder() argument
67 Intent intent = role.getRequiredComponents().get(0).getIntentFilterData().createIntent(); in getFallbackHolder()
111 public void onHolderSelectedAsUser(@NonNull Role role, @NonNull String packageName, in onHolderSelectedAsUser() argument
122 public void grant(@NonNull Role role, @NonNull String packageName, @NonNull Context context) { in grant() argument
[all …]
DDialerRoleBehavior.java17 package com.android.role.controller.behavior;
26 import com.android.role.controller.model.Permissions;
27 import com.android.role.controller.model.Role;
28 import com.android.role.controller.model.RoleBehavior;
29 import com.android.role.controller.util.PackageUtils;
51 public boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() argument
58 public void grant(@NonNull Role role, @NonNull String packageName, @NonNull Context context) { in grant() argument
68 public void revoke(@NonNull Role role, @NonNull String packageName, in revoke() argument
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/model/
DRoleBehavior.java17 package com.android.role.controller.model;
36 default void onRoleAdded(@NonNull Role role, @NonNull Context context) {} in onRoleAdded() argument
41 default boolean isAvailableAsUser(@NonNull Role role, @NonNull UserHandle user, in isAvailableAsUser() argument
50 default List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { in getDefaultHolders() argument
58 default String getFallbackHolder(@NonNull Role role, @NonNull Context context) { in getFallbackHolder() argument
66 default Boolean shouldAllowBypassingQualification(@NonNull Role role, in shouldAllowBypassingQualification() argument
75 default Boolean isPackageQualified(@NonNull Role role, @NonNull String packageName, in isPackageQualified() argument
84 default List<String> getQualifyingPackagesAsUser(@NonNull Role role, @NonNull UserHandle user, in getQualifyingPackagesAsUser() argument
92 default void grant(@NonNull Role role, @NonNull String packageName, @NonNull Context context) {} in grant() argument
97 default void revoke(@NonNull Role role, @NonNull String packageName, in revoke() argument
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/
DRoleListLiveData.java17 package com.android.permissioncontroller.role.ui;
19 import android.app.role.OnRoleHoldersChangedListener;
20 import android.app.role.RoleManager;
32 import com.android.permissioncontroller.role.utils.PackageUtils;
33 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
34 import com.android.role.controller.model.Role;
35 import com.android.role.controller.model.Roles;
90 Role role = roles.valueAt(rolesIndex); in loadValueInBackground() local
92 if (role.isExclusive() != mExclusive) { in loadValueInBackground()
96 if (!role.isAvailableAsUser(mUser, mContext)) { in loadValueInBackground()
[all …]
DDefaultAppActivity.java17 package com.android.permissioncontroller.role.ui;
32 import com.android.permissioncontroller.role.ui.auto.AutoDefaultAppFragment;
33 import com.android.permissioncontroller.role.ui.handheld.HandheldDefaultAppFragment;
34 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
35 import com.android.role.controller.model.Role;
36 import com.android.role.controller.model.Roles;
79 Role role = Roles.get(this).get(roleName); in onCreate() local
80 if (role == null) { in onCreate()
85 if (!role.isAvailableAsUser(user, this)) { in onCreate()
91 if (!RoleUiBehaviorUtils.isVisibleAsUser(role, user, this)) { in onCreate()
DRequestRoleActivity.java17 package com.android.permissioncontroller.role.ui;
19 import android.app.role.RoleManager;
38 import com.android.permissioncontroller.role.model.UserDeniedManager;
39 import com.android.permissioncontroller.role.utils.PackageUtils;
40 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
41 import com.android.role.controller.model.Role;
42 import com.android.role.controller.model.Roles;
97 Role role = Roles.get(this).get(mRoleName); in onCreate() local
98 if (role == null) { in onCreate()
106 if (!role.isAvailable(this)) { in onCreate()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/specialappaccess/
DSpecialAppAccessActivity.java17 package com.android.permissioncontroller.role.ui.specialappaccess;
30 import com.android.permissioncontroller.role.ui.SettingsActivity;
31 import com.android.permissioncontroller.role.ui.auto.AutoSpecialAppAccessFragment;
32 import com.android.permissioncontroller.role.ui.specialappaccess.handheld.HandheldSpecialAppAccessF…
33 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
34 import com.android.role.controller.model.Role;
35 import com.android.role.controller.model.Roles;
68 Role role = Roles.get(this).get(roleName); in onCreate() local
69 if (role == null) { in onCreate()
74 if (!role.isAvailable(this)) { in onCreate()
[all …]
DSpecialAppAccessListChildFragment.java17 package com.android.permissioncontroller.role.ui.specialappaccess;
35 import com.android.permissioncontroller.role.ui.RoleItem;
36 import com.android.permissioncontroller.role.ui.RolePreference;
37 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
38 import com.android.role.controller.model.Role;
39 import com.android.role.controller.model.Roles;
104 Role role = roleItem.getRole(); in onRoleListChanged() local
105 RolePreference rolePreference = (RolePreference) oldPreferences.get(role.getName()); in onRoleListChanged()
110 preference.setKey(role.getName()); in onRoleListChanged()
112 preference.setTitle(role.getShortLabelResource()); in onRoleListChanged()
[all …]
DSpecialAppAccessViewModel.java17 package com.android.permissioncontroller.role.ui.specialappaccess;
35 import com.android.permissioncontroller.role.ui.ManageRoleHolderStateLiveData;
36 import com.android.permissioncontroller.role.ui.RoleLiveData;
37 import com.android.permissioncontroller.role.ui.RoleSortFunction;
38 import com.android.permissioncontroller.role.utils.UserUtils;
39 import com.android.role.controller.model.Role;
60 public SpecialAppAccessViewModel(@NonNull Role role, @NonNull Application application) { in SpecialAppAccessViewModel() argument
63 mRole = role; in SpecialAppAccessViewModel()
66 RoleLiveData roleLiveData = new RoleLiveData(role, user, application); in SpecialAppAccessViewModel()
72 RoleLiveData workRoleLiveData = new RoleLiveData(role, workProfile, application); in SpecialAppAccessViewModel()
[all …]
/packages/modules/Permission/framework-s/api/
Dcurrent.txt2 package android.app.role {
8 field public static final String ROLE_ASSISTANT = "android.app.role.ASSISTANT";
9 field public static final String ROLE_BROWSER = "android.app.role.BROWSER";
10 field public static final String ROLE_CALL_REDIRECTION = "android.app.role.CALL_REDIRECTION";
11 field public static final String ROLE_CALL_SCREENING = "android.app.role.CALL_SCREENING";
12 field public static final String ROLE_DIALER = "android.app.role.DIALER";
13 field public static final String ROLE_EMERGENCY = "android.app.role.EMERGENCY";
14 field public static final String ROLE_HOME = "android.app.role.HOME";
15 field public static final String ROLE_NOTES = "android.app.role.NOTES";
16 field public static final String ROLE_SMS = "android.app.role.SMS";
/packages/modules/Bluetooth/system/stack/pan/
Dpan_api.cc134 tPAN_RESULT PAN_SetRole(uint8_t role, std::string p_user_name, in PAN_SetRole() argument
137 if (role == PAN_ROLE_INACTIVE) { in PAN_SetRole()
139 pan_cb.role = role; in PAN_SetRole()
148 if ((!(role & (PAN_ROLE_CLIENT | PAN_ROLE_NAP_SERVER))) && in PAN_SetRole()
149 role != PAN_ROLE_INACTIVE) { in PAN_SetRole()
150 PAN_TRACE_ERROR("PAN role %d is invalid", role); in PAN_SetRole()
155 if (pan_cb.role == role) { in PAN_SetRole()
156 PAN_TRACE_EVENT("PAN role already was set to: %d", role); in PAN_SetRole()
161 PAN_TRACE_API("PAN_SetRole() called with role 0x%x", role); in PAN_SetRole()
162 if (role & PAN_ROLE_NAP_SERVER) { in PAN_SetRole()
[all …]
/packages/modules/Bluetooth/system/stack/acl/
Dble_acl.cc38 const tBLE_BD_ADDR& address_with_type, uint16_t handle, tHCI_ROLE role, in acl_ble_common_connection() argument
41 if (role == HCI_ROLE_CENTRAL) { in acl_ble_common_connection()
54 role, address_with_type.type, is_in_security_db, in acl_ble_common_connection()
58 btm_ble_increment_link_topology_mask(role); in acl_ble_common_connection()
61 if (!l2cble_conn_comp(handle, role, address_with_type.bda, in acl_ble_common_connection()
70 btm_acl_created(address_with_type.bda, handle, role, BT_TRANSPORT_LE); in acl_ble_common_connection()
76 const tBLE_BD_ADDR& address_with_type, uint16_t handle, tHCI_ROLE role, in acl_ble_enhanced_connection_complete() argument
81 if (!acl_ble_common_connection(address_with_type, handle, role, match, in acl_ble_enhanced_connection_complete()
91 btm_ble_update_mode_operation(role, &address_with_type.bda, HCI_SUCCESS); in acl_ble_enhanced_connection_complete()
93 if (role == HCI_ROLE_PERIPHERAL) in acl_ble_enhanced_connection_complete()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/behavior/
DHomeRoleUiBehavior.java17 package com.android.permissioncontroller.role.ui.behavior;
20 import android.app.role.RoleManager;
37 import com.android.permissioncontroller.role.model.VisibilityMixin;
38 import com.android.permissioncontroller.role.ui.TwoTargetPreference;
39 import com.android.permissioncontroller.role.utils.UserUtils;
40 import com.android.role.controller.behavior.HomeRoleBehavior;
41 import com.android.role.controller.model.Role;
51 public boolean isVisibleAsUser(@NonNull Role role, @NonNull UserHandle user, in isVisibleAsUser() argument
57 public void preparePreferenceAsUser(@NonNull Role role, @NonNull TwoTargetPreference preference, in preparePreferenceAsUser() argument
62 role.getName(), user)); in preparePreferenceAsUser()
[all …]
DRoleUiBehavior.java17 package com.android.permissioncontroller.role.ui.behavior;
28 import com.android.permissioncontroller.role.ui.TwoTargetPreference;
29 import com.android.role.controller.model.Role;
45 default boolean isVisibleAsUser(@NonNull Role role, @NonNull UserHandle user, in isVisibleAsUser() argument
60 default Intent getManageIntentAsUser(@NonNull Role role, @NonNull UserHandle user, in getManageIntentAsUser() argument
73 default void preparePreferenceAsUser(@NonNull Role role, in preparePreferenceAsUser() argument
87 default boolean isApplicationVisibleAsUser(@NonNull Role role, in isApplicationVisibleAsUser() argument
101 default void prepareApplicationPreferenceAsUser(@NonNull Role role, in prepareApplicationPreferenceAsUser() argument
115 default CharSequence getConfirmationMessage(@NonNull Role role, @NonNull String packageName, in getConfirmationMessage() argument
DEmergencyRoleUiBehavior.java17 package com.android.permissioncontroller.role.ui.behavior;
25 import com.android.permissioncontroller.role.model.EncryptionUnawareConfirmationMixin;
26 import com.android.permissioncontroller.role.model.VisibilityMixin;
27 import com.android.role.controller.model.Role;
35 public boolean isVisibleAsUser(@NonNull Role role, @NonNull UserHandle user, in isVisibleAsUser() argument
42 public CharSequence getConfirmationMessage(@NonNull Role role, @NonNull String packageName, in getConfirmationMessage() argument
44 return EncryptionUnawareConfirmationMixin.getConfirmationMessage(role, packageName, in getConfirmationMessage()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/
DPermissionControllerApplication.java33 import com.android.permissioncontroller.role.model.RoleParserInitializer;
34 import com.android.permissioncontroller.role.ui.SpecialAppAccessListActivity;
35 import com.android.permissioncontroller.role.utils.RoleUiBehaviorUtils;
36 import com.android.role.controller.model.Role;
37 import com.android.role.controller.model.Roles;
72 Role role = roles.valueAt(i); in updateSpecialAppAccessListActivityEnabledState() local
74 if (!role.isAvailable(this) || !RoleUiBehaviorUtils.isVisible(role, this)) { in updateSpecialAppAccessListActivityEnabledState()
77 if (!role.isExclusive()) { in updateSpecialAppAccessListActivityEnabledState()
/packages/modules/Bluetooth/system/bta/test/
Dbta_pan_test.cc100 tBTA_PAN_ROLE role = BTA_PAN_ROLE_PANU | BTA_PAN_ROLE_NAP; in TEST_F() local
112 BTA_PanSetRole(role, user_info, nap_info); in TEST_F()
129 tBTA_PAN_ROLE role = BTA_PAN_ROLE_PANU | BTA_PAN_ROLE_NAP; in TEST_F() local
145 uint8_t role, std::string user_name, in TEST_F()
147 stack_pan_role = role; in TEST_F()
154 BTA_PanSetRole(role, user_info, nap_info); in TEST_F()
163 ASSERT_EQ(BTA_PAN_ROLE_PANU | BTA_PAN_ROLE_NAP, e.data.set_role.role); in TEST_F()
176 tBTA_PAN_ROLE role = BTA_PAN_ROLE_PANU | BTA_PAN_ROLE_NAP; in TEST_F() local
195 uint8_t role, std::string user_name, in TEST_F()
197 stack_pan_role = role; in TEST_F()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/aware/
DWifiAwareNetworkSpecifier.java85 public final int role; field in WifiAwareNetworkSpecifier
197 public WifiAwareNetworkSpecifier(int type, int role, int clientId, int sessionId, int peerId, in WifiAwareNetworkSpecifier() argument
201 this.role = role; in WifiAwareNetworkSpecifier()
219 public WifiAwareNetworkSpecifier(int type, int role, int clientId, int sessionId, int peerId, in WifiAwareNetworkSpecifier() argument
222 this.role = role; in WifiAwareNetworkSpecifier()
285 dest.writeInt(role); in writeToParcel()
310 return Objects.hash(type, role, clientId, sessionId, peerId, Arrays.hashCode(peerMac), in hashCode()
328 && role == lhs.role in equals()
345 .append(", role=").append(role) in toString()
602 int role = mDiscoverySession instanceof SubscribeDiscoverySession in build() local
[all …]
/packages/modules/Permission/PermissionController/role-controller/java/com/android/role/controller/util/
DRoleManagerCompat.java17 package com.android.role.controller.util;
19 import android.app.role.RoleManager;
27 import com.android.role.controller.model.Role;
77 public static boolean isRoleFallbackEnabledAsUser(@NonNull Role role, @NonNull UserHandle user, in isRoleFallbackEnabledAsUser() argument
81 .getBoolean(IS_NONE_ROLE_HOLDER_SELECTED_KEY + role.getName(), false); in isRoleFallbackEnabledAsUser()
89 public static void setRoleFallbackEnabledAsUser(@NonNull Role role, in setRoleFallbackEnabledAsUser() argument
94 .remove(IS_NONE_ROLE_HOLDER_SELECTED_KEY + role.getName()) in setRoleFallbackEnabledAsUser()
98 .putBoolean(IS_NONE_ROLE_HOLDER_SELECTED_KEY + role.getName(), true) in setRoleFallbackEnabledAsUser()

12345678910>>...17