Remove cleanup of the legacy directory as this port does not have a legacy directory; removes the need for the WRITE_EXTERNAL_STORAGE permission.

This commit is contained in:
Reece H. Dunn
2012-12-14 09:07:26 +00:00
parent 5998278dda
commit 8f2ea37c7a
2 changed files with 1 additions and 19 deletions
-2
View File
@@ -4,8 +4,6 @@
android:versionCode="7" android:versionCode="7"
android:versionName="1.46.02_r7" > android:versionName="1.46.02_r7" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature <uses-feature
android:name="android.hardware.touchscreen" android:name="android.hardware.touchscreen"
android:required="false" /> android:required="false" />
@@ -21,7 +21,6 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment;
import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityEvent;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
@@ -36,9 +35,6 @@ import java.util.zip.ZipInputStream;
public class DownloadVoiceData extends Activity { public class DownloadVoiceData extends Activity {
public static final String BROADCAST_LANGUAGES_UPDATED = "com.googlecode.eyesfree.espeak.LANGUAGES_UPDATED"; 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; private AsyncExtract mAsyncExtract;
@Override @Override
@@ -75,7 +71,6 @@ public class DownloadVoiceData extends Activity {
case RESULT_OK: case RESULT_OK:
final Intent intent = new Intent(BROADCAST_LANGUAGES_UPDATED); final Intent intent = new Intent(BROADCAST_LANGUAGES_UPDATED);
sendBroadcast(intent); sendBroadcast(intent);
new AsyncCleanup().execute(LEGACY_DATA);
break; break;
case RESULT_CANCELED: case RESULT_CANCELED:
// Do nothing? // Do nothing?
@@ -102,17 +97,6 @@ public class DownloadVoiceData extends Activity {
} }
} }
private static class AsyncCleanup extends AsyncTask<File, Void, Void> {
@Override
protected Void doInBackground(File... params) {
for (File directory : params) {
clearContents(directory);
}
return null;
}
}
private static class AsyncExtract extends AsyncTask<Void, Void, Integer> { private static class AsyncExtract extends AsyncTask<Void, Void, Integer> {
private final LinkedList<File> mExtractedFiles = new LinkedList<File>(); private final LinkedList<File> mExtractedFiles = new LinkedList<File>();