Browse Source

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

master
Reece H. Dunn 12 years ago
parent
commit
8f2ea37c7a

+ 1
- 3
android/AndroidManifest.xml View File

@@ -4,8 +4,6 @@
android:versionCode="7"
android:versionName="1.46.02_r7" >

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
@@ -133,4 +131,4 @@
android:authorities="com.googlecode.eyesfree.espeak.providers.SettingsProvider" />
</application>

</manifest>
</manifest>

+ 0
- 16
android/src/com/googlecode/eyesfree/espeak/DownloadVoiceData.java View File

@@ -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<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 final LinkedList<File> mExtractedFiles = new LinkedList<File>();


Loading…
Cancel
Save