From acaf2e8f75a0b8f647bfecf6811c20ab77b59321 Mon Sep 17 00:00:00 2001 From: Alexander Epaneshnikov Date: Mon, 21 Feb 2022 18:10:04 +0300 Subject: [PATCH 1/3] Android: enable debug logs in debug build type --- android/src/com/reecedunn/espeak/TtsService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/com/reecedunn/espeak/TtsService.java b/android/src/com/reecedunn/espeak/TtsService.java index 1af0d9d3..22b9b4e3 100644 --- a/android/src/com/reecedunn/espeak/TtsService.java +++ b/android/src/com/reecedunn/espeak/TtsService.java @@ -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; From 6db277c5edec28b8a70dfdfaef944bd83bd7068a Mon Sep 17 00:00:00 2001 From: Alexander Epaneshnikov Date: Fri, 4 Nov 2022 00:29:50 +0300 Subject: [PATCH 2/3] Android: enable debug in native lib --- android/jni/Application.mk | 1 - 1 file changed, 1 deletion(-) delete mode 100644 android/jni/Application.mk diff --git a/android/jni/Application.mk b/android/jni/Application.mk deleted file mode 100644 index 477f9faf..00000000 --- a/android/jni/Application.mk +++ /dev/null @@ -1 +0,0 @@ -APP_OPTIM := release From 6f41255ed17164d8b3e653388947886a178aec4d Mon Sep 17 00:00:00 2001 From: Alexander Epaneshnikov Date: Fri, 4 Nov 2022 00:30:59 +0300 Subject: [PATCH 3/3] Android: remove hardcoded chmod I don't understand why it was necessary. on some devices, the binary is in a different location. if this is still needed for something, we need to search for chmod binary dynamicly --- android/src/com/reecedunn/espeak/DownloadVoiceData.java | 4 ---- android/src/com/reecedunn/espeak/FileUtils.java | 9 --------- 2 files changed, 13 deletions(-) diff --git a/android/src/com/reecedunn/espeak/DownloadVoiceData.java b/android/src/com/reecedunn/espeak/DownloadVoiceData.java index e5481495..0ad9102c 100644 --- a/android/src/com/reecedunn/espeak/DownloadVoiceData.java +++ b/android/src/com/reecedunn/espeak/DownloadVoiceData.java @@ -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)); diff --git a/android/src/com/reecedunn/espeak/FileUtils.java b/android/src/com/reecedunn/espeak/FileUtils.java index 1f93821d..4ac716fe 100644 --- a/android/src/com/reecedunn/espeak/FileUtils.java +++ b/android/src/com/reecedunn/espeak/FileUtils.java @@ -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) {