Home
last modified time | relevance | path

Searched refs:LocalCallingIdentity (Results 1 – 9 of 9) sorted by relevance

/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DLocalCallingIdentityTest.java63 final LocalCallingIdentity ident = LocalCallingIdentity.fromSelf(context); in testFromSelf()
70 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()
[all …]
DAccessCheckerTest.java71 LocalCallingIdentity hasNoPerms = LocalCallingIdentity.forTest( in testHasAccessToCollection_forRead_noPerms()
89 LocalCallingIdentity hasReadMedia = LocalCallingIdentity.forTest( in testHasAccessToCollection_forRead_hasReadMediaPerms()
114 LocalCallingIdentity hasLegacyRead = LocalCallingIdentity.forTest( in testHasAccessToCollection_forRead_hasLegacyRead()
132 LocalCallingIdentity hasNoPerms = LocalCallingIdentity.forTest( in testHasAccessToCollection_forWrite_noPerms()
150 LocalCallingIdentity hasWriteMedia = LocalCallingIdentity.forTest( in testHasAccessToCollection_forWrite_hasWriteMediaPerms()
176 LocalCallingIdentity hasLegacyWrite = LocalCallingIdentity.forTest( in testHasAccessToCollection_forWrite_hasLegacyWrite()
204 LocalCallingIdentity hasNoPerms = LocalCallingIdentity.forTest( in testHasUserSelectedAccess_noPerms()
231 LocalCallingIdentity userSelectPerms = LocalCallingIdentity.forTest( in testHasUserSelectedAccess_userSelectedPerms()
263 LocalCallingIdentity callingIdentity = LocalCallingIdentity.forTest( in testGetWhereForUserSelectedAccess()
315 LocalCallingIdentity callingIdentity = LocalCallingIdentity.forTest( in testGetWhereForRecentSelection()
[all …]
DPickerUriResolverTest.java275 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testOpenFile_mode_w()
430 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testOpenFile_mode_rw()
447 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testOpenFile_mode_invalid()
564 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testPickerUriResolver_thumbnailRequest()
587 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testPickerUriResolver_pickerUri_fileOpenWithRequireOriginal()
595 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testPickerUriResolver_pickerUri_fileOpenWithRequireOriginal()
604 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testPickerUriResolver_pickerUri_fileOpenWithRequireOriginal()
612 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testPickerUriResolver_pickerUri_fileOpenWithRequireOriginal()
635 LocalCallingIdentity.forTest(sCurrentContext, /* uid */ -1, /* permission */ in testPickerUriResolver_pickerGetContentUri_fileOpenWithRequireOriginal()
636 ~LocalCallingIdentity.PERMISSION_IS_REDACTION_NEEDED))) { in testPickerUriResolver_pickerGetContentUri_fileOpenWithRequireOriginal()
[all …]
/packages/providers/MediaProvider/src/com/android/providers/media/
DAccessChecker.java88 public static boolean hasAccessToCollection(LocalCallingIdentity callingIdentity, int uriType, in hasAccessToCollection()
148 public static boolean hasUserSelectedAccess(@NonNull LocalCallingIdentity callingIdentity, in hasUserSelectedAccess()
183 @NonNull LocalCallingIdentity callingIdentity, int uriType) { in getWhereForUserSelectedAccess()
218 @NonNull LocalCallingIdentity callingIdentity, int uriType) { in getWhereForLatestSelection()
269 @NonNull LocalCallingIdentity callingIdentity, int uriType, in getWhereForConstrainedAccess()
377 private static boolean shouldAllowLegacyWrite(LocalCallingIdentity callingIdentity, in shouldAllowLegacyWrite()
386 public static String getWhereForOwnerPackageMatch(LocalCallingIdentity callingIdentity) { in getWhereForOwnerPackageMatch()
397 public static String getWhereForUserIdMatch(LocalCallingIdentity callingIdentity) { in getWhereForUserIdMatch()
407 public static boolean isRedactionNeededForPickerUri(LocalCallingIdentity callingIdentity) { in isRedactionNeededForPickerUri()
408 return callingIdentity.hasPermission(LocalCallingIdentity.PERMISSION_IS_REDACTION_NEEDED); in isRedactionNeededForPickerUri()
[all …]
DLocalCallingIdentity.java75 public class LocalCallingIdentity { class
89 private LocalCallingIdentity(Context context, int pid, int uid, UserHandle user, in LocalCallingIdentity() method in LocalCallingIdentity
111 public static LocalCallingIdentity fromBinder(Context context, ContentProvider provider, in fromBinder()
148 return new LocalCallingIdentity(context, Binder.getCallingPid(), binderUid, in fromBinder()
152 public static LocalCallingIdentity fromExternal(Context context, @Nullable UserCache userCache, in fromExternal()
158 LocalCallingIdentity ident = fromExternal(context, userCache, uid, sharedPackageNames[0], in fromExternal()
173 public static LocalCallingIdentity fromExternal(Context context, @Nullable UserCache userCache, in fromExternal()
184 return new LocalCallingIdentity(context, -1, uid, user, packageName, attributionTag); in fromExternal()
187 public static LocalCallingIdentity fromSelf(Context context) { in fromSelf()
191 public static LocalCallingIdentity fromSelfAsUser(Context context, UserHandle user) { in fromSelfAsUser()
[all …]
DMediaProvider.java68 import static com.android.providers.media.LocalCallingIdentity.APPOP_REQUEST_INSTALL_PACKAGES_FOR_S…
69 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_ACCESS_MTP;
70 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_INSTALL_PACKAGES;
71 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_DELEGATOR;
72 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_LEGACY_GRANTED;
73 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_LEGACY_READ;
74 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_LEGACY_WRITE;
75 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_MANAGER;
76 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_REDACTION_NEEDED;
77 import static com.android.providers.media.LocalCallingIdentity.PERMISSION_IS_SELF;
[all …]
DPickerUriResolver.java131 LocalCallingIdentity localCallingIdentity) in openFile()
156 CancellationSignal signal, LocalCallingIdentity localCallingIdentity, in openTypedAssetFile()
538 LocalCallingIdentity localCallingIdentity) { in checkPermissionForRequireOriginalQueryParam()
DTranscodeHelperImpl.java698 LocalCallingIdentity identity = mMediaProvider.getCachedCallingIdentityForTranscoding(uid); in doesAppNeedTranscoding()
907 LocalCallingIdentity identity, int fileFlags) { in checkManifestSupport()
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/
DPhotoPickerProvider.java43 import com.android.providers.media.LocalCallingIdentity;
106 final LocalCallingIdentity token = mMediaProvider.clearLocalCallingIdentity(); in onOpenPreview()
118 final LocalCallingIdentity token = mMediaProvider.clearLocalCallingIdentity(); in onOpenMedia()