diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-04 00:21:59 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-04 00:21:59 +0200 |
commit | c2ca841ac98205b148655d9a6891f1c34b2337bc (patch) | |
tree | 215c4fbf78e8520f947c16115ceedbd9e30b73c4 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java | |
parent | 80ed3464f4b3291e4c3402b2db8e78c16535274c (diff) | |
parent | d4f2d3842b0a9e5611657ed1889154a950becc19 (diff) | |
download | open-keychain-c2ca841ac98205b148655d9a6891f1c34b2337bc.tar.gz open-keychain-c2ca841ac98205b148655d9a6891f1c34b2337bc.tar.bz2 open-keychain-c2ca841ac98205b148655d9a6891f1c34b2337bc.zip |
Merge pull request #728 from mar-v-in/improve-file-more
Improve file encrypt
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java index e70b134aa..181470757 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/KeychainApplication.java @@ -28,10 +28,10 @@ import android.os.Environment; import org.spongycastle.jce.provider.BouncyCastleProvider; import org.sufficientlysecure.keychain.helper.Preferences; import org.sufficientlysecure.keychain.helper.TlsHelper; +import org.sufficientlysecure.keychain.provider.TemporaryStorageProvider; import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.PRNGFixes; -import java.io.File; import java.security.Provider; import java.security.Security; @@ -73,8 +73,7 @@ public class KeychainApplication extends Application { // Create APG directory on sdcard if not existing if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { - File dir = new File(Constants.Path.APP_DIR); - if (!dir.exists() && !dir.mkdirs()) { + if (!Constants.Path.APP_DIR.exists() && !Constants.Path.APP_DIR.mkdirs()) { // ignore this for now, it's not crucial // that the directory doesn't exist at this point } @@ -89,6 +88,8 @@ public class KeychainApplication extends Application { Preferences.getPreferences(this).updateKeyServers(); TlsHelper.addStaticCA("pool.sks-keyservers.net", getAssets(), "sks-keyservers.netCA.cer"); + + TemporaryStorageProvider.cleanUp(this); } public static void setupAccountAsNeeded(Context context) { |