Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41f3c49c authored by Svetoslav's avatar Svetoslav Committed by Svetoslav Ganov
Browse files

Don't crash if cannot persist settings

bug:23569962

Change-Id: I19fd7d37b6de251696d119cfc33e87e9743b2029
parent b96bccf9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -392,12 +392,9 @@ final class SettingsState {
            if (DEBUG_PERSISTENCE) {
                Slog.i(LOG_TAG, "[PERSIST END]");
            }

            // Any error while writing is fatal.
        } catch (Throwable t) {
            Slog.wtf(LOG_TAG, "Failed to write settings, restoring backup", t);
            destination.failWrite(out);
            throw new IllegalStateException("Failed to write settings, restoring backup", t);
        } finally {
            IoUtils.closeQuietly(out);
        }