Home
last modified time | relevance | path

Searched refs:hasPermission (Results 1 – 25 of 51) sorted by relevance

123

/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DLocalCallingIdentityTest.java70 assertTrue(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_SELF)); in testFromSelf()
71 assertFalse(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_SHELL)); in testFromSelf()
72 assertTrue(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_MANAGER)); in testFromSelf()
73 assertFalse(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_DELEGATOR)); in testFromSelf()
75 assertFalse(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_REDACTION_NEEDED)); in testFromSelf()
76 assertFalse(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_LEGACY_GRANTED)); in testFromSelf()
77 assertFalse(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_LEGACY_READ)); in testFromSelf()
78 assertFalse(ident.hasPermission(LocalCallingIdentity.PERMISSION_IS_LEGACY_WRITE)); in testFromSelf()
80 assertTrue(ident.hasPermission(LocalCallingIdentity.PERMISSION_READ_AUDIO)); in testFromSelf()
81 assertTrue(ident.hasPermission(LocalCallingIdentity.PERMISSION_READ_VIDEO)); in testFromSelf()
[all …]
/packages/apps/Dialer/java/com/android/dialer/util/
DPermissionsUtil.java83 return hasPermission(context, permission.CALL_PHONE); in hasPhonePermissions()
87 return hasPermission(context, permission.READ_PHONE_STATE); in hasReadPhoneStatePermissions()
91 return hasPermission(context, permission.READ_CONTACTS); in hasContactsReadPermissions()
95 return hasPermission(context, permission.WRITE_CONTACTS); in hasContactsWritePermissions()
99 return hasPermission(context, permission.ACCESS_FINE_LOCATION); in hasLocationPermissions()
103 return hasPermission(context, permission.CAMERA); in hasCameraPermissions()
107 return hasPermission(context, permission.RECORD_AUDIO); in hasMicrophonePermissions()
111 return hasPermission(context, permission.READ_CALL_LOG); in hasCallLogReadPermissions()
115 return hasPermission(context, permission.WRITE_CALL_LOG); in hasCallLogWritePermissions()
119 return hasPermission(context, CEQUINT_PERMISSION); in hasCequintPermissions()
[all …]
DCallUtil.java67 if (!PermissionsUtil.hasPermission(context, android.Manifest.permission.READ_PHONE_STATE)) { in getVideoCallingAvailability()
128 if (!PermissionsUtil.hasPermission(context, android.Manifest.permission.READ_PHONE_STATE)) { in isCallWithSubjectSupported()
/packages/apps/Messaging/src/com/android/messaging/util/
DOsUtil.java194 public static boolean hasPermission(final String permission) { in hasPermission() method in OsUtil
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()
230 return OsUtil.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION); in hasLocationPermission()
237 return OsUtil.hasPermission(Manifest.permission.READ_EXTERNAL_STORAGE); in hasStoragePermission()
241 return OsUtil.hasPermission(Manifest.permission.RECORD_AUDIO); in hasRecordAudioPermission()
253 if (!hasPermission(permission)) { in getMissingPermissions()
/packages/providers/MediaProvider/src/com/android/providers/media/
DLocalCallingIdentity.java110 ident.hasPermission |= PERMISSION_IS_REDACTION_NEEDED; in fromExternal()
135 ident.hasPermission = ~(PERMISSION_IS_LEGACY_GRANTED | PERMISSION_IS_LEGACY_WRITE in fromSelf()
216 private int hasPermission; field in LocalCallingIdentity
219 public boolean hasPermission(int permission) { in hasPermission() method in LocalCallingIdentity
222 hasPermission |= permission; in hasPermission()
226 return (hasPermission & permission) != 0; in hasPermission()
308 return hasPermission(PERMISSION_IS_LEGACY_GRANTED) in isLegacyWriteInternal()
313 return hasPermission(PERMISSION_IS_LEGACY_GRANTED) in isLegacyReadInternal()
319 if (hasPermission(PERMISSION_IS_SELF) || hasPermission(PERMISSION_IS_SHELL)) { in isRedactionNeededInternal()
DMediaProvider.java6147 return mCallingIdentity.get().hasPermission(PERMISSION_IS_REDACTION_NEEDED);
6151 return mCallingIdentity.get().hasPermission(PERMISSION_IS_REDACTION_NEEDED);
6155 return mCallingIdentity.get().hasPermission(PERMISSION_IS_LEGACY_GRANTED);
6170 return mCallingIdentity.get().hasPermission(PERMISSION_WRITE_IMAGES);
6172 return mCallingIdentity.get().hasPermission(PERMISSION_WRITE_VIDEO);
6986 return mCallingIdentity.get().hasPermission(PERMISSION_WRITE_AUDIO);
6989 return mCallingIdentity.get().hasPermission(PERMISSION_READ_AUDIO)
6990 || mCallingIdentity.get().hasPermission(PERMISSION_WRITE_AUDIO);
6997 return mCallingIdentity.get().hasPermission(PERMISSION_WRITE_VIDEO);
7000 return mCallingIdentity.get().hasPermission(PERMISSION_READ_VIDEO)
[all …]
/packages/apps/Contacts/tests/src/com/android/contacts/
DNoPermissionsLaunchSmokeTest.java3 import static com.android.contacts.util.PermissionsUtil.hasPermission;
52 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.READ_CONTACTS)); in setUp()
53 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.WRITE_CONTACTS)); in setUp()
54 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.GET_ACCOUNTS)); in setUp()
55 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.READ_PHONE_STATE)); in setUp()
56 assumeTrue(!hasPermission(mTargetContext, Manifest.permission.CALL_PHONE)); in setUp()
/packages/apps/Dialer/java/com/android/dialer/telecom/
DTelecomUtil.java191 if (!hasPermission(context, permission.READ_PHONE_STATE)) { in getSubscriptionInfo()
274 || (hasPermission(context, Manifest.permission.READ_VOICEMAIL) in hasReadWriteVoicemailPermissions()
275 && hasPermission(context, Manifest.permission.WRITE_VOICEMAIL)); in hasReadWriteVoicemailPermissions()
282 || hasPermission(context, Manifest.permission.MODIFY_PHONE_STATE); in hasModifyPhoneStatePermission()
288 return isDefaultDialer(context) || hasPermission(context, Manifest.permission.READ_PHONE_STATE); in hasReadPhoneStatePermission()
294 return isDefaultDialer(context) || hasPermission(context, Manifest.permission.CALL_PHONE); in hasCallPhonePermission()
297 private static boolean hasPermission(Context context, String permission) { in hasPermission() method in TelecomUtil
298 return instance.hasPermission(context, permission); in hasPermission()
359 public boolean hasPermission(Context context, String permission) { in hasPermission() method in TelecomUtil.TelecomUtilImpl
/packages/apps/Contacts/src/com/android/contacts/util/
DPermissionsUtil.java44 return hasPermission(context, PHONE); in hasPhonePermissions()
48 return hasPermission(context, CONTACTS); in hasContactsPermissions()
52 return hasPermission(context, LOCATION); in hasLocationPermissions()
55 public static boolean hasPermission(Context context, String permission) { in hasPermission() method in PermissionsUtil
/packages/apps/Dialer/java/com/android/dialer/interactions/
DUndemoteOutgoingCallReceiver.java44 if (!PermissionsUtil.hasPermission(context, READ_CONTACTS) in onReceive()
45 || !PermissionsUtil.hasPermission(context, WRITE_CONTACTS)) { in onReceive()
69 if (PermissionsUtil.hasPermission(context, WRITE_CONTACTS)) { in undemoteContactWithId()
79 if (!PermissionsUtil.hasPermission(context, READ_CONTACTS)) { in getContactIdFromPhoneNumber()
/packages/apps/Contacts/src/com/android/contacts/
DCallUtil.java153 if (!PermissionsUtil.hasPermission(context, android.Manifest.permission.READ_PHONE_STATE) in getVideoCallingAvailability()
200 if (!PermissionsUtil.hasPermission(context, android.Manifest.permission.READ_PHONE_STATE) in isCallWithSubjectSupported()
237 if (!PermissionsUtil.hasPermission(context, android.Manifest.permission.READ_PHONE_STATE) in isTachyonEnabled()
/packages/services/BuiltInPrintService/src/com/android/bips/
DP2pPermissionManager.java246 boolean hasPermission = hasP2pPermission(); in getState()
247 if (hasPermission && state != State.ALLOWED) { in getState()
251 } else if (!hasPermission && state == State.ALLOWED) { in getState()
/packages/apps/Contacts/src/com/android/contacts/activities/
DRequestPermissionsActivityBase.java130 if (!PermissionsUtil.hasPermission(this, permission)) { in requestPermissions()
151 if (!PermissionsUtil.hasPermission(context, permission)) { in hasPermissions()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/password/
DSetNewPasswordActivity.java85 final boolean hasPermission = PasswordUtils.isCallingAppPermitted( in onCreate()
87 if (hasPermission) { in onCreate()
DSetupChooseLockGeneric.java84 boolean hasPermission = PasswordUtils.isCallingAppPermitted( in onCreate()
86 if (!hasPermission) { in onCreate()
/packages/apps/Settings/src/com/android/settings/password/
DSetNewPasswordActivity.java90 final boolean hasPermission = PasswordUtils.isCallingAppPermitted( in onCreate()
92 if (hasPermission) { in onCreate()
DSetupChooseLockGeneric.java85 boolean hasPermission = PasswordUtils.isCallingAppPermitted( in onCreate()
87 if (!hasPermission) { in onCreate()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/specialaccess/
DManageAppOp.java131 private boolean hasPermission(int uid) {
148 hasPermission(uid),
/packages/apps/Dialer/java/com/android/dialer/app/calllog/
DCallLogNotificationsService.java143 if (!PermissionsUtil.hasPermission(this, android.Manifest.permission.READ_CALL_LOG) in onHandleIntent()
144 || !PermissionsUtil.hasPermission(this, android.Manifest.permission.WRITE_CALL_LOG)) { in onHandleIntent()
DCallLogNotificationsActivity.java53 if (!PermissionsUtil.hasPermission(this, android.Manifest.permission.READ_CALL_LOG)) { in onCreate()
/packages/services/Mtp/src/com/android/mtp/
DMtpManager.java87 if (!mManager.hasPermission(rawDevice)) { in openDevice()
89 if (!mManager.hasPermission(rawDevice)) { in openDevice()
/packages/apps/Dialer/java/com/android/dialer/callcomposer/
DGalleryComposerFragment.java87 if (!PermissionsUtil.hasPermission(getContext(), permission.READ_EXTERNAL_STORAGE)) { in onCreateView()
214 && PermissionsUtil.hasPermission(getContext(), permission.READ_EXTERNAL_STORAGE)) { in onActivityResult()
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DCellBroadcastHandler.java810 if (!hasPermission(ACCESS_FINE_LOCATION) && !hasPermission(ACCESS_COARSE_LOCATION)) { in requestLocationUpdateInternal()
850 private boolean hasPermission(String permission) { in hasPermission() method in CellBroadcastHandler.LocationRequester
/packages/apps/PermissionController/src/com/android/permissioncontroller/permission/ui/auto/
DAutoAllAppPermissionsFragment.java282 if (currentPermissionGroup.hasPermission(permission)) { in getPermissionForegroundGroup()
287 && currentPermissionGroup.getBackgroundPermissions().hasPermission( in getPermissionForegroundGroup()
/packages/apps/Settings/src/com/android/settings/slices/
DSettingsSliceProvider.java445 final boolean hasPermission = getContext().checkPermission( in isPrivateSlicesNeeded()
450 return hasPermission && TextUtils.equals(callingPackage, in isPrivateSlicesNeeded()

123