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

Commit defe4862 authored by youngtaecha's avatar youngtaecha Committed by Youngtae Cha
Browse files

Report the updated proto version correctly for the first time of updating.

Bug: 390086814
Flag: EXEMPT bugfix
Test: Manually verified if the proto version is reported well when the config data is updated for the first time.(b/390086814#comment3)
Test: Build

Change-Id: I5895f4b1f1f9ee183e165dccd288752ad7f56572
parent f4f49361
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -157,17 +157,19 @@ public class TelephonyConfigUpdateInstallReceiver extends ConfigUpdateInstallRec
            if (getInstance().mConfigParser != null) {
                int updatedVersion = newConfigParser.mVersion;
                int previousVersion = getInstance().mConfigParser.mVersion;
                Log.d(TAG, "previous version is " + previousVersion + " | updated version is "
                        + updatedVersion);
                mConfigUpdaterMetricsStats.setConfigVersion(updatedVersion);
                Log.d(TAG, "previous proto version is " + previousVersion
                        + " | updated proto version is " + updatedVersion);

                if (updatedVersion <= previousVersion) {
                    Log.e(TAG, "updatedVersion is smaller than previousVersion");
                    Log.e(TAG, "updated proto Version [" + updatedVersion
                            + "] is smaller than previous proto Version [" + previousVersion + "]");
                    mConfigUpdaterMetricsStats.reportOemAndCarrierConfigError(
                            SatelliteConstants.CONFIG_UPDATE_RESULT_INVALID_VERSION);
                    return;
                }
            }
            getInstance().mConfigParser = newConfigParser;
            mConfigUpdaterMetricsStats.setConfigVersion(getInstance().mConfigParser.getVersion());
        }

        if (!getInstance().mCallbackHashMap.keySet().isEmpty()) {