Add missing compatibility check for older android versions.

This commit is contained in:
Beqa Gozalishvili
2022-10-28 19:27:01 +04:00
parent 7d6deaf35b
commit e36b3d9499
@@ -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();
}