diff options
-rw-r--r-- | core/jni/android/graphics/BitmapFactory.cpp | 3 | ||||
-rw-r--r-- | media/jni/android_media_ExifInterface.cpp | 3 | ||||
-rw-r--r-- | services/core/java/com/android/server/accounts/AccountManagerService.java | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp index 4001283c4c66..0a143610ebd7 100644 --- a/core/jni/android/graphics/BitmapFactory.cpp +++ b/core/jni/android/graphics/BitmapFactory.cpp @@ -587,8 +587,7 @@ static jobject nativeDecodeFileDescriptor(JNIEnv* env, jobject clazz, jobject fi return nullObjectReturn("Could not open file"); } - std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file, - SkFILEStream::kCallerPasses_Ownership)); + std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file)); // If there is no offset for the file descriptor, we use SkFILEStream directly. if (::lseek(descriptor, 0, SEEK_CUR) == 0) { diff --git a/media/jni/android_media_ExifInterface.cpp b/media/jni/android_media_ExifInterface.cpp index 731deae14603..20f9ef6d6a49 100644 --- a/media/jni/android_media_ExifInterface.cpp +++ b/media/jni/android_media_ExifInterface.cpp @@ -390,8 +390,7 @@ static jobject ExifInterface_getRawAttributesFromFileDescriptor( // Rewind the file descriptor. fseek(file, 0L, SEEK_SET); - std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file, - SkFILEStream::kCallerPasses_Ownership)); + std::unique_ptr<SkFILEStream> fileStream(new SkFILEStream(file)); return getRawAttributes(env, fileStream.get(), false); } diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index a7a79cd5b3eb..a085b716bd8d 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -4184,6 +4184,10 @@ public class AccountManagerService protected void checkKeyIntent( int authUid, Intent intent) throws SecurityException { + intent.setFlags(intent.getFlags() & ~(Intent.FLAG_GRANT_READ_URI_PERMISSION + | Intent.FLAG_GRANT_WRITE_URI_PERMISSION + | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION + | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION)); long bid = Binder.clearCallingIdentity(); try { PackageManager pm = mContext.getPackageManager(); |