diff --git a/app/src/main/java/me/timschneeberger/rootlessjamesdsp/utils/ProfileManager.kt b/app/src/main/java/me/timschneeberger/rootlessjamesdsp/utils/ProfileManager.kt index 69dcfbad9..65c8fced2 100644 --- a/app/src/main/java/me/timschneeberger/rootlessjamesdsp/utils/ProfileManager.kt +++ b/app/src/main/java/me/timschneeberger/rootlessjamesdsp/utils/ProfileManager.kt @@ -123,6 +123,10 @@ class ProfileManager : BroadcastReceiver(), RoutingObserver.RoutingChangedCallba Timber.e("Illegal state: preset does not exist") Timber.i(ex) } + catch (ex: Exception) { + Timber.e("Preset is corrupted") + Timber.i(ex) + } } } } @@ -155,6 +159,11 @@ class ProfileManager : BroadcastReceiver(), RoutingObserver.RoutingChangedCallba Timber.i(ex) context.restoreDspSettings() } + catch (ex: Exception) { + Timber.e("Profile is corrupted") + Timber.i(ex) + context.restoreDspSettings() + } profile.save(File(getProfileDirectory(null), FILE_PROFILE)) }