From 5e1953a74ed8f2fe11ee4e7807b1859bf1e30c3f Mon Sep 17 00:00:00 2001 From: Andrew Sapperstein Date: Mon, 22 May 2017 12:46:51 -0700 Subject: [PATCH] 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 --- .../java/com/android/server/om/OverlayManagerSettings.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/om/OverlayManagerSettings.java b/services/core/java/com/android/server/om/OverlayManagerSettings.java index 353b710138ae2..c059b37847432 100644 --- a/services/core/java/com/android/server/om/OverlayManagerSettings.java +++ b/services/core/java/com/android/server/om/OverlayManagerSettings.java @@ -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 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");