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

Commit 26a473ac authored by guojiaxin6's avatar guojiaxin6 Committed by Song Chun Fan
Browse files

[Bugfix]Catch the IllegalArgumentException at the upper layer.

During MTBF testing, an uncaught IllegalArgumentException thrown by the lower-layer components triggers a system recovery (reboot into recovery mode).
IllegalArgumentException is the superclass of NumberFormatException;  thus, catching IllegalArgumentException inherently covers all its subclasses.

FLAG: EXEMPT bug fix
Bug:420344546
Test:See the bug's reproduce steps.
(cherry picked from https://partner-android-review.googlesource.com/q/commit:b75a15ce2614b13dc76aca1869e7d3782677dfb0)
Merged-In: I789286dfb26c2d8f676a7535c99c1dab1a930481
Change-Id: I789286dfb26c2d8f676a7535c99c1dab1a930481
parent bf6fdf73
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1495,7 +1495,7 @@ public class SettingsState {
            TypedXmlPullParser parser = Xml.resolvePullParser(in);
            parseStateLocked(parser);
            return true;
        } catch (XmlPullParserException | IOException | NumberFormatException e) {
        } catch (XmlPullParserException | IOException | IllegalArgumentException e) {
            Slog.e(LOG_TAG, "parse settings xml failed", e);
            return false;
        } finally {