From 8f2ea37c7a1ed6a05ab60e996f07c9edb9bddef5 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Fri, 14 Dec 2012 09:07:26 +0000 Subject: [PATCH] Remove cleanup of the legacy directory as this port does not have a legacy directory; removes the need for the WRITE_EXTERNAL_STORAGE permission. --- android/AndroidManifest.xml | 4 +--- .../eyesfree/espeak/DownloadVoiceData.java | 16 ---------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 8ed62cb7..b148d86d 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -4,8 +4,6 @@ android:versionCode="7" android:versionName="1.46.02_r7" > - - @@ -133,4 +131,4 @@ android:authorities="com.googlecode.eyesfree.espeak.providers.SettingsProvider" /> - \ No newline at end of file + diff --git a/android/src/com/googlecode/eyesfree/espeak/DownloadVoiceData.java b/android/src/com/googlecode/eyesfree/espeak/DownloadVoiceData.java index a8a92700..38eefe94 100755 --- a/android/src/com/googlecode/eyesfree/espeak/DownloadVoiceData.java +++ b/android/src/com/googlecode/eyesfree/espeak/DownloadVoiceData.java @@ -21,7 +21,6 @@ import android.content.Context; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; -import android.os.Environment; import android.view.accessibility.AccessibilityEvent; import java.io.BufferedInputStream; @@ -36,9 +35,6 @@ import java.util.zip.ZipInputStream; public class DownloadVoiceData extends Activity { public static final String BROADCAST_LANGUAGES_UPDATED = "com.googlecode.eyesfree.espeak.LANGUAGES_UPDATED"; - private static final File LEGACY_DATA = new File( - Environment.getExternalStorageDirectory(), "espeak-data"); - private AsyncExtract mAsyncExtract; @Override @@ -75,7 +71,6 @@ public class DownloadVoiceData extends Activity { case RESULT_OK: final Intent intent = new Intent(BROADCAST_LANGUAGES_UPDATED); sendBroadcast(intent); - new AsyncCleanup().execute(LEGACY_DATA); break; case RESULT_CANCELED: // Do nothing? @@ -102,17 +97,6 @@ public class DownloadVoiceData extends Activity { } } - private static class AsyncCleanup extends AsyncTask { - @Override - protected Void doInBackground(File... params) { - for (File directory : params) { - clearContents(directory); - } - - return null; - } - } - private static class AsyncExtract extends AsyncTask { private final LinkedList mExtractedFiles = new LinkedList();