Android: some fixes (#1501)

- Android: enable debug logs in debug build type
- Android: enable debug in native lib
- Android: remove hardcoded chmod
This commit is contained in:
Alexander Epaneshnikov
2022-11-04 01:23:24 +03:00
committed by GitHub
4 changed files with 1 additions and 15 deletions
-1
View File
@@ -1 +0,0 @@
APP_OPTIM := release
@@ -132,7 +132,6 @@ public class DownloadVoiceData extends Activity {
if (entry.isDirectory()) {
progress.file.mkdirs();
FileUtils.chmod(progress.file);
continue;
}
@@ -149,9 +148,6 @@ public class DownloadVoiceData extends Activity {
outputStream.close();
}
zipStream.closeEntry();
// Make sure the output file is readable.
FileUtils.chmod(progress.file);
}
final String version = FileUtils.read(mContext.getResources().openRawResource(R.raw.espeakdata_version));
@@ -71,15 +71,6 @@ public class FileUtils {
} finally {
outputStream.close();
}
chmod(outputFile);
}
public static void chmod(File file) {
try {
Runtime.getRuntime().exec("/system/bin/chmod 755 " + file.getAbsolutePath());
} catch (IOException e) {
e.printStackTrace();
}
}
public static void rmdir(File directory) {
@@ -63,7 +63,7 @@ public class TtsService extends TextToSpeechService {
private static final String TAG = TtsService.class.getSimpleName();
private static Context storageContext;
private static final boolean DEBUG = false;
private static final boolean DEBUG = BuildConfig.DEBUG;
private SpeechSynthesis mEngine;
private SynthesisCallback mCallback;