Bump overlay version number.

Forces the overlays.xml file to be ignored and overwritten,
which makes the default overlay be used in all cases, rather
than no overlay.

Fixes: 37788042
Test: manual, removed some overlays in an update and observed that
the proper overlay was used.

Change-Id: Ieda4485f3e64ae627476e1fdcfc5af6cdcca0c15
This commit is contained in:
Andrew Sapperstein
2017-05-22 12:46:51 -07:00
parent 54ddf4a4e2
commit 5e1953a74e

View File

@@ -319,7 +319,7 @@ final class OverlayManagerSettings {
private static final String ATTR_USER_ID = "userId";
private static final String ATTR_VERSION = "version";
private static final int CURRENT_VERSION = 2;
private static final int CURRENT_VERSION = 3;
public static void restore(@NonNull final ArrayList<SettingsItem> table,
@NonNull final InputStream is) throws IOException, XmlPullParserException {
@@ -350,6 +350,7 @@ final class OverlayManagerSettings {
switch (oldVersion) {
case 0:
case 1:
case 2:
// Throw an exception which will cause the overlay file to be ignored
// and overwritten.
throw new XmlPullParserException("old version " + oldVersion + "; ignoring");