summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-11-03 19:55:11 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-11-03 19:55:11 +0000
commitc4e700b410798a8c0edab0b0bb86f754efc3a5f8 (patch)
tree1a54bd17b1e996d45e3c74a5bb07dd0be36da8d9
parenta03f25d5d97c201bee3688c2f3ff22928885b119 (diff)
parent5f6e3d2b4de4291f0585a1c6d3120aa3fe2e0306 (diff)
downloadbase-nougat-mr2-release.tar.gz
Merge cherrypicks of [3166006, 3165952, 3164925, 3164926, 3164927, 3164928, 3167313, 3167314, 3167315, 3167316, 3167317, 3167318, 3167319, 3167320, 3167321, 3167322, 3166318, 3166319, 3166320, 3166321, 3166322, 3166323, 3166324, 3167333, 3167334, 3167373, 3165112, 3166325, 3165229, 3165230] into nyc-mr2-releaseandroid-7.1.2_r36nougat-mr2-release
Change-Id: I546b4167d7871ddcbec026be06cd4d1a456a65d6
-rw-r--r--core/jni/android/graphics/BitmapFactory.cpp3
-rw-r--r--media/jni/android_media_ExifInterface.cpp3
-rw-r--r--services/core/java/com/android/server/accounts/AccountManagerService.java4
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();