summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-04-23 11:58:26 -0700
committerSvet Ganov <svetoslavganov@google.com>2015-04-23 11:58:26 -0700
commite723e54650c5ace8beb47bc4d3c493e276e65d91 (patch)
tree82f1d2749ccfc259e38f4bb0cd440a38ab338246 /packages/SettingsProvider
parent7271f3e4cb516c410358f12215578aeafc7e6dcf (diff)
downloadframeworks_base-e723e54650c5ace8beb47bc4d3c493e276e65d91.zip
frameworks_base-e723e54650c5ace8beb47bc4d3c493e276e65d91.tar.gz
frameworks_base-e723e54650c5ace8beb47bc4d3c493e276e65d91.tar.bz2
Revert some unnecessary changes in handling XML read
Change-Id: I3bbbc3159930d80e2e1f28fa9c0035ae5029d4b8
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index 0385d1e..8d99a64 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -387,6 +387,7 @@ final class SettingsState {
} 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);
}
@@ -408,10 +409,9 @@ final class SettingsState {
parser.setInput(in, null);
parseStateLocked(parser);
- // Any error while parsing is fatal.
- } catch (Throwable t) {
+ } catch (XmlPullParserException | IOException e) {
throw new IllegalStateException("Failed parsing settings file: "
- + mStatePersistFile , t);
+ + mStatePersistFile , e);
} finally {
IoUtils.closeQuietly(in);
}