From d5f1a555f2fff12df95fc623fa3d9af623869bcb Mon Sep 17 00:00:00 2001 From: Zheng Zhang Date: Tue, 18 Apr 2017 18:16:33 -0700 Subject: [PATCH] DO NOT MERGE ANYWHERE: Move content from verison 123 to 122, and skip verison 123. HFP profile config landed late in Emerald development, and was committed as version 122 there. When it merged to master, there were conflicts since 122 was already taken, so it was resolved as version 123. We didn't catch the subtle bug then: This means Emerald devices will reset HFP profile config in error once they upgrade to Feldspar. Correct this by merging 122, and making 123 a no-op. Bug: 37338202 Change-Id: Ibf4c824d27300641fd1bb15f5884baf056bd8d7e --- .../android/providers/settings/SettingsProvider.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index fec33a270868d..ed97633a35c02 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -2276,15 +2276,21 @@ public class SettingsProvider extends ContentProvider { SettingsState.SYSTEM_PACKAGE_NAME); } } - currentVersion = 123; - } - if (currentVersion == 123) { + // Those content is moved from version 123, only for F, ref: b/37338202. final SettingsState globalSettings = getGlobalSettingsLocked(); String defaultDisabledProfiles = (getContext().getResources().getString( R.string.def_bluetooth_disabled_profiles)); globalSettings.insertSettingLocked(Settings.Global.BLUETOOTH_DISABLED_PROFILES, defaultDisabledProfiles, SettingsState.SYSTEM_PACKAGE_NAME); + + currentVersion = 124; + } + + if (currentVersion == 123) { + // Due to merge resolution, the version 123's content on Emerald is in version + // 122. If keep the content in version 123, OTA from E to F would reset the HFP + // config, ref: b/37338202. So we need skip version 123 on F, and only on F. currentVersion = 124; }