/packages/apps/Contacts/src/com/android/contacts/activities/ |
H A D | RequestPermissionsActivity.java | 13 * 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 D | RequestDesiredPermissionsActivity.java | 13 * 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 D | RequestPermissionsActivityBase.java | 13 * 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/Bluetooth/src/com/android/bluetooth/gatt/ |
H A D | GattDbElement.java | 13 * 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 D | PermissionsUtil.java | 13 * 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 D | PermissionsActivity.java | 13 * 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 D | PermissionsManager.java | 13 * 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 D | AppWithAdminGrantedPermissionsCounter.java | 12 * permissions and limitations under the License. 28 * Counts installed apps across all users that have been granted one or more specific permissions by 37 public AppWithAdminGrantedPermissionsCounter(Context context, String[] permissions, argument 41 mPermissions = permissions; 52 public static boolean includeInCount(String[] permissions, argument 56 // The app uses run-time permissions. Check whether one or more of the permissions were 58 for (final String permission : permissions) { 67 // The app uses install-time permissions. Check whether the app requested one or more of the 68 // permissions an [all...] |
H A D | AppWithAdminGrantedPermissionsLister.java | 13 * See the License for the specific language governing permissions and 24 * Lists installed apps across all users that have been granted one or more specific permissions by 32 public AppWithAdminGrantedPermissionsLister(String[] permissions, argument 36 mPermissions = permissions;
|
H A D | ApplicationFeatureProvider.java | 13 * See the License for the specific language governing permissions and 63 * managed profiles that have been granted one or more of the given permissions by the admin. 65 * @param permissions Only consider apps that have been granted one or more of these permissions 70 void calculateNumberOfAppsWithAdminGrantedPermissions(String[] permissions, boolean async, argument 75 * managed profiles that have been granted one or more of the given permissions by the admin. 77 * @param permissions Only consider apps that have been granted one or more of these permissions 81 void listAppsWithAdminGrantedPermissions(String[] permissions, ListOfAppsCallback callback); argument
|
H A D | ApplicationFeatureProviderImpl.java | 13 * See the License for the specific language governing permissions and 86 public void calculateNumberOfAppsWithAdminGrantedPermissions(String[] permissions, argument 90 permissions, mPm, mPms, mDpm, callback); 99 public void listAppsWithAdminGrantedPermissions(String[] permissions, argument 102 new CurrentUserAppWithAdminGrantedPermissionsLister(permissions, mPm, mPms, mDpm, 164 String[] permissions, PackageManagerWrapper packageManager, 167 super(context, permissions, packageManager, packageManagerService, devicePolicyManager); 196 CurrentUserAppWithAdminGrantedPermissionsLister(String[] permissions, argument 200 super(permissions, packageManager, packageManagerService, devicePolicyManager, 163 CurrentUserAndManagedProfileAppWithAdminGrantedPermissionsCounter(Context context, String[] permissions, PackageManagerWrapper packageManager, IPackageManagerWrapper packageManagerService, DevicePolicyManagerWrapper devicePolicyManager, NumberOfAppsCallback callback) argument
|
H A D | IPackageManagerWrapperImpl.java | 13 * See the License for the specific language governing permissions and 63 String[] permissions, int flags, int userId) throws RemoteException { 64 return mPms.getPackagesHoldingPermissions(permissions, flags, userId); 62 getPackagesHoldingPermissions( String[] permissions, int flags, int userId) argument
|
H A D | IPackageManagerWrapper.java | 13 * See the License for the specific language governing permissions and 74 String[] permissions, int flags, int userId) throws RemoteException; 73 getPackagesHoldingPermissions( String[] permissions, int flags, int userId) argument
|
/packages/apps/Car/LocalMediaPlayer/src/com/android/car/media/localmediaplayer/ |
H A D | PermissionsActivity.java | 13 * 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/apps/PackageInstaller/src/com/android/packageinstaller/permission/service/ |
H A D | RuntimePermissionPresenterServiceImpl.java | 13 * See the License for the specific language governing permissions and 34 * Service that provides presentation information for runtime permissions. 50 List<RuntimePermissionPresentationInfo> permissions = new ArrayList<>(); 60 permissions.add(permission); 64 return permissions;
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/ |
H A D | SpellCheckerSettingsActivity.java | 13 * 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 D | SpellCheckerSettingsFragment.java | 13 * 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/Car/Stream/src/com/android/car/stream/ |
H A D | PermissionsActivity.java | 13 * See the License for the specific language governing permissions and 34 * A trampoline activity that checks if all permissions necessary are granted. 85 public void onRequestPermissionsResult(int requestCode, String[] permissions, argument 87 super.onRequestPermissionsResult(requestCode, permissions, grantResults); 92 for (int i = 0; i < permissions.length; i++) { 93 String permission = permissions[i]; 135 private boolean arePermissionGranted(String[] permissions) { argument 136 for (String permission : permissions) {
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/settings/ |
H A D | SettingsActivity.java | 13 * 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 D | AdminGrantedPermissionsPreferenceControllerBase.java | 13 * permissions and limitations under the License. 37 boolean async, String[] permissions, String permissionGroup) { 39 mPermissions = permissions; 69 // apps that the admin has granted a given permissions takes a bit of time, we always 77 // We block and return synchronously whether the admin has granted the given permissions to 36 AdminGrantedPermissionsPreferenceControllerBase(Context context, Lifecycle lifecycle, boolean async, String[] permissions, String permissionGroup) argument
|
/packages/experimental/PermissionApp/src/foo/bar/permission/ |
H A D | PermissionActivity.java | 13 * See the License for the specific language governing permissions and 48 * Simple sample of how to use the runtime permissions APIs. 188 public void onRequestPermissionsResult(int requestCode, String permissions[], argument 204 for (int i = 0; i < permissions.length; i++) { 206 switch (permissions[i]) { 270 List<String> permissions = new ArrayList<>(); 273 permissions.add(Manifest.permission.READ_CALENDAR); 277 permissions.add(Manifest.permission.READ_CONTACTS); 279 if (!permissions.isEmpty()) { 280 requestPermissions(permissions [all...] |
/packages/apps/Dialer/java/com/android/dialer/callcomposer/ |
H A D | GalleryComposerFragment.java | 13 * See the License for the specific language governing permissions and 72 private String[] permissions = new String[] {permission.READ_EXTERNAL_STORAGE}; field in class:GalleryComposerFragment 179 if (PermissionsUtil.isFirstRequest(getContext(), permissions[0]) 180 || shouldShowRequestPermissionRationale(permissions[0])) { 183 requestPermissions(permissions, STORAGE_PERMISSION); 263 int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { 264 if (permissions.length > 0 && permissions[0].equals(this.permissions[0])) { 265 PermissionsUtil.permissionRequested(getContext(), permissions[ 262 onRequestPermissionsResult( int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) argument [all...] |
/packages/apps/Dialer/java/com/android/dialer/postcall/ |
H A D | PostCallActivity.java | 13 * 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/Messaging/src/com/android/messaging/util/ |
H A D | OsUtil.java | 13 * See the License for the specific language governing permissions and 211 /** Does the app have all the specified permissions */ 212 public static boolean hasPermissions(final String[] permissions) { argument 213 for (final String permission : permissions) { 245 * Returns array with the set of permissions that have not been granted from the given set. 246 * The array will be empty if the app has all of the specified permissions. Note that calling 248 * again, and its up to the app to only request permissions that are missing. 250 public static String[] getMissingPermissions(final String[] permissions) { argument 252 for (final String permission : permissions) { 272 /** Does the app have the minimum set of permissions require [all...] |
/packages/wallpapers/LivePicker/ |
H A D | Android.mk | 13 # See the License for the specific language governing permissions and 28 # This will install the file in /system/etc/permissions 30 LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
|