OSDN Git Service

Handle mnc 00 while retrieving the Resources based on subid
authorSandeep Gutta <sangutta@codeaurora.org>
Mon, 7 Mar 2016 07:54:56 +0000 (13:24 +0530)
committerRobert Greenwalt <rgreenwalt@google.com>
Fri, 15 Apr 2016 22:46:09 +0000 (22:46 +0000)
Since mnc 00 is represented as undefined it needs to be replaced
with MNC_ZERO 0xffff for retrieving proper resources.

bug:28219719
Change-Id: I7e1630c2f5c31959306d862b10e7987bb449ea9f

telephony/java/android/telephony/SubscriptionManager.java

index ff8c71c..f3b0ce2 100644 (file)
@@ -1347,6 +1347,7 @@ public class SubscriptionManager {
         if (subInfo != null) {
             newConfig.mcc = subInfo.getMcc();
             newConfig.mnc = subInfo.getMnc();
+            if (newConfig.mnc == 0) newConfig.mnc = Configuration.MNC_ZERO;
         }
         DisplayMetrics metrics = context.getResources().getDisplayMetrics();
         DisplayMetrics newMetrics = new DisplayMetrics();