Browse Source

Add missing compatibility check for older android versions. (#1472)

Note: this doesn't fix actual problem for some of the older devices.
Unfortunately i don't have devices with os version below than android 7,
so am not able to test.
master
Alexander Epaneshnikov 2 years ago
parent
commit
b38f563af8
No account linked to committer's email address
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      android/src/com/reecedunn/espeak/TtsService.java

+ 2
- 1
android/src/com/reecedunn/espeak/TtsService.java View File

@@ -76,7 +76,8 @@ public class TtsService extends TextToSpeechService {
@Override
public void onCreate() {
storageContext = EspeakApp.getStorageContext();
storageContext.moveSharedPreferencesFrom(this, this.getPackageName() + "_preferences");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
storageContext.moveSharedPreferencesFrom(this, this.getPackageName() + "_preferences");
initializeTtsEngine();
super.onCreate();
}

Loading…
Cancel
Save