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

Commit 8407fbe4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add a comment explaining overlays.xml versioning" into main

parents 9edef231 1f71360f
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -535,6 +535,12 @@ final class OverlayManagerSettings {
            }
            }
        }
        }


        // NOTE: when upgrading the overlays.xml version, ignoring the old state used to be fine,
        // as all important overlays used to be immutable. Now (starting with version 3), there are
        // mutable overlays that capture the system configuration (e.g. 3-button navigation mode),
        // and ignoring the old version is wrong.
        // So for any new version of the serialized format one is supposed to write the code that
        // converts it, instead of throwing an exception and ignoring the whole file.
        private static void upgrade(int oldVersion) throws XmlPullParserException {
        private static void upgrade(int oldVersion) throws XmlPullParserException {
            switch (oldVersion) {
            switch (oldVersion) {
                case 0:
                case 0: