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

Commit 359eb911 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Automerger Merge Worker
Browse files

Merge "Fix bug that getBaseBandVersion() may write the value incorrectly."...

Merge "Fix bug that getBaseBandVersion() may write the value incorrectly." into rvc-dev am: b7efa560 am: 084cc767 am: 21592eb0

Change-Id: Id23626ae6bd5ff500b877dee0f0db140032972f8
parents 9ff6baa7 21592eb0
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -9862,22 +9862,6 @@ public class TelephonyManager {
        return getBasebandVersionForPhone(phoneId);
    }

    /**
     * Get baseband version for the default phone using the legacy approach.
     * This change was added in P, to ensure backward compatiblity.
     *
     * @return baseband version.
     * @hide
     */
    private String getBasebandVersionLegacy(int phoneId) {
        if (SubscriptionManager.isValidPhoneId(phoneId)) {
            String prop = "gsm.version.baseband"
                    + ((phoneId == 0) ? "" : Integer.toString(phoneId));
            return SystemProperties.get(prop);
        }
        return null;
    }

    /**
     * Get baseband version by phone id.
     *
@@ -9885,10 +9869,6 @@ public class TelephonyManager {
     * @hide
     */
    public String getBasebandVersionForPhone(int phoneId) {
        String version = getBasebandVersionLegacy(phoneId);
        if (version != null && !version.isEmpty()) {
            setBasebandVersionForPhone(phoneId, version);
        }
        return getTelephonyProperty(phoneId, TelephonyProperties.baseband_version(), "");
    }