Support installing the voices if the voice data signature has changed.

This commit is contained in:
Reece H. Dunn
2012-12-23 14:15:44 +00:00
parent 16afab6349
commit 9f2293221d
5 changed files with 49 additions and 3 deletions
@@ -173,6 +173,15 @@ public class DownloadVoiceData extends Activity {
// Make sure the output file is readable.
doChmod(outputFile);
}
final String version = CheckVoiceData.readContent(mContext.getResources().openRawResource(R.raw.espeakdata_version));
final File outputFile = new File(mOutput, "espeak-data/version");
mExtractedFiles.add(outputFile);
final FileOutputStream outputStream = new FileOutputStream(outputFile);
outputStream.write(version.getBytes(), 0, version.length());
outputStream.close();
doChmod(outputFile);
}
private void removeExtractedFiles() {