Add missing compatibility check for older android versions.

This commit is contained in:
Beqa Gozalishvili
2022-10-30 10:11:44 +02:00
committed by Juho Hiltunen
parent 1bb3109181
commit 5ded10cf93
@@ -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();
}