diff options
| author | 2020-03-19 15:46:00 -0700 | |
|---|---|---|
| committer | 2020-03-19 15:50:44 -0700 | |
| commit | 2bdc9c1fc9e2e519b29e62302e0265c1ac20b62c (patch) | |
| tree | fffdcbb3ccd695c6add82678227d1b75c9a994bb | |
| parent | 8a25d0fa42233af69ef5762e7466eca94eee050f (diff) | |
Fix bug that getBaseBandVersion() may write the value incorrectly.
getBaseBandVersion tries to get value from a legacy API and rewrites it
back. However the read value is the full list but the write is to a
specific phone, causing the list to grow unexpectedly.
Bug: 149342541
Test: manual - using test app, call API and check result.
Change-Id: I78b0443c5e38a30010796fcb69f01a8c7ebaf160
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 20 | 
1 files changed, 0 insertions, 20 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4ae9320e6cd2..2cf2de64d771 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -9859,32 +9859,12 @@ public class TelephonyManager {      }      /** -     * 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.       *       * @return baseband version.       * @hide       */      public String getBasebandVersionForPhone(int phoneId) { -        String version = getBasebandVersionLegacy(phoneId); -        if (version != null && !version.isEmpty()) { -            setBasebandVersionForPhone(phoneId, version); -        }          return getTelephonyProperty(phoneId, TelephonyProperties.baseband_version(), "");      }  |