]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Merge pull request #18 from naofum/master
authorReimar Döffinger <rdoeffinger@users.noreply.github.com>
Wed, 16 Dec 2015 20:11:52 +0000 (21:11 +0100)
committerReimar Döffinger <rdoeffinger@users.noreply.github.com>
Wed, 16 Dec 2015 20:11:52 +0000 (21:11 +0100)
Added japanese translation

src/com/hughes/android/dictionary/DictionaryManagerActivity.java

index 6c701cea0ddd4babbb7d9ad5717b1e20eef80bd8..159a7f0abf5037a9516e65e6bf4536c8ee4411f0 100644 (file)
@@ -637,7 +637,12 @@ public class DictionaryManagerActivity extends ActionBarActivity {
                     .getName();
             Log.d(LOG, "Downloading to: " + destFile);
 
-            request.setDestinationInExternalFilesDir(getApplicationContext(), null, destFile);
+            try {
+                request.setDestinationInExternalFilesDir(getApplicationContext(), null, destFile);
+            } catch (IllegalStateException e) {
+                request.setDestinationUri(Uri.fromFile(new File(Environment
+                        .getExternalStorageDirectory(), destFile)));
+            }
         } catch (MalformedURLException e) {
             throw new RuntimeException(e);
         }