Home
last modified time | relevance | path

Searched refs:permission (Results 1 – 25 of 234) sorted by relevance

12345678910

/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/model/
DAppPermissionGroup.java17 package com.android.packageinstaller.permission.model;
33 import com.android.packageinstaller.permission.utils.ArrayUtils;
34 import com.android.packageinstaller.permission.utils.LocationUtils;
160 Permission permission = new Permission(requestedPermission, granted, in create() local
162 group.addPermission(permission); in create()
219 Permission permission = mPermissions.valueAt(i); in isReviewRequired() local
220 if (permission.isReviewRequired()) { in isReviewRequired()
230 Permission permission = mPermissions.valueAt(i); in resetReviewRequired() local
231 if (permission.isReviewRequired()) { in resetReviewRequired()
232 permission.resetReviewRequired(); in resetReviewRequired()
[all …]
/packages/apps/Messaging/src/com/android/messaging/util/
DOsUtil.java194 public static boolean hasPermission(final String permission) { in hasPermission() argument
199 if (!sPermissions.containsKey(permission) in hasPermission()
200 || sPermissions.get(permission) == PackageManager.PERMISSION_DENIED) { in hasPermission()
202 final int permissionState = context.checkSelfPermission(permission); in hasPermission()
203 sPermissions.put(permission, permissionState); in hasPermission()
205 return sPermissions.get(permission) == PackageManager.PERMISSION_GRANTED; in hasPermission()
213 for (final String permission : permissions) { in hasPermissions()
214 if (!hasPermission(permission)) { in hasPermissions()
222 return hasPermission(Manifest.permission.READ_PHONE_STATE); in hasPhonePermission()
226 return hasPermission(Manifest.permission.READ_SMS); in hasSmsPermission()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DVoicemailPermissions.java38 return callerHasPermission(android.Manifest.permission.ADD_VOICEMAIL); in callerHasOwnVoicemailAccess()
46 return callerHasPermission(android.Manifest.permission.READ_VOICEMAIL); in callerHasReadAccess()
55 return callerHasPermission(android.Manifest.permission.WRITE_VOICEMAIL); in callerHasWriteAccess()
66 android.Manifest.permission.ADD_VOICEMAIL); in checkCallerHasOwnVoicemailAccess()
79 android.Manifest.permission.READ_VOICEMAIL)); in checkCallerHasReadAccess()
87 android.Manifest.permission.WRITE_VOICEMAIL)); in checkCallerHasWriteAccess()
94 android.Manifest.permission.ADD_VOICEMAIL); in packageHasOwnVoicemailAccess()
99 return packageHasPermission(packageName, android.Manifest.permission.READ_VOICEMAIL); in packageHasReadAccess()
104 return packageHasPermission(packageName, android.Manifest.permission.WRITE_VOICEMAIL); in packageHasWriteAccess()
108 private boolean packageHasPermission(String packageName, String permission) { in packageHasPermission() argument
[all …]
/packages/apps/ContactsCommon/src/com/android/contacts/common/util/
DPermissionsUtil.java19 import android.Manifest.permission;
39 public static final String PHONE = permission.CALL_PHONE;
40 public static final String CONTACTS = permission.READ_CONTACTS;
41 public static final String LOCATION = permission.ACCESS_FINE_LOCATION;
55 public static boolean hasPermission(Context context, String permission) { in hasPermission() argument
56 return ContextCompat.checkSelfPermission(context, permission) in hasPermission()
95 String permission) { in registerPermissionReceiver() argument
96 final IntentFilter filter = new IntentFilter(permission); in registerPermissionReceiver()
104 public static void notifyPermissionGranted(Context context, String permission) { in notifyPermissionGranted() argument
105 final Intent intent = new Intent(permission); in notifyPermissionGranted()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
DContactsPermissions.java38 public static boolean hasCallerOrSelfPermission(Context context, String permission) { in hasCallerOrSelfPermission() argument
44 ok = context.checkCallingOrSelfPermission(permission) in hasCallerOrSelfPermission()
49 + " perm=" + permission in hasCallerOrSelfPermission()
57 public static void enforceCallingOrSelfPermission(Context context, String permission) { in enforceCallingOrSelfPermission() argument
58 final boolean ok = hasCallerOrSelfPermission(context, permission); in enforceCallingOrSelfPermission()
61 permission)); in enforceCallingOrSelfPermission()
65 public static boolean hasPackagePermission(Context context, String permission, String pkg) { in hasPackagePermission() argument
70 ok = context.getPackageManager().checkPermission(permission, pkg) in hasPackagePermission()
75 + " perm=" + permission in hasPackagePermission()
/packages/apps/ContactsCommon/src/com/android/contacts/common/activity/
DRequestPermissionsActivity.java21 import android.Manifest.permission;
33 permission.READ_CONTACTS,
37 permission.READ_CALL_LOG,
48 permission.ACCESS_FINE_LOCATION, // Location Group in getDesiredPermissions()
49 permission.READ_CONTACTS, // Contacts group in getDesiredPermissions()
50 permission.READ_CALL_LOG, // Permission group phone in getDesiredPermissions()
51 permission.READ_CALENDAR, // Calendar group in getDesiredPermissions()
52 permission.READ_SMS, // SMS group in getDesiredPermissions()
DRequestPermissionsActivityBase.java123 for (String permission : getDesiredPermissions()) { in requestPermissions()
124 if (checkSelfPermission(permission) in requestPermissions()
126 unsatisfiedPermissions.add(permission); in requestPermissions()
143 public int checkSelfPermission(String permission) { in checkSelfPermission() argument
144 return ContextCompat.checkSelfPermission(this, permission); in checkSelfPermission()
150 for (String permission : permissions) { in hasPermissions()
151 if (ContextCompat.checkSelfPermission(context, permission) in hasPermissions()
DRequestDesiredPermissionsActivity.java19 import android.Manifest.permission;
36 permission.ACCESS_FINE_LOCATION,
37 permission.READ_CALENDAR,
38 permission.READ_SMS,
/packages/apps/CellBroadcastReceiver/tests/src/com/android/cellbroadcastreceiver/tests/
DSendTestMessages.java433 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bit()
441 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitUmts()
449 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitNoPadding()
457 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitNoPaddingUmts()
468 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitMultipageGsm()
476 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitMultipageUmts()
484 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitWithLanguage()
493 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitWithLanguageInBody()
502 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessage7bitWithLanguageInBodyUmts()
510 activity.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.RECEIVE_SMS, in testSendMessageUcs2()
[all …]
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/
DGrantPermissionsActivity.java17 package com.android.packageinstaller.permission.ui;
45 import com.android.packageinstaller.permission.model.AppPermissionGroup;
46 import com.android.packageinstaller.permission.model.AppPermissions;
47 import com.android.packageinstaller.permission.model.Permission;
48 import com.android.packageinstaller.permission.ui.handheld.GrantPermissionsViewHandlerImpl;
49 import com.android.packageinstaller.permission.utils.SafetyNetLogger;
78 mViewHandler = new com.android.packageinstaller.permission.ui.television in onCreate()
83 mViewHandler = new com.android.packageinstaller.permission.ui.handheld in onCreate()
281 for (Permission permission : group.getPermissions()) { in updateGrantResults()
283 mRequestedPermissions, permission.getName()); in updateGrantResults()
[all …]
DManagePermissionsActivity.java17 package com.android.packageinstaller.permission.ui;
24 import com.android.packageinstaller.permission.ui.wear.AppPermissionsFragmentWear;
44 fragment = com.android.packageinstaller.permission.ui.television in onCreate()
47 fragment = com.android.packageinstaller.permission.ui.handheld in onCreate()
62 fragment = com.android.packageinstaller.permission.ui.television in onCreate()
65 fragment = com.android.packageinstaller.permission.ui.handheld in onCreate()
78 fragment = com.android.packageinstaller.permission.ui.television in onCreate()
81 fragment = com.android.packageinstaller.permission.ui.handheld in onCreate()
/packages/experimental/PermissionApp/src/foo/bar/permission/
DPermissionActivity.java17 package foo.bar.permission;
192 case Manifest.permission.READ_CALENDAR: { in onRequestPermissionsResult()
197 case Manifest.permission.READ_CONTACTS: { in onRequestPermissionsResult()
224 if (checkSelfPermission(Manifest.permission.READ_CONTACTS) in showContacts()
226 requestPermissions(new String[] {Manifest.permission.READ_CONTACTS}, in showContacts()
238 if (checkSelfPermission(Manifest.permission.READ_CALENDAR) in showEvents()
240 requestPermissions(new String[]{Manifest.permission.READ_CALENDAR}, in showEvents()
253 if (checkSelfPermission(Manifest.permission.READ_CALENDAR) in requestPermissions()
255 permissions.add(Manifest.permission.READ_CALENDAR); in requestPermissions()
257 if (checkSelfPermission(Manifest.permission.READ_CONTACTS) in requestPermissions()
[all …]
/packages/experimental/PermissionApp2/src/foo/bar/permission2/
DPermissionActivity.java201 if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) in showContacts()
204 Manifest.permission.READ_CONTACTS)) { in showContacts()
208 Manifest.permission.READ_CONTACTS}, in showContacts()
220 if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CALENDAR) in showEvents()
223 Manifest.permission.READ_CALENDAR)) { in showEvents()
227 Manifest.permission.READ_CALENDAR}, in showEvents()
239 if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CALENDAR) in requestPermissions()
241 || ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) in requestPermissions()
244 Manifest.permission.READ_CONTACTS, in requestPermissions()
245 Manifest.permission.READ_CALENDAR in requestPermissions()
/packages/apps/Settings/src/com/android/settings/applications/
DAppPermissions.java114 Permission permission = new Permission(runtime, granted); in loadPermissionGroups() local
115 group.addPermission(permission, permName); in loadPermissionGroups()
140 Permission permission = mPermissions.valueAt(i); in areRuntimePermissionsGranted() local
141 if (permission.runtime && !permission.granted) { in areRuntimePermissionsGranted()
152 void addPermission(Permission permission, String permName) { in addPermission() argument
153 mPermissions.put(permName, permission); in addPermission()
154 if (permission.runtime) { in addPermission()
DPermissionsSummaryHelper.java20 import android.content.pm.permission.RuntimePermissionPresentationInfo;
21 import android.content.pm.permission.RuntimePermissionPresenter;
46 RuntimePermissionPresentationInfo permission = permissions.get(i); in getPermissionSummary()
48 if (permission.isGranted()) { in getPermissionSummary()
49 if (permission.isStandard()) { in getPermissionSummary()
50 grantedStandardLabels.add(permission.getLabel()); in getPermissionSummary()
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/service/
DRuntimePermissionPresenterServiceImpl.java17 package com.android.packageinstaller.permission.service;
22 import android.content.pm.permission.RuntimePermissionPresentationInfo;
26 import com.android.packageinstaller.permission.model.AppPermissionGroup;
27 import com.android.packageinstaller.permission.model.AppPermissions;
28 import com.android.packageinstaller.permission.utils.Utils;
57 RuntimePermissionPresentationInfo permission = in onGetAppPermissions() local
60 permissions.add(permission); in onGetAppPermissions()
/packages/apps/Camera2/src/com/android/camera/
DPermissionsActivity.java100 if (checkSelfPermission(Manifest.permission.CAMERA) in checkPermissions()
108 if (checkSelfPermission(Manifest.permission.RECORD_AUDIO) in checkPermissions()
116 if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) in checkPermissions()
124 if (checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) in checkPermissions()
149 permissionsToRequest[permissionsRequestIndex] = Manifest.permission.CAMERA; in buildPermissionsRequest()
154 permissionsToRequest[permissionsRequestIndex] = Manifest.permission.RECORD_AUDIO; in buildPermissionsRequest()
159 … permissionsToRequest[permissionsRequestIndex] = Manifest.permission.READ_EXTERNAL_STORAGE; in buildPermissionsRequest()
164 … permissionsToRequest[permissionsRequestIndex] = Manifest.permission.ACCESS_COARSE_LOCATION; in buildPermissionsRequest()
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/
DBlockedNumberProvider.java510 getContext().sendBroadcast(intent, Manifest.permission.READ_BLOCKED_NUMBERS); in notifyBlockSuppressionStateChange()
514 checkForPermission(android.Manifest.permission.READ_BLOCKED_NUMBERS); in enforceReadPermission()
518 checkForPermissionAndPrimaryUser(android.Manifest.permission.READ_BLOCKED_NUMBERS); in enforceReadPermissionAndPrimaryUser()
522 checkForPermissionAndPrimaryUser(android.Manifest.permission.WRITE_BLOCKED_NUMBERS); in enforceWritePermissionAndPrimaryUser()
525 private void checkForPermissionAndPrimaryUser(String permission) { in checkForPermissionAndPrimaryUser() argument
526 checkForPermission(permission); in checkForPermissionAndPrimaryUser()
532 private void checkForPermission(String permission) { in checkForPermission() argument
533 boolean permitted = passesSystemPermissionCheck(permission) in checkForPermission()
541 enforceSystemPermissionAndUser(android.Manifest.permission.READ_BLOCKED_NUMBERS); in enforceSystemReadPermissionAndPrimaryUser()
545 enforceSystemPermissionAndUser(android.Manifest.permission.WRITE_BLOCKED_NUMBERS); in enforceSystemWritePermissionAndPrimaryUser()
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/permissions/
DPermissionsUtil.java44 for (String permission : permissions) { in getDeniedPermissions()
45 if (ContextCompat.checkSelfPermission(context, permission) in getDeniedPermissions()
47 deniedPermissions.add(permission); in getDeniedPermissions()
85 for (String permission : permissions) { in checkAllPermissionsGranted()
86 if (ContextCompat.checkSelfPermission(context, permission) in checkAllPermissionsGranted()
/packages/apps/Dialer/src/com/android/dialer/util/
DTelecomUtil.java180 || (hasPermission(context, Manifest.permission.READ_VOICEMAIL) in hasReadWriteVoicemailPermissions()
181 && hasPermission(context, Manifest.permission.WRITE_VOICEMAIL)); in hasReadWriteVoicemailPermissions()
186 || hasPermission(context, Manifest.permission.MODIFY_PHONE_STATE); in hasModifyPhoneStatePermission()
191 || hasPermission(context, Manifest.permission.READ_PHONE_STATE); in hasReadPhoneStatePermission()
196 || hasPermission(context, Manifest.permission.CALL_PHONE); in hasCallPhonePermission()
199 private static boolean hasPermission(Context context, String permission) { in hasPermission() argument
200 return ContextCompat.checkSelfPermission(context, permission) in hasPermission()
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/television/
DAllAppPermissionsFragment.java17 package com.android.packageinstaller.permission.ui.television;
46 import com.android.packageinstaller.permission.model.AppPermissionGroup;
47 import com.android.packageinstaller.permission.model.AppPermissions;
48 import com.android.packageinstaller.permission.utils.Utils;
296 case Manifest.permission.READ_CONTACTS: in isMutableGranularPermission()
297 case Manifest.permission.WRITE_CONTACTS: in isMutableGranularPermission()
298 case Manifest.permission.READ_SMS: in isMutableGranularPermission()
299 case Manifest.permission.READ_CALL_LOG: in isMutableGranularPermission()
300 case Manifest.permission.CALL_PHONE: { in isMutableGranularPermission()
DPermissionAppsFragment.java16 package com.android.packageinstaller.permission.ui.television;
45 import com.android.packageinstaller.permission.model.AppPermissionGroup;
46 import com.android.packageinstaller.permission.model.PermissionApps;
47 import com.android.packageinstaller.permission.model.PermissionApps.Callback;
48 import com.android.packageinstaller.permission.model.PermissionApps.PermissionApp;
49 import com.android.packageinstaller.permission.ui.ReviewPermissionsActivity;
50 import com.android.packageinstaller.permission.utils.LocationUtils;
51 import com.android.packageinstaller.permission.utils.SafetyNetLogger;
52 import com.android.packageinstaller.permission.utils.Utils;
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DInCallControllerTests.java197 serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE; in testBindToService_DefaultDialer_NoEmergency()
206 serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE; in testBindToService_DefaultDialer_NoEmergency()
266 serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE; in testBindToService_SystemDialer_Emergency()
275 serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE; in testBindToService_SystemDialer_Emergency()
335 serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE; in testBindToService_DefaultDialer_FallBackToSystem()
344 serviceInfo.permission = Manifest.permission.BIND_INCALL_SERVICE; in testBindToService_DefaultDialer_FallBackToSystem()
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/ui/wear/
DAppPermissionsFragmentWear.java17 package com.android.packageinstaller.permission.ui.wear;
34 import com.android.packageinstaller.permission.model.AppPermissionGroup;
35 import com.android.packageinstaller.permission.model.AppPermissions;
36 import com.android.packageinstaller.permission.ui.wear.settings.PermissionsSettingsAdapter;
37 import com.android.packageinstaller.permission.ui.wear.settings.SettingsAdapter;
38 import com.android.packageinstaller.permission.utils.LocationUtils;
39 import com.android.packageinstaller.permission.utils.SafetyNetLogger;
40 import com.android.packageinstaller.permission.utils.Utils;
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsActor.java489 public int checkPermission(String permission, int pid, int uid) { in checkPermission() argument
490 return checkCallingPermission(permission); in checkPermission()
494 public int checkCallingPermission(String permission) { in checkCallingPermission() argument
495 if (mGrantedPermissions.contains(permission)) { in checkCallingPermission()
517 public int checkCallingOrSelfPermission(String permission) { in checkCallingOrSelfPermission() argument
518 return checkCallingPermission(permission); in checkCallingOrSelfPermission()
522 public void enforcePermission(String permission, int pid, int uid, String message) { in enforcePermission() argument
523 enforceCallingPermission(permission, message); in enforcePermission()
527 public void enforceCallingPermission(String permission, String message) { in enforceCallingPermission() argument
528 if (!mGrantedPermissions.contains(permission)) { in enforceCallingPermission()
[all …]

12345678910