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

Commit 1f71360f authored by Yurii Zubrytskyi's avatar Yurii Zubrytskyi
Browse files

Add a comment explaining overlays.xml versioning

Fixes: b/400404379
Flag: EXEMPT comment-only change
Change-Id: I022d0e6a96a8579fa3911bf789f355c59a3cfb7d
parent a19e75b3
Loading
Loading
Loading
Loading
+6 −0
Original line number 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 {
            switch (oldVersion) {
                case 0: