/frameworks/base/services/core/java/com/android/server/uri/ |
D | UriPermission.java | 65 int modeFlags = 0; field in UriPermission 99 final int oldModeFlags = modeFlags; in updateModeFlags() 100 modeFlags = ownedModeFlags | globalModeFlags | persistedModeFlags; in updateModeFlags() 102 if (Log.isLoggable(TAG, Log.VERBOSE) && (modeFlags != oldModeFlags)) { in updateModeFlags() 106 + Integer.toHexString(modeFlags) + " via calling UID " in updateModeFlags() 116 void initPersistedModes(int modeFlags, long createdTime) { in initPersistedModes() argument 117 modeFlags &= (Intent.FLAG_GRANT_READ_URI_PERMISSION in initPersistedModes() 120 persistableModeFlags = modeFlags; in initPersistedModes() 121 persistedModeFlags = modeFlags; in initPersistedModes() 127 boolean grantModes(int modeFlags, @Nullable UriPermissionOwner owner) { in grantModes() argument [all …]
|
D | UriGrantsManagerService.java | 255 Uri uri, final int modeFlags, int sourceUserId, int targetUserId) { in grantUriPermissionFromOwner() argument 256 grantUriPermissionFromOwnerUnlocked(token, fromUid, targetPkg, uri, modeFlags, sourceUserId, in grantUriPermissionFromOwner() 264 @NonNull String targetPkg, @NonNull Uri uri, final int modeFlags, in grantUriPermissionFromOwnerUnlocked() argument 288 grantUriPermissionUnlocked(fromUid, targetPkg, new GrantUri(sourceUserId, uri, modeFlags), in grantUriPermissionFromOwnerUnlocked() 289 modeFlags, owner, targetUserId); in grantUriPermissionFromOwnerUnlocked() 373 public void takePersistableUriPermission(Uri uri, final int modeFlags, in takePersistableUriPermission() argument 385 Preconditions.checkFlagsArgument(modeFlags, in takePersistableUriPermission() 397 && ((modeFlags & exactPerm.persistableModeFlags) == modeFlags); in takePersistableUriPermission() 399 && ((modeFlags & prefixPerm.persistableModeFlags) == modeFlags); in takePersistableUriPermission() 407 persistChanged |= exactPerm.takePersistableModes(modeFlags); in takePersistableUriPermission() [all …]
|
D | GrantUri.java | 33 public GrantUri(int sourceUserId, Uri uri, int modeFlags) { in GrantUri() argument 36 this.prefix = (modeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0; in GrantUri() 78 public static GrantUri resolve(int defaultSourceUserHandle, Uri uri, int modeFlags) { in resolve() argument 81 ContentProvider.getUriWithoutUserId(uri), modeFlags); in resolve() 83 return new GrantUri(defaultSourceUserHandle, uri, modeFlags); in resolve()
|
D | UriGrantsManagerInternal.java | 39 GrantUri grantUri, final int modeFlags); in revokeUriPermission() argument 49 boolean checkUriPermission(GrantUri grantUri, int uid, int modeFlags, in checkUriPermission() argument 53 int callingUid, String targetPkg, Uri uri, int modeFlags, int userId); in checkGrantUriPermission() argument
|
/frameworks/base/tests/testables/src/android/testing/ |
D | TestableContext.java | 454 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) { in checkCallingOrSelfUriPermission() argument 456 return mTestablePermissions.check(uri, modeFlags); in checkCallingOrSelfUriPermission() 458 return super.checkCallingOrSelfUriPermission(uri, modeFlags); in checkCallingOrSelfUriPermission() 462 public int checkCallingUriPermission(Uri uri, int modeFlags) { in checkCallingUriPermission() argument 464 return mTestablePermissions.check(uri, modeFlags); in checkCallingUriPermission() 466 return super.checkCallingUriPermission(uri, modeFlags); in checkCallingUriPermission() 470 public void enforceCallingOrSelfUriPermission(Uri uri, int modeFlags, String message) { in enforceCallingOrSelfUriPermission() argument 472 mTestablePermissions.enforce(uri, modeFlags); in enforceCallingOrSelfUriPermission() 474 super.enforceCallingOrSelfUriPermission(uri, modeFlags, message); in enforceCallingOrSelfUriPermission() 479 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument [all …]
|
D | TestablePermissions.java | 64 int check(Uri uri, int modeFlags) { in check() argument 75 public void enforce(Uri uri, int modeFlags) { in enforce() argument 76 if (check(uri, modeFlags) != PackageManager.PERMISSION_GRANTED) { in enforce()
|
/frameworks/base/core/java/android/app/ |
D | IUriGrantsManager.aidl | 28 void takePersistableUriPermission(in Uri uri, int modeFlags, String toPackage, int userId); in takePersistableUriPermission() argument 29 void releasePersistableUriPermission(in Uri uri, int modeFlags, String toPackage, int userId); in releasePersistableUriPermission() argument 44 int sourceUid, String targetPkg, in Uri uri, int modeFlags, int userId); in checkGrantUriPermission_ignoreNonSystem() argument
|
D | ComponentCaller.java | 157 public int checkContentUriPermission(@NonNull Uri uri, @Intent.AccessUriMode int modeFlags) { in checkContentUriPermission() argument 159 mCallerToken, uri, modeFlags); in checkContentUriPermission()
|
D | ContextImpl.java | 2425 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) { in grantUriPermission() argument 2429 ContentProvider.getUriWithoutUserId(uri), modeFlags, resolveUserId(uri)); in grantUriPermission() local 2436 public void revokeUriPermission(Uri uri, int modeFlags) { in revokeUriPermission() argument 2440 ContentProvider.getUriWithoutUserId(uri), modeFlags, resolveUserId(uri)); in revokeUriPermission() local 2447 public void revokeUriPermission(String targetPackage, Uri uri, int modeFlags) { in revokeUriPermission() argument 2451 ContentProvider.getUriWithoutUserId(uri), modeFlags, resolveUserId(uri)); in revokeUriPermission() local 2458 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument 2461 ContentProvider.getUriWithoutUserId(uri), pid, uid, modeFlags, in checkUriPermission() 2469 public int checkContentUriPermissionFull(Uri uri, int pid, int uid, int modeFlags) { in checkContentUriPermissionFull() argument 2472 ContentProvider.getUriWithoutUserId(uri), pid, uid, modeFlags, in checkContentUriPermissionFull() [all …]
|
/frameworks/base/core/java/android/content/ |
D | ContextWrapper.java | 988 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) { in grantUriPermission() argument 989 mBase.grantUriPermission(toPackage, uri, modeFlags); in grantUriPermission() 993 public void revokeUriPermission(Uri uri, int modeFlags) { in revokeUriPermission() argument 994 mBase.revokeUriPermission(uri, modeFlags); in revokeUriPermission() 998 public void revokeUriPermission(String targetPackage, Uri uri, int modeFlags) { in revokeUriPermission() argument 999 mBase.revokeUriPermission(targetPackage, uri, modeFlags); in revokeUriPermission() 1003 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument 1004 return mBase.checkUriPermission(uri, pid, uid, modeFlags); in checkUriPermission() 1009 public int checkContentUriPermissionFull(@NonNull Uri uri, int pid, int uid, int modeFlags) { in checkContentUriPermissionFull() argument 1010 return mBase.checkContentUriPermissionFull(uri, pid, uid, modeFlags); in checkContentUriPermissionFull() [all …]
|
D | UriPermission.java | 42 public UriPermission(Uri uri, int modeFlags, long persistedTime) { in UriPermission() argument 44 mModeFlags = modeFlags; in UriPermission()
|
D | Context.java | 6819 @Intent.GrantUriMode int modeFlags); in grantUriPermission() argument 6849 public abstract void revokeUriPermission(Uri uri, @Intent.AccessUriMode int modeFlags); in revokeUriPermission() argument 6873 @Intent.AccessUriMode int modeFlags); in revokeUriPermission() argument 6897 @Intent.AccessUriMode int modeFlags); in checkUriPermission() argument 6926 @Intent.AccessUriMode int modeFlags) { in checkContentUriPermissionFull() argument 6956 @Intent.AccessUriMode int modeFlags) { in checkUriPermissions() argument 6964 @Intent.AccessUriMode int modeFlags, IBinder callerToken); in checkUriPermission() argument 6987 public abstract int checkCallingUriPermission(Uri uri, @Intent.AccessUriMode int modeFlags); in checkCallingUriPermission() argument 7011 @Intent.AccessUriMode int modeFlags) { in checkCallingUriPermissions() argument 7033 @Intent.AccessUriMode int modeFlags); in checkCallingOrSelfUriPermission() argument [all …]
|
D | LoggingContentInterface.java | 168 public int checkUriPermission(@NonNull Uri uri, int uid, @Intent.AccessUriMode int modeFlags) in checkUriPermission() argument 170 try (Logger l = new Logger("checkUriPermission", uri, uid, modeFlags)) { in checkUriPermission() argument 172 return l.setResult(delegate.checkUriPermission(uri, uid, modeFlags)); in checkUriPermission()
|
D | ContentInterface.java | 59 public int checkUriPermission(@NonNull Uri uri, int uid, @Intent.AccessUriMode int modeFlags) in checkUriPermission() argument
|
D | ContentResolver.java | 1474 public int checkUriPermission(@NonNull Uri uri, int uid, @Intent.AccessUriMode int modeFlags) { 1478 if (mWrapped != null) return mWrapped.checkUriPermission(uri, uid, modeFlags); 1484 return client.checkUriPermission(uri, uid, modeFlags); 2949 @Intent.AccessUriMode int modeFlags) { 2953 ContentProvider.getUriWithoutUserId(uri), modeFlags, /* toPackage= */ null, 2965 @Intent.AccessUriMode int modeFlags) { 2970 ContentProvider.getUriWithoutUserId(uri), modeFlags, toPackage, 2986 @Intent.AccessUriMode int modeFlags) { 2990 ContentProvider.getUriWithoutUserId(uri), modeFlags, /* toPackage= */ null,
|
D | ContentProviderNative.java | 430 int modeFlags = data.readInt(); in onTransact() local 432 int out = checkUriPermission(attributionSource, uri, uid, modeFlags); in onTransact() 951 int modeFlags) throws RemoteException { in checkUriPermission() argument 960 data.writeInt(modeFlags); in checkUriPermission()
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | ActivityCallerState.java | 127 boolean checkContentUriPermission(IBinder callerToken, GrantUri grantUri, int modeFlags) { in checkContentUriPermission() argument 128 if (!Intent.isAccessUriMode(modeFlags)) { in checkContentUriPermission() 130 + modeFlags); in checkContentUriPermission() 152 final boolean checkRead = (modeFlags & Intent.FLAG_GRANT_READ_URI_PERMISSION) != 0; in checkContentUriPermission() 157 final boolean checkWrite = (modeFlags & Intent.FLAG_GRANT_WRITE_URI_PERMISSION) != 0; in checkContentUriPermission() 165 private boolean addContentUriIfUidHasPermission(Uri contentUri, int uid, int modeFlags, in addContentUriIfUidHasPermission() argument 167 final GrantUri grantUri = convertToGrantUri(contentUri, modeFlags, uid); in addContentUriIfUidHasPermission() 169 modeFlags, /* isFullAccessForContentUri */ true)) { in addContentUriIfUidHasPermission() 176 private static GrantUri convertToGrantUri(Uri contentUri, int modeFlags, int uid) { in convertToGrantUri() argument 179 modeFlags); in convertToGrantUri()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/uri/ |
D | UriPermissionTest.java | 117 assertEquals(FLAG_READ | FLAG_WRITE, photo1.modeFlags); in testOverlap() 118 assertEquals(FLAG_READ | FLAG_WRITE, photo2.modeFlags); in testOverlap() 122 assertEquals(FLAG_READ, photo1.modeFlags); in testOverlap() 123 assertEquals(FLAG_WRITE, photo2.modeFlags); in testOverlap() 127 assertEquals(0, photo1.modeFlags); in testOverlap() 128 assertEquals(FLAG_WRITE, photo2.modeFlags); in testOverlap()
|
/frameworks/base/ravenwood/junit-impl-src/android/platform/test/ravenwood/ |
D | RavenwoodBaseContext.java | 626 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) { in grantUriPermission() argument 631 public void revokeUriPermission(Uri uri, int modeFlags) { in revokeUriPermission() argument 636 public void revokeUriPermission(String toPackage, Uri uri, int modeFlags) { in revokeUriPermission() argument 641 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument 646 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) { in checkUriPermission() argument 651 public int checkCallingUriPermission(Uri uri, int modeFlags) { in checkCallingUriPermission() argument 656 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) { in checkCallingOrSelfUriPermission() argument 662 int pid, int uid, int modeFlags) { in checkUriPermission() argument 667 public void enforceUriPermission(Uri uri, int pid, int uid, int modeFlags, String message) { in enforceUriPermission() argument 672 public void enforceCallingUriPermission(Uri uri, int modeFlags, String message) { in enforceCallingUriPermission() argument [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/ |
D | ApplicationContext.java | 1015 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) { in grantUriPermission() argument 1018 context.grantUriPermission(toPackage, uri, modeFlags); in grantUriPermission() 1023 public void revokeUriPermission(Uri uri, int modeFlags) { in revokeUriPermission() argument 1026 context.revokeUriPermission(uri, modeFlags); in revokeUriPermission() 1031 public void revokeUriPermission(String toPackage, Uri uri, int modeFlags) { in revokeUriPermission() argument 1034 context.revokeUriPermission(toPackage, uri, modeFlags); in revokeUriPermission() 1039 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument 1042 return context.checkUriPermission(uri, pid, uid, modeFlags); in checkUriPermission() 1048 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) { in checkUriPermission() argument 1051 return context.checkUriPermission(uri, pid, uid, modeFlags, callerToken); in checkUriPermission() [all …]
|
D | BridgeContentProvider.java | 235 int modeFlags) throws RemoteException { in checkUriPermission() argument
|
/frameworks/base/test-mock/src/android/test/mock/ |
D | MockContext.java | 727 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) { in grantUriPermission() argument 732 public void revokeUriPermission(Uri uri, int modeFlags) { in revokeUriPermission() argument 737 public void revokeUriPermission(String targetPackage, Uri uri, int modeFlags) { in revokeUriPermission() argument 742 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument 748 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) { in checkUriPermission() argument 749 return checkUriPermission(uri, pid, uid, modeFlags); in checkUriPermission() 753 public int checkCallingUriPermission(Uri uri, int modeFlags) { in checkCallingUriPermission() argument 758 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) { in checkCallingOrSelfUriPermission() argument 764 String writePermission, int pid, int uid, int modeFlags) { in checkUriPermission() argument 770 Uri uri, int pid, int uid, int modeFlags, String message) { in enforceUriPermission() argument [all …]
|
D | MockContentProvider.java | 193 int uid, int modeFlags) { in checkUriPermission() argument 194 return MockContentProvider.this.checkUriPermission(uri, uid, modeFlags); in checkUriPermission() 363 public int checkUriPermission(@NonNull Uri uri, int uid, @Intent.AccessUriMode int modeFlags) { in checkUriPermission() argument
|
/frameworks/base/core/java/android/provider/ |
D | DocumentsProvider.java | 1018 final int modeFlags = getCallingOrSelfUriPermissionModeFlags(context, uri); in canonicalize() local 1019 context.grantUriPermission(getCallingPackage(), narrowUri, modeFlags); in canonicalize() local 1027 int modeFlags = 0; in getCallingOrSelfUriPermissionModeFlags() local 1030 modeFlags |= Intent.FLAG_GRANT_READ_URI_PERMISSION; in getCallingOrSelfUriPermissionModeFlags() 1034 modeFlags |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION; in getCallingOrSelfUriPermissionModeFlags() 1039 modeFlags |= Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION; in getCallingOrSelfUriPermissionModeFlags() 1041 return modeFlags; in getCallingOrSelfUriPermissionModeFlags() 1182 final int modeFlags = getCallingOrSelfUriPermissionModeFlags(context, in callUnchecked() local 1184 context.grantUriPermission(getCallingPackage(), newDocumentUri, modeFlags); in callUnchecked() local 1214 final int modeFlags = getCallingOrSelfUriPermissionModeFlags(context, in callUnchecked() local [all …]
|
/frameworks/base/test-runner/src/android/test/ |
D | IsolatedContext.java | 124 int uid, int modeFlags) { in checkUriPermission() argument 129 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { in checkUriPermission() argument
|