summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 02:15:16 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-13 02:15:16 +0100
commit31195e2fc571ae77d4b71e4167c04ba82aaac740 (patch)
treef16f5a1e4ed9eb418773381e447b5567a31b4ed7
parentae08d65dc25290d8d411ff44d7eb07f4cb74e8c6 (diff)
parent596ffb80bb55a91f80a029c947d09f0911c616a3 (diff)
downloadframeworks_base-31195e2fc571ae77d4b71e4167c04ba82aaac740.zip
frameworks_base-31195e2fc571ae77d4b71e4167c04ba82aaac740.tar.gz
frameworks_base-31195e2fc571ae77d4b71e4167c04ba82aaac740.tar.bz2
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_frameworks_base into replicant-6.0
-rw-r--r--media/java/android/media/ExifInterface.java4
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java25
2 files changed, 19 insertions, 10 deletions
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index a2ccdc8..bb75547 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -1335,8 +1335,9 @@ public class ExifInterface {
for (int i = 0; i < EXIF_TAGS.length; ++i) {
mAttributes[i] = new HashMap();
}
+ InputStream in = null;
try {
- InputStream in = new FileInputStream(mFilename);
+ in = new FileInputStream(mFilename);
getJpegAttributes(in);
mIsSupportedFile = true;
} catch (IOException e) {
@@ -1349,6 +1350,7 @@ public class ExifInterface {
if (DEBUG) {
printAttributes();
}
+ IoUtils.closeQuietly(in);
}
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 30f35af..23f34e6 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -1030,6 +1030,7 @@ public final class ActivityManagerService extends ActivityManagerNative
* For example, references to the commonly used services.
*/
HashMap<String, IBinder> mAppBindArgs;
+ HashMap<String, IBinder> mIsolatedAppBindArgs;
/**
* Temporary to avoid allocations. Protected by main lock.
@@ -2831,18 +2832,24 @@ public final class ActivityManagerService extends ActivityManagerNative
* lazily setup to make sure the services are running when they're asked for.
*/
private HashMap<String, IBinder> getCommonServicesLocked(boolean isolated) {
+ // Isolated processes won't get this optimization, so that we don't
+ // violate the rules about which services they have access to.
+ if (isolated) {
+ if (mIsolatedAppBindArgs == null) {
+ mIsolatedAppBindArgs = new HashMap<>();
+ mIsolatedAppBindArgs.put("package", ServiceManager.getService("package"));
+ }
+ return mIsolatedAppBindArgs;
+ }
+
if (mAppBindArgs == null) {
mAppBindArgs = new HashMap<>();
- // Isolated processes won't get this optimization, so that we don't
- // violate the rules about which services they have access to.
- if (!isolated) {
- // Setup the application init args
- mAppBindArgs.put("package", ServiceManager.getService("package"));
- mAppBindArgs.put("window", ServiceManager.getService("window"));
- mAppBindArgs.put(Context.ALARM_SERVICE,
- ServiceManager.getService(Context.ALARM_SERVICE));
- }
+ // Setup the application init args
+ mAppBindArgs.put("package", ServiceManager.getService("package"));
+ mAppBindArgs.put("window", ServiceManager.getService("window"));
+ mAppBindArgs.put(Context.ALARM_SERVICE,
+ ServiceManager.getService(Context.ALARM_SERVICE));
}
return mAppBindArgs;
}