mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-25 20:54:32 +00:00
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:
@@ -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" />
|
||||||
@@ -133,4 +131,4 @@
|
|||||||
android:authorities="com.googlecode.eyesfree.espeak.providers.SettingsProvider" />
|
android:authorities="com.googlecode.eyesfree.espeak.providers.SettingsProvider" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -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>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user