Searched refs:permissions (Results 1 - 25 of 207) sorted by relevance

123456789

/packages/apps/Contacts/src/com/android/contacts/activities/
H A DRequestPermissionsActivity.java13 * See the License for the specific language governing permissions and
33 * Activity that requests permissions needed for activities exported from Contacts.
47 * Method to check if the required permissions are given.
61 final List<String> permissions = new ArrayList<>();
63 permissions.add(permission.GET_ACCOUNTS);
64 permissions.add(permission.READ_CONTACTS);
65 permissions.add(permission.WRITE_CONTACTS);
72 permissions.add(permission.CALL_PHONE);
73 permissions.add(permission.READ_CALL_LOG);
74 permissions
82 onRequestPermissionsResult( int requestCode, String permissions[], int[] grantResults) argument
[all...]
H A DRequestDesiredPermissionsActivity.java13 * See the License for the specific language governing permissions and
29 * Requests permissions that are not absolutely required by the calling Activity;
30 * if permissions are denied, the calling Activity is still restarted.
32 * Activities that have a set of permissions that must be granted in order for the Activity to
48 * to prompt user for these permissions. After that calling activity is restarted
65 final List<String> permissions = new ArrayList<>();
67 permissions.add(permission.READ_CALENDAR);
71 permissions.add(permission.READ_SMS);
73 sDesiredPermissions = permissions.toArray(new String[0]);
80 int requestCode, String permissions[], in
79 onRequestPermissionsResult( int requestCode, String permissions[], int[] grantResults) argument
[all...]
H A DRequestPermissionsActivityBase.java13 * See the License for the specific language governing permissions and
44 /** Whether the permissions activity was already started. */
53 * @return list of permissions that are needed in order for {@link #PREVIOUS_ACTIVITY_INTENT}
60 /** If true then start the target activity "for result" after permissions are granted. */
71 // permissions) so this is important to track.
78 * If any permissions the Contacts app needs are missing, open an Activity
79 * to prompt the user for these permissions. Moreover, finish the current activity.
110 protected boolean isAllGranted(String permissions[], int[] grantResult) { argument
111 for (int i = 0; i < permissions.length; i++) {
113 && isPermissionRequired(permissions[
147 hasPermissions(Context context, String[] permissions) argument
[all...]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
H A DAppPermissionsPreferenceControllerTest.java13 * See the License for the specific language governing permissions and
115 // create permissions
134 final List<PermissionInfo> permissions = new ArrayList<>();
135 permissions.add(mPermLocation);
136 permissions.add(mPermMic);
137 permissions.add(mPermCamera);
138 permissions.add(mPermSms);
139 permissions.add(mPermContacts);
140 permissions.add(mPermPhone);
142 .thenReturn(permissions);
[all...]
/packages/apps/Bluetooth/src/com/android/bluetooth/gatt/
H A DGattDbElement.java13 * See the License for the specific language governing permissions and
53 public int permissions; field in class:GattDbElement
69 public static GattDbElement createCharacteristic(UUID uuid, int properties, int permissions) { argument
74 el.permissions = permissions;
78 public static GattDbElement createDescriptor(UUID uuid, int permissions) { argument
82 el.permissions = permissions;
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/permissions/
H A DPermissionsUtil.java13 * See the License for the specific language governing permissions and
17 package com.android.inputmethod.latin.permissions;
31 * Utility class for permissions.
36 * Returns the list of permissions not granted from the given list of permissions.
38 * @param permissions list of permissions to check.
39 * @return the list of permissions that do not have permission to use.
42 String... permissions) {
44 for (String permission : permissions) {
41 getDeniedPermissions(Context context, String... permissions) argument
59 requestPermissions(Activity activity, int requestCode, String[] permissions) argument
79 checkAllPermissionsGranted(Context context, String... permissions) argument
[all...]
H A DPermissionsActivity.java13 * See the License for the specific language governing permissions and
17 package com.android.inputmethod.latin.permissions;
28 * An activity to help request permissions. It's used when no other activity is available, e.g. in
29 * InputMethodService. This activity assumes that all permissions are not granted yet.
35 * Key to retrieve requested permissions from the intent.
49 * Starts a PermissionsActivity and checks/requests supplied permissions.
83 // Assuming that all supplied permissions are not granted yet, so that we don't need to
91 int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
94 requestCode, permissions, grantResults);
90 onRequestPermissionsResult( int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) argument
H A DPermissionsManager.java13 * See the License for the specific language governing permissions and
17 package com.android.inputmethod.latin.permissions;
70 // otherwise request the permissions.
84 int requestCode, String[] permissions, int[] grantResults) {
83 onRequestPermissionsResult( int requestCode, String[] permissions, int[] grantResults) argument
/packages/apps/Settings/src/com/android/settings/applications/
H A DAppWithAdminGrantedPermissionsCounter.java12 * permissions and limitations under the License.
29 * Counts installed apps across all users that have been granted one or more specific permissions by
38 public AppWithAdminGrantedPermissionsCounter(Context context, String[] permissions, argument
42 mPermissions = permissions;
53 public static boolean includeInCount(String[] permissions, argument
57 // The app uses run-time permissions. Check whether one or more of the permissions were
59 for (final String permission : permissions) {
68 // The app uses install-time permissions. Check whether the app requested one or more of the
69 // permissions an
[all...]
H A DAppPermissionsPreferenceController.java12 * permissions and limitations under the License.
60 The 3 permissions are the first three from the list which any app has granted:
65 final Set<String> permissions = getAllPermissionsInGroups();
66 Set<String> grantedPermissionGroups = getGrantedPermissionGroups(permissions);
81 private Set<String> getGrantedPermissionGroups(Set<String> permissions) { argument
86 if (installedPackage.permissions == null) {
89 for (PermissionInfo permissionInfo : installedPackage.permissions) {
90 if (permissions.contains(permissionInfo.name)
112 Log.e(TAG, "Error getting permissions label.", e);
121 final List<PermissionInfo> permissions
[all...]
H A DApplicationFeatureProvider.java13 * See the License for the specific language governing permissions and
46 * managed profiles that have been granted one or more of the given permissions by the admin.
48 * @param permissions Only consider apps that have been granted one or more of these
49 * permissions by the admin, either at run-time or install-time
53 void calculateNumberOfAppsWithAdminGrantedPermissions(String[] permissions, boolean async, argument
58 * managed profiles that have been granted one or more of the given permissions by the admin.
60 * @param permissions Only consider apps that have been granted one or more of these
61 * permissions by the admin, either at run-time or install-time
64 void listAppsWithAdminGrantedPermissions(String[] permissions, ListOfAppsCallback callback); argument
H A DAppWithAdminGrantedPermissionsLister.java13 * See the License for the specific language governing permissions and
27 * Lists installed apps across all users that have been granted one or more specific permissions by
35 public AppWithAdminGrantedPermissionsLister(String[] permissions, argument
39 mPermissions = permissions;
H A DApplicationFeatureProviderImpl.java13 * See the License for the specific language governing permissions and
77 public void calculateNumberOfAppsWithAdminGrantedPermissions(String[] permissions, argument
81 permissions, mPm, mPms, mDpm, callback);
90 public void listAppsWithAdminGrantedPermissions(String[] permissions, argument
93 new CurrentUserAppWithAdminGrantedPermissionsLister(permissions, mPm, mPms, mDpm,
166 String[] permissions, PackageManagerWrapper packageManager,
169 super(context, permissions, packageManager, packageManagerService, devicePolicyManager);
198 CurrentUserAppWithAdminGrantedPermissionsLister(String[] permissions, argument
202 super(permissions, packageManager, packageManagerService, devicePolicyManager,
165 CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter(Context context, String[] permissions, PackageManagerWrapper packageManager, IPackageManager packageManagerService, DevicePolicyManager devicePolicyManager, NumberOfAppsCallback callback) argument
/packages/apps/TV/partner_support/src/com/google/android/tv/partner/support/
H A DBaseCustomization.java13 * See the License for the specific language governing permissions and
49 protected BaseCustomization(Context context, String[] permissions) { argument
50 packageName = getFirstPackageNameWithPermissions(context, permissions);
58 Context context, String[] permissions) {
61 context.getPackageManager().getPackagesHoldingPermissions(permissions, 0);
63 Log.d(TAG, "These packages have " + Arrays.toString(permissions) + ": " + packageInfos);
57 getFirstPackageNameWithPermissions( Context context, String[] permissions) argument
/packages/services/Car/car_product/build/
H A Dcar_base.mk13 # See the License for the specific language governing permissions and
94 frameworks/native/data/etc/android.hardware.type.automotive.xml:system/etc/permissions/android.hardware.type.automotive.xml
98 packages/services/Car/car_product/build/default-car-permissions.xml:system/etc/default-permissions/default-car-permissions.xml
/packages/apps/Car/LocalMediaPlayer/src/com/android/car/media/localmediaplayer/
H A DPermissionsActivity.java13 * See the License for the specific language governing permissions and
37 public void onRequestPermissionsResult(int request, String[] permissions, int[] results) { argument
38 // The media browser displays an error anyway if it doesn't have the required permissions
40 // for the purpose of trampolining the permissions request anyway.
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
H A DSpellCheckerSettingsActivity.java13 * See the License for the specific language governing permissions and
19 import com.android.inputmethod.latin.permissions.PermissionsManager;
57 int requestCode, String[] permissions, int[] grantResults) {
59 requestCode, permissions, grantResults);
56 onRequestPermissionsResult( int requestCode, String[] permissions, int[] grantResults) argument
H A DSpellCheckerSettingsFragment.java13 * See the License for the specific language governing permissions and
27 import com.android.inputmethod.latin.permissions.PermissionsManager;
28 import com.android.inputmethod.latin.permissions.PermissionsUtil;
33 import static com.android.inputmethod.latin.permissions.PermissionsManager.get;
69 // Check for permissions.
72 return; // all permissions granted, no need to request permissions.
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/service/
H A DRuntimePermissionPresenterServiceImpl.java13 * See the License for the specific language governing permissions and
33 * Service that provides presentation information for runtime permissions.
49 List<RuntimePermissionPresentationInfo> permissions = new ArrayList<>();
59 permissions.add(permission);
63 return permissions;
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/
H A DSettingsActivity.java13 * See the License for the specific language governing permissions and
19 import com.android.inputmethod.latin.permissions.PermissionsManager;
85 public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { argument
86 PermissionsManager.get(this).onRequestPermissionsResult(requestCode, permissions, grantResults);
/packages/apps/Settings/src/com/android/settings/enterprise/
H A DAdminGrantedPermissionsPreferenceControllerBase.java13 * permissions and limitations under the License.
36 String[] permissions) {
38 mPermissions = permissions;
66 // apps that the admin has granted a given permissions takes a bit of time, we always
74 // We block and return synchronously whether the admin has granted the given permissions to
35 AdminGrantedPermissionsPreferenceControllerBase(Context context, boolean async, String[] permissions) argument
/packages/experimental/PermissionApp/src/foo/bar/permission/
H A DPermissionActivity.java13 * See the License for the specific language governing permissions and
44 * Simple sample of how to use the runtime permissions APIs.
184 public void onRequestPermissionsResult(int requestCode, String permissions[], argument
200 for (int i = 0; i < permissions.length; i++) {
202 switch (permissions[i]) {
266 List<String> permissions = new ArrayList<>();
269 permissions.add(Manifest.permission.READ_CALENDAR);
273 permissions.add(Manifest.permission.READ_CONTACTS);
275 if (!permissions.isEmpty()) {
276 requestPermissions(permissions
[all...]
/packages/apps/Dialer/java/com/android/dialer/callcomposer/
H A DGalleryComposerFragment.java13 * See the License for the specific language governing permissions and
67 private String[] permissions = new String[] {permission.READ_EXTERNAL_STORAGE}; field in class:GalleryComposerFragment
170 if (PermissionsUtil.isFirstRequest(getContext(), permissions[0])
171 || shouldShowRequestPermissionRationale(permissions[0])) {
174 requestPermissions(permissions, STORAGE_PERMISSION);
254 int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
255 if (permissions.length > 0 && permissions[0].equals(this.permissions[0])) {
256 PermissionsUtil.permissionRequested(getContext(), permissions[
253 onRequestPermissionsResult( int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) argument
[all...]
/packages/apps/Dialer/java/com/android/dialer/postcall/
H A DPostCallActivity.java13 * See the License for the specific language governing permissions and
124 int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
125 if (permissions.length > 0 && permissions[0].equals(permission.SEND_SMS)) {
126 PermissionsUtil.permissionRequested(this, permissions[0]);
123 onRequestPermissionsResult( int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) argument
/packages/apps/Launcher3/src/com/android/launcher3/
H A DLauncherCallbacks.java13 * See the License for the specific language governing permissions and
47 void onRequestPermissionsResult(int requestCode, String[] permissions, argument

Completed in 452 milliseconds

123456789