Home
last modified time | relevance | path

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

12345678910>>...57

/frameworks/base/core/java/android/content/pm/
DServiceInfo.java40 public String permission; field in ServiceInfo
142 value = Manifest.permission.FOREGROUND_SERVICE_DATA_SYNC,
157 value = Manifest.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK,
176 Manifest.permission.FOREGROUND_SERVICE_PHONE_CALL,
179 Manifest.permission.MANAGE_OWN_CALLS,
199 Manifest.permission.FOREGROUND_SERVICE_LOCATION,
202 Manifest.permission.ACCESS_COARSE_LOCATION,
203 Manifest.permission.ACCESS_FINE_LOCATION,
231 Manifest.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE,
234 Manifest.permission.BLUETOOTH_ADVERTISE,
[all …]
/frameworks/base/core/java/android/os/
DUserManager.java1949 @RequiresPermission(Manifest.permission.MANAGE_USERS)
2429 @RequiresPermission(anyOf = {android.Manifest.permission.MANAGE_USERS,
2430 android.Manifest.permission.INTERACT_ACROSS_USERS})
2453 @RequiresPermission(anyOf = {android.Manifest.permission.MANAGE_USERS,
2454 android.Manifest.permission.INTERACT_ACROSS_USERS})
2471 @RequiresPermission(anyOf = {android.Manifest.permission.MANAGE_USERS,
2472 android.Manifest.permission.INTERACT_ACROSS_USERS})
2520 android.Manifest.permission.MANAGE_USERS,
2521 android.Manifest.permission.CREATE_USERS,
2522 android.Manifest.permission.QUERY_USERS})
[all …]
DPermissionEnforcer.java26 import android.permission.PermissionCheckerManager;
60 protected int checkPermission(@NonNull String permission, @NonNull AttributionSource source) { in checkPermission() argument
62 mContext, permission, PermissionChecker.PID_UNKNOWN, source, "" /* message */); in checkPermission()
67 protected int checkPermission(@NonNull String permission, int pid, int uid) { in checkPermission() argument
68 if (mContext.checkPermission(permission, pid, uid) == PackageManager.PERMISSION_GRANTED) { in checkPermission()
75 for (String permission : permissions) { in anyAppOps()
76 if (AppOpsManager.permissionToOpCode(permission) != AppOpsManager.OP_NONE) { in anyAppOps()
83 public void enforcePermission(@NonNull String permission, @NonNull in enforcePermission() argument
85 int result = checkPermission(permission, source); in enforcePermission()
87 throw new SecurityException(ACCESS_DENIED + permission); in enforcePermission()
[all …]
DBatteryStatsManager.java175 @RequiresPermission(android.Manifest.permission.BATTERY_STATS)
187 @RequiresPermission(android.Manifest.permission.BATTERY_STATS)
199 @RequiresPermission(android.Manifest.permission.BATTERY_STATS)
214 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
226 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
238 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
253 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
268 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
282 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
297 @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
[all …]
/frameworks/base/tools/aapt2/java/
DManifestClassGenerator_test.cpp36 <permission android:name="android.permission.ACCESS_INTERNET" />
37 <permission android:name="android.DO_DANGEROUS_THINGS" />
38 <permission android:name="com.test.sample.permission.HUH" />
39 <permission-group android:name="foo.bar.PERMISSION" />
46 ASSERT_THAT(actual, HasSubstr("public static final class permission {"));
49 const size_t permission_start_pos = actual.find("public static final class permission {");
84 <permission android:name="android.permission.ACCESS_INTERNET" />
85 <!-- @deprecated This permission is for playing outside. -->
86 <permission android:name="android.permission.PLAY_OUTSIDE" />
87 <!-- This is a private permission for system only!
[all …]
/frameworks/base/tests/utils/testutils/java/android/os/test/
DFakePermissionEnforcer.java19 import static android.permission.PermissionManager.PERMISSION_GRANTED;
20 import static android.permission.PermissionManager.PERMISSION_HARD_DENIED;
42 public void grant(String permission) { in grant() argument
43 mGranted.add(permission); in grant()
46 public void revoke(String permission) { in revoke() argument
47 mGranted.remove(permission); in revoke()
50 private boolean granted(String permission) { in granted() argument
51 return mGranted.contains(permission); in granted()
55 protected int checkPermission(@NonNull String permission, in checkPermission() argument
57 return granted(permission) ? PERMISSION_GRANTED : PERMISSION_HARD_DENIED; in checkPermission()
[all …]
/frameworks/base/core/java/android/hardware/radio/
DRadioTuner.java58 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
81 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
103 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
128 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
138 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
165 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
195 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
223 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
255 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
271 @RequiresPermission(Manifest.permission.ACCESS_BROADCAST_RADIO)
[all …]
/frameworks/base/services/core/java/com/android/server/pm/pkg/component/
DParsedPermissionUtils.java55 ParsedPermissionImpl permission = new ParsedPermissionImpl(); in parsePermission() local
61 permission, tag, pkg, sa, useRoundIcon, input, in parsePermission()
81 permission.setBackgroundPermission(sa.getNonResourceString( in parsePermission()
91 permission.setGroup(sa.getNonResourceString( in parsePermission()
111 permission.setKnownCerts(knownCerts); in parsePermission()
116 permission.setKnownCert(knownCert); in parsePermission()
119 if (permission.getKnownCerts().isEmpty()) { in parsePermission()
129 permission.setKnownCert(knownCert); in parsePermission()
134 if (!isRuntime(permission) || !"android".equals(permission.getPackageName())) { in parsePermission()
135 permission.setFlags(permission.getFlags() & ~PermissionInfo.FLAG_HARD_RESTRICTED); in parsePermission()
[all …]
DParsedServiceImpl.java41 private String permission; field in ParsedServiceImpl
46 this.permission = other.permission; in ParsedServiceImpl()
49 public ParsedMainComponent setPermission(String permission) { in setPermission() argument
51 this.permission = TextUtils.isEmpty(permission) ? null : permission.intern(); in setPermission()
74 sForInternedString.parcel(this.permission, dest, flags); in writeToParcel()
83 this.permission = sForInternedString.unparcel(in); in ParsedServiceImpl()
118 @Nullable String permission) { in ParsedServiceImpl() argument
120 this.permission = permission; in ParsedServiceImpl()
132 return permission; in getPermission()
/frameworks/base/core/java/android/content/
DPermissionChecker.java24 import android.permission.IPermissionChecker;
25 import android.permission.PermissionCheckerManager;
26 import android.permission.PermissionCheckerManager.PermissionResult;
152 @NonNull String permission, int pid, int uid, @Nullable String packageName, in checkPermissionForDataDelivery() argument
154 return checkPermissionForDataDelivery(context, permission, pid, new AttributionSource(uid, in checkPermissionForDataDelivery()
195 @NonNull String permission, int pid, int uid, @Nullable String packageName, in checkPermissionForDataDelivery() argument
197 return checkPermissionForDataDelivery(context, permission, pid, uid, in checkPermissionForDataDelivery()
233 @NonNull String permission, int pid, @NonNull AttributionSource attributionSource, in checkPermissionForDataDeliveryFromDataSource() argument
235 return checkPermissionForDataDeliveryCommon(context, permission, attributionSource, in checkPermissionForDataDeliveryFromDataSource()
270 @NonNull String permission, int pid, @NonNull AttributionSource attributionSource, in checkPermissionForDataDelivery() argument
[all …]
/frameworks/native/libs/binder/
DPermissionCache.cpp38 const String16& permission, uid_t uid) const { in check() argument
41 e.name = permission; in check()
51 void PermissionCache::cache(const String16& permission, in cache() argument
55 ssize_t index = mPermissionNamesPool.indexOf(permission); in cache()
59 mPermissionNamesPool.add(permission); in cache()
60 e.name = permission; in cache()
77 bool PermissionCache::checkCallingPermission(const String16& permission) { in checkCallingPermission() argument
78 return PermissionCache::checkCallingPermission(permission, nullptr, nullptr); in checkCallingPermission()
82 const String16& permission, int32_t* outPid, int32_t* outUid) { in checkCallingPermission() argument
88 return PermissionCache::checkPermission(permission, pid, uid); in checkCallingPermission()
[all …]
/frameworks/base/services/permission/java/com/android/server/permission/access/permission/
DUidPermissionPersistence.kt17 package com.android.server.permission.access.permission in <lambda>()
23 import com.android.server.permission.access.AccessState in <lambda>()
24 import com.android.server.permission.access.UserState in <lambda>()
25 import com.android.server.permission.access.collection.* // ktlint-disable no-wildcard-imports in <lambda>()
26 import com.android.server.permission.access.util.attribute in <lambda>()
27 import com.android.server.permission.access.util.attributeInt in <lambda>()
28 import com.android.server.permission.access.util.attributeIntHex in <lambda>()
29 import com.android.server.permission.access.util.attributeIntHexWithDefault in <lambda>()
30 import com.android.server.permission.access.util.attributeInterned in <lambda>()
31 import com.android.server.permission.access.util.forEachTag in <lambda>()
[all …]
DUidPermissionPolicy.kt17 package com.android.server.permission.access.permission in <lambda>()
30 import com.android.server.permission.access.AccessState in <lambda>()
31 import com.android.server.permission.access.AccessUri in <lambda>()
32 import com.android.server.permission.access.GetStateScope in <lambda>()
33 import com.android.server.permission.access.MutateStateScope in <lambda>()
34 import com.android.server.permission.access.PermissionUri in <lambda>()
35 import com.android.server.permission.access.SchemePolicy in <lambda>()
36 import com.android.server.permission.access.UidUri in <lambda>()
37 import com.android.server.permission.access.collection.* // ktlint-disable no-wildcard-imports in <lambda>()
38 import com.android.server.permission.access.util.andInv in <lambda>()
[all …]
DPermissionService.kt17 package com.android.server.permission.access.permission in <lambda>()
30 import android.content.pm.permission.SplitPermissionInfoParcelable in <lambda>()
44 import android.permission.IOnPermissionsChangeListener in <lambda>()
45 import android.permission.PermissionControllerManager in <lambda>()
46 import android.permission.PermissionManager in <lambda>()
62 import com.android.server.permission.access.AccessCheckingService in <lambda>()
63 import com.android.server.permission.access.AppOpUri in <lambda>()
64 import com.android.server.permission.access.GetStateScope in <lambda>()
65 import com.android.server.permission.access.MutateStateScope in <lambda>()
66 import com.android.server.permission.access.PermissionUri in <lambda>()
[all …]
/frameworks/base/tools/aapt2/integration-tests/DumpTest/
Dmultiple_uses_sdk_expected.txt10 uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
11 uses-implied-permission: name='android.permission.WRITE_EXTERNAL_STORAGE' reason='targetSdkVersion …
12 uses-permission: name='android.permission.READ_PHONE_STATE'
13 uses-implied-permission: name='android.permission.READ_PHONE_STATE' reason='targetSdkVersion < 4'
14 uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
15 uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' reason='requested WRITE_EX…
Dcomponents_permissions_expected.txt2 permission: minimal.FIRST_PERMISSION
3 uses-permission: name='android.permission.BIND_ACCESSIBILITY_SERVICE' maxSdkVersion='24'
4 uses-permission-sdk-23: name='android.permission.RECEIVE_SMS'
5 uses-permission: name='android.permission.WRITE_EXTERNAL_STORAGE'
/frameworks/base/core/java/android/os/image/
DDynamicSystemManager.java68 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
84 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
100 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
115 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
129 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
147 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
166 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
178 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
194 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
211 @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM)
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DPermissionHelperTest.java44 import android.permission.IPermissionManager;
85 testPkgInfo.requestedPermissions = new String[]{ Manifest.permission.POST_NOTIFICATIONS }; in setUp()
116 new String[] {"something else", Manifest.permission.POST_NOTIFICATIONS}; in testGetAppsRequestingPermission()
122 second.requestedPermissions = new String[] {Manifest.permission.POST_NOTIFICATIONS}; in testGetAppsRequestingPermission()
142 final String permission = "correct"; in testHasRequestedPermission_otherPermission() local
152 assertThat(mPermissionHelper.hasRequestedPermission(permission, packageName, 0)).isFalse(); in testHasRequestedPermission_otherPermission()
158 final String permission = "correct"; in testHasRequestedPermission_noPermissions() local
167 assertThat(mPermissionHelper.hasRequestedPermission(permission, packageName, 0)).isFalse(); in testHasRequestedPermission_noPermissions()
172 final String permission = "correct"; in testHasRequestedPermission_singlePermissions() local
179 new String[]{permission}; in testHasRequestedPermission_singlePermissions()
[all …]
/frameworks/base/core/java/android/telephony/
DTelephonyCallback.java143 @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
157 @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
173 @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
241 Manifest.permission.READ_PHONE_STATE,
242 Manifest.permission.ACCESS_FINE_LOCATION
257 @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE)
271 @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE)
283 @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE)
293 @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
303 @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
[all …]
/frameworks/native/libs/permission/android/permission/
DPermissionChecker.cpp32 namespace android::permission { namespace
40 sp<android::permission::IPermissionChecker> PermissionChecker::getService() in getService()
69 const String16& permission, const AttributionSourceState& attributionSource, in checkPermissionForDataDeliveryFromDatasource() argument
72 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ true, in checkPermissionForDataDeliveryFromDatasource()
78 const String16& permission, const AttributionSourceState& attributionSource, in checkPermissionForStartDataDeliveryFromDatasource() argument
81 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ true, in checkPermissionForStartDataDeliveryFromDatasource()
86 const String16& permission, const AttributionSourceState& attributionSource, in checkPermissionForPreflight() argument
89 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ false, in checkPermissionForPreflight()
94 const String16& permission, const AttributionSourceState& attributionSource, in checkPermissionForPreflightFromDatasource() argument
97 return checkPermission(permission, attributionSource, message, /*forDataDelivery*/ false, in checkPermissionForPreflightFromDatasource()
[all …]
/frameworks/base/test-base/src/android/test/
DAndroidTestCase.java99 String packageName, String className, String permission) { in assertActivityRequiresPermission() argument
106 fail("expected security exception for " + permission); in assertActivityRequiresPermission()
109 assertTrue("error message should contain " + permission + ".", in assertActivityRequiresPermission()
110 expected.getMessage().contains(permission)); in assertActivityRequiresPermission()
122 public void assertReadingContentUriRequiresPermission(Uri uri, String permission) { in assertReadingContentUriRequiresPermission() argument
125 fail("expected SecurityException requiring " + permission); in assertReadingContentUriRequiresPermission()
128 assertTrue("error message should contain " + permission + ".", in assertReadingContentUriRequiresPermission()
129 expected.getMessage().contains(permission)); in assertReadingContentUriRequiresPermission()
141 public void assertWritingContentUriRequiresPermission(Uri uri, String permission) { in assertWritingContentUriRequiresPermission() argument
144 fail("expected SecurityException requiring " + permission); in assertWritingContentUriRequiresPermission()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermission.java17 package com.android.server.pm.permission;
197 public int calculateFootprint(@NonNull Permission permission) { in calculateFootprint() argument
198 if (mUid == permission.mUid) { in calculateFootprint()
199 return permission.mPermissionInfo.name.length() in calculateFootprint()
200 + permission.mPermissionInfo.calculateFootprint(); in calculateFootprint()
401 public static boolean isOverridingSystemPermission(@Nullable Permission permission, in isOverridingSystemPermission() argument
404 if (permission == null || Objects.equals(permission.mPermissionInfo.packageName, in isOverridingSystemPermission()
408 if (!permission.mReconciled) { in isOverridingSystemPermission()
412 permission.mPermissionInfo.packageName); in isOverridingSystemPermission()
420 public static Permission createOrUpdate(@Nullable Permission permission, in createOrUpdate() argument
[all …]
/frameworks/base/services/core/java/com/android/server/pm/verify/domain/
DDomainVerificationEnforcer.java73 mContext.enforcePermission(android.Manifest.permission.DUMP, in assertApprovedQuerent()
80 mContext.enforcePermission(android.Manifest.permission.QUERY_ALL_PACKAGES, in assertApprovedQuerent()
83 + android.Manifest.permission.QUERY_ALL_PACKAGES); in assertApprovedQuerent()
104 android.Manifest.permission.DOMAIN_VERIFICATION_AGENT, callingPid, in assertApprovedVerifier()
107 android.Manifest.permission.INTENT_FILTER_VERIFICATION_AGENT, in assertApprovedVerifier()
111 + android.Manifest.permission.DOMAIN_VERIFICATION_AGENT); in assertApprovedVerifier()
117 mContext.enforcePermission(android.Manifest.permission.QUERY_ALL_PACKAGES, in assertApprovedVerifier()
119 + android.Manifest.permission.QUERY_ALL_PACKAGES); in assertApprovedVerifier()
139 Manifest.permission.INTERACT_ACROSS_USERS, in assertApprovedUserStateQuerent()
160 Manifest.permission.INTERACT_ACROSS_USERS, in assertApprovedUserSelector()
[all …]
/frameworks/base/tests/testables/src/android/testing/
DTestablePermissions.java38 public void setPermission(String permission, int value) { in setPermission() argument
39 mPermissions.put(permission, value); in setPermission()
52 boolean wantsCall(String permission) { in wantsCall() argument
53 return mPermissions.containsKey(permission); in wantsCall()
60 int check(String permission) { in check() argument
61 return mPermissions.get(permission); in check()
69 public void enforce(String permission) { in enforce() argument
70 if (check(permission) != PackageManager.PERMISSION_GRANTED) { in enforce()
/frameworks/base/services/permission/java/com/android/server/permission/access/appop/
DBaseAppOpPersistence.kt17 package com.android.server.permission.access.appop in <lambda>()
22 import com.android.server.permission.access.AccessState in <lambda>()
23 import com.android.server.permission.access.collection.* // ktlint-disable no-wildcard-imports in <lambda>()
24 import com.android.server.permission.access.util.attributeInt in <lambda>()
25 import com.android.server.permission.access.util.attributeInterned in <lambda>()
26 import com.android.server.permission.access.util.forEachTag in <lambda>()
27 import com.android.server.permission.access.util.getAttributeIntOrThrow in <lambda>()
28 import com.android.server.permission.access.util.getAttributeValueOrThrow in <lambda>()
29 import com.android.server.permission.access.util.tag in <lambda>()
30 import com.android.server.permission.access.util.tagName in <lambda>()

12345678910>>...57