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.
This commit is contained in:
Alexander Epaneshnikov
2022-10-28 18:48:36 +03:00
committed by GitHub
@@ -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();
}