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

Commit c27380d5 authored by Varun Shah's avatar Varun Shah
Browse files

Catch ArrayIndexOutOfBoundsException to avoid system reboots.

A malformed accounts.xml file may cause an ArrayIndexOutOfBoundsException to be thrown, causing infinite system reboots.

Bug: 299170471
Change-Id: I8964751a09c3cdcde51ab9d7075ed255c5236377
Test: atest SyncStorageEngineTest
parent d306aa68
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1754,7 +1754,7 @@ public class SyncStorageEngine {
                    eventType = parser.next();
                    eventType = parser.next();
                } while (eventType != XmlPullParser.END_DOCUMENT);
                } while (eventType != XmlPullParser.END_DOCUMENT);
            }
            }
        } catch (XmlPullParserException e) {
        } catch (XmlPullParserException | ArrayIndexOutOfBoundsException e) {
            Slog.w(TAG, "Error reading accounts", e);
            Slog.w(TAG, "Error reading accounts", e);
            return;
            return;
        } catch (java.io.IOException e) {
        } catch (java.io.IOException e) {