summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2013-04-05 21:52:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-05 21:52:40 +0000
commita1ca6faceed2eb8fba81bd7e30b3a5bae82cd484 (patch)
tree67f10a67f8c7b41e26db894b8530c6a26f150a1b
parentbdb706e48d71af498156efbb10d0f0c1fcef8878 (diff)
parentaa3c81e49791429a92282c752c89575cf5c01cb6 (diff)
downloadframeworks_base-a1ca6faceed2eb8fba81bd7e30b3a5bae82cd484.zip
frameworks_base-a1ca6faceed2eb8fba81bd7e30b3a5bae82cd484.tar.gz
frameworks_base-a1ca6faceed2eb8fba81bd7e30b3a5bae82cd484.tar.bz2
Merge "Fix crash in ConfigUpdater when the target dir doesn't exist." into jb-mr2-dev
-rw-r--r--services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java b/services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java
index d603cfa..c94f7c1 100644
--- a/services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java
+++ b/services/java/com/android/server/updates/ConfigUpdateInstallReceiver.java
@@ -226,8 +226,6 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver {
FileOutputStream out = null;
File tmp = null;
try {
- // create the temporary file
- tmp = File.createTempFile("journal", "", dir);
// create the parents for the destination file
File parent = file.getParentFile();
parent.mkdirs();
@@ -235,6 +233,8 @@ public class ConfigUpdateInstallReceiver extends BroadcastReceiver {
if (!parent.exists()) {
throw new IOException("Failed to create directory " + parent.getCanonicalPath());
}
+ // create the temporary file
+ tmp = File.createTempFile("journal", "", dir);
// mark tmp -rw-r--r--
tmp.setReadable(true, false);
// write to it