• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2006 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.internal.telephony;
18 
19 import android.app.ActivityManagerNative;
20 import android.app.AlarmManager;
21 import android.content.Context;
22 import android.content.res.Configuration;
23 import android.net.wifi.WifiManager;
24 import android.os.RemoteException;
25 import android.os.SystemProperties;
26 import android.text.TextUtils;
27 import android.util.Log;
28 
29 import java.util.ArrayList;
30 import java.util.Collections;
31 import java.util.Locale;
32 import libcore.icu.TimeZones;
33 
34 /**
35  * Mobile Country Code
36  *
37  * {@hide}
38  */
39 public final class MccTable
40 {
41     static final String LOG_TAG = "MccTable";
42 
43     static ArrayList<MccEntry> table;
44 
45     static class MccEntry implements Comparable<MccEntry>
46     {
47         int mcc;
48         String iso;
49         int smallestDigitsMnc;
50         String language;
51 
MccEntry(int mnc, String iso, int smallestDigitsMCC)52         MccEntry(int mnc, String iso, int smallestDigitsMCC) {
53             this(mnc, iso, smallestDigitsMCC, null);
54         }
55 
MccEntry(int mnc, String iso, int smallestDigitsMCC, String language)56         MccEntry(int mnc, String iso, int smallestDigitsMCC, String language) {
57             this.mcc = mnc;
58             this.iso = iso;
59             this.smallestDigitsMnc = smallestDigitsMCC;
60             this.language = language;
61         }
62 
63 
compareTo(MccEntry o)64         public int compareTo(MccEntry o)
65         {
66             return mcc - o.mcc;
67         }
68     }
69 
70     private static MccEntry
entryForMcc(int mcc)71     entryForMcc(int mcc)
72     {
73         int index;
74 
75         MccEntry m;
76 
77         m = new MccEntry(mcc, null, 0);
78 
79         index = Collections.binarySearch(table, m);
80 
81         if (index < 0) {
82             return null;
83         } else {
84             return table.get(index);
85         }
86     }
87 
88     /**
89      * Returns a default time zone ID for the given MCC.
90      * @param mcc Mobile Country Code
91      * @return default TimeZone ID, or null if not specified
92      */
defaultTimeZoneForMcc(int mcc)93     public static String defaultTimeZoneForMcc(int mcc) {
94         MccEntry entry;
95 
96         entry = entryForMcc(mcc);
97         if (entry == null || entry.iso == null) {
98             return null;
99         } else {
100             Locale locale;
101             if (entry.language == null) {
102                 locale = new Locale(entry.iso);
103             } else {
104                 locale = new Locale(entry.language, entry.iso);
105             }
106             String[] tz = TimeZones.forLocale(locale);
107             if (tz.length == 0) return null;
108             return tz[0];
109         }
110     }
111 
112     /**
113      * Given a GSM Mobile Country Code, returns
114      * an ISO two-character country code if available.
115      * Returns "" if unavailable.
116      */
117     public static String
countryCodeForMcc(int mcc)118     countryCodeForMcc(int mcc)
119     {
120         MccEntry entry;
121 
122         entry = entryForMcc(mcc);
123 
124         if (entry == null) {
125             return "";
126         } else {
127             return entry.iso;
128         }
129     }
130 
131     /**
132      * Given a GSM Mobile Country Code, returns
133      * an ISO 2-3 character language code if available.
134      * Returns null if unavailable.
135      */
defaultLanguageForMcc(int mcc)136     public static String defaultLanguageForMcc(int mcc) {
137         MccEntry entry;
138 
139         entry = entryForMcc(mcc);
140 
141         if (entry == null) {
142             return null;
143         } else {
144             return entry.language;
145         }
146     }
147 
148     /**
149      * Given a GSM Mobile Country Code, returns
150      * the smallest number of digits that M if available.
151      * Returns 2 if unavailable.
152      */
153     public static int
smallestDigitsMccForMnc(int mcc)154     smallestDigitsMccForMnc(int mcc)
155     {
156         MccEntry entry;
157 
158         entry = entryForMcc(mcc);
159 
160         if (entry == null) {
161             return 2;
162         } else {
163             return entry.smallestDigitsMnc;
164         }
165     }
166 
167     /**
168      * Updates MCC and MNC device configuration information for application retrieving
169      * correct version of resources.  If either MCC or MNC is 0, they will be ignored (not set).
170      * @param phone PhoneBae to act on.
171      * @param mccmnc truncated imsi with just the MCC and MNC - MNC assumed to be from 4th to end
172      */
updateMccMncConfiguration(PhoneBase phone, String mccmnc)173     public static void updateMccMncConfiguration(PhoneBase phone, String mccmnc) {
174         if (!TextUtils.isEmpty(mccmnc)) {
175             int mcc, mnc;
176 
177             try {
178                 mcc = Integer.parseInt(mccmnc.substring(0,3));
179                 mnc = Integer.parseInt(mccmnc.substring(3));
180             } catch (NumberFormatException e) {
181                 Log.e(LOG_TAG, "Error parsing IMSI");
182                 return;
183             }
184 
185             Log.d(LOG_TAG, "updateMccMncConfiguration: mcc=" + mcc + ", mnc=" + mnc);
186 
187             if (mcc != 0) {
188                 setTimezoneFromMccIfNeeded(phone, mcc);
189                 setLocaleFromMccIfNeeded(phone, mcc);
190                 setWifiCountryCodeFromMcc(phone, mcc);
191             }
192             try {
193                 Configuration config = ActivityManagerNative.getDefault().getConfiguration();
194                 if (mcc != 0) {
195                     config.mcc = mcc;
196                 }
197                 if (mnc != 0) {
198                     config.mnc = mnc;
199                 }
200                 ActivityManagerNative.getDefault().updateConfiguration(config);
201             } catch (RemoteException e) {
202                 Log.e(LOG_TAG, "Can't update configuration", e);
203             }
204         }
205     }
206 
207     /**
208      * If the timezone is not already set, set it based on the MCC of the SIM.
209      * @param phone PhoneBase to act on (get context from).
210      * @param mcc Mobile Country Code of the SIM or SIM-like entity (build prop on CDMA)
211      */
setTimezoneFromMccIfNeeded(PhoneBase phone, int mcc)212     private static void setTimezoneFromMccIfNeeded(PhoneBase phone, int mcc) {
213         String timezone = SystemProperties.get(ServiceStateTracker.TIMEZONE_PROPERTY);
214         if (timezone == null || timezone.length() == 0) {
215             String zoneId = defaultTimeZoneForMcc(mcc);
216             if (zoneId != null && zoneId.length() > 0) {
217                 Context context = phone.getContext();
218                 // Set time zone based on MCC
219                 AlarmManager alarm =
220                         (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
221                 alarm.setTimeZone(zoneId);
222                 Log.d(LOG_TAG, "timezone set to "+zoneId);
223             }
224         }
225     }
226 
227     /**
228      * If the locale is not already set, set it based on the MCC of the SIM.
229      * @param phone PhoneBase to act on.
230      * @param mcc Mobile Country Code of the SIM or SIM-like entity (build prop on CDMA)
231      */
setLocaleFromMccIfNeeded(PhoneBase phone, int mcc)232     private static void setLocaleFromMccIfNeeded(PhoneBase phone, int mcc) {
233         String language = MccTable.defaultLanguageForMcc(mcc);
234         String country = MccTable.countryCodeForMcc(mcc);
235 
236         Log.d(LOG_TAG, "locale set to "+language+"_"+country);
237         phone.setSystemLocale(language, country, true);
238     }
239 
240     /**
241      * If the number of allowed wifi channels has not been set, set it based on
242      * the MCC of the SIM.
243      * @param phone PhoneBase to act on (get context from).
244      * @param mcc Mobile Country Code of the SIM or SIM-like entity (build prop on CDMA)
245      */
setWifiCountryCodeFromMcc(PhoneBase phone, int mcc)246     private static void setWifiCountryCodeFromMcc(PhoneBase phone, int mcc) {
247         String country = MccTable.countryCodeForMcc(mcc);
248         if (!country.isEmpty()) {
249             Context context = phone.getContext();
250             Log.d(LOG_TAG, "WIFI_COUNTRY_CODE set to " + country);
251             WifiManager wM = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
252             //persist
253             wM.setCountryCode(country, true);
254         }
255     }
256 
257     static {
258         table = new ArrayList<MccEntry>(240);
259 
260 
261         /*
262          * The table below is built from two resources:
263          *
264          * 1) ITU "Mobile Network Code (MNC) for the international
265          *   identification plan for mobile terminals and mobile users"
266          *   which is available as an annex to the ITU operational bulletin
267          *   available here: http://www.itu.int/itu-t/bulletin/annex.html
268          *
269          * 2) The ISO 3166 country codes list, available here:
270          *    http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/index.html
271          *
272          * This table has not been verified.
273          *
274          */
275 
table.add(new MccEntry(202,"gr",2))276 		table.add(new MccEntry(202,"gr",2));	//Greece
table.add(new MccEntry(204,"nl",2,"nl"))277 		table.add(new MccEntry(204,"nl",2,"nl"));	//Netherlands (Kingdom of the)
table.add(new MccEntry(206,"be",2))278 		table.add(new MccEntry(206,"be",2));	//Belgium
table.add(new MccEntry(208,"fr",2,"fr"))279 		table.add(new MccEntry(208,"fr",2,"fr"));	//France
table.add(new MccEntry(212,"mc",2))280 		table.add(new MccEntry(212,"mc",2));	//Monaco (Principality of)
table.add(new MccEntry(213,"ad",2))281 		table.add(new MccEntry(213,"ad",2));	//Andorra (Principality of)
table.add(new MccEntry(214,"es",2,"es"))282 		table.add(new MccEntry(214,"es",2,"es"));	//Spain
table.add(new MccEntry(216,"hu",2))283 		table.add(new MccEntry(216,"hu",2));	//Hungary (Republic of)
table.add(new MccEntry(218,"ba",2))284 		table.add(new MccEntry(218,"ba",2));	//Bosnia and Herzegovina
table.add(new MccEntry(219,"hr",2))285 		table.add(new MccEntry(219,"hr",2));	//Croatia (Republic of)
table.add(new MccEntry(220,"rs",2))286 		table.add(new MccEntry(220,"rs",2));	//Serbia and Montenegro
table.add(new MccEntry(222,"it",2,"it"))287 		table.add(new MccEntry(222,"it",2,"it"));	//Italy
table.add(new MccEntry(225,"va",2,"it"))288 		table.add(new MccEntry(225,"va",2,"it"));	//Vatican City State
table.add(new MccEntry(226,"ro",2))289 		table.add(new MccEntry(226,"ro",2));	//Romania
table.add(new MccEntry(228,"ch",2,"de"))290 		table.add(new MccEntry(228,"ch",2,"de"));	//Switzerland (Confederation of)
table.add(new MccEntry(230,"cz",2,"cs"))291 		table.add(new MccEntry(230,"cz",2,"cs"));	//Czech Republic
table.add(new MccEntry(231,"sk",2))292 		table.add(new MccEntry(231,"sk",2));	//Slovak Republic
table.add(new MccEntry(232,"at",2,"de"))293 		table.add(new MccEntry(232,"at",2,"de"));	//Austria
table.add(new MccEntry(234,"gb",2,"en"))294 		table.add(new MccEntry(234,"gb",2,"en"));	//United Kingdom of Great Britain and Northern Ireland
table.add(new MccEntry(235,"gb",2,"en"))295 		table.add(new MccEntry(235,"gb",2,"en"));	//United Kingdom of Great Britain and Northern Ireland
table.add(new MccEntry(238,"dk",2))296 		table.add(new MccEntry(238,"dk",2));	//Denmark
table.add(new MccEntry(240,"se",2))297 		table.add(new MccEntry(240,"se",2));	//Sweden
table.add(new MccEntry(242,"no",2))298 		table.add(new MccEntry(242,"no",2));	//Norway
table.add(new MccEntry(244,"fi",2))299 		table.add(new MccEntry(244,"fi",2));	//Finland
table.add(new MccEntry(246,"lt",2))300 		table.add(new MccEntry(246,"lt",2));	//Lithuania (Republic of)
table.add(new MccEntry(247,"lv",2))301 		table.add(new MccEntry(247,"lv",2));	//Latvia (Republic of)
table.add(new MccEntry(248,"ee",2))302 		table.add(new MccEntry(248,"ee",2));	//Estonia (Republic of)
table.add(new MccEntry(250,"ru",2))303 		table.add(new MccEntry(250,"ru",2));	//Russian Federation
table.add(new MccEntry(255,"ua",2))304 		table.add(new MccEntry(255,"ua",2));	//Ukraine
table.add(new MccEntry(257,"by",2))305 		table.add(new MccEntry(257,"by",2));	//Belarus (Republic of)
table.add(new MccEntry(259,"md",2))306 		table.add(new MccEntry(259,"md",2));	//Moldova (Republic of)
table.add(new MccEntry(260,"pl",2))307 		table.add(new MccEntry(260,"pl",2));	//Poland (Republic of)
table.add(new MccEntry(262,"de",2,"de"))308 		table.add(new MccEntry(262,"de",2,"de"));	//Germany (Federal Republic of)
table.add(new MccEntry(266,"gi",2))309 		table.add(new MccEntry(266,"gi",2));	//Gibraltar
table.add(new MccEntry(268,"pt",2))310 		table.add(new MccEntry(268,"pt",2));	//Portugal
table.add(new MccEntry(270,"lu",2))311 		table.add(new MccEntry(270,"lu",2));	//Luxembourg
table.add(new MccEntry(272,"ie",2,"en"))312 		table.add(new MccEntry(272,"ie",2,"en"));	//Ireland
table.add(new MccEntry(274,"is",2))313 		table.add(new MccEntry(274,"is",2));	//Iceland
table.add(new MccEntry(276,"al",2))314 		table.add(new MccEntry(276,"al",2));	//Albania (Republic of)
table.add(new MccEntry(278,"mt",2))315 		table.add(new MccEntry(278,"mt",2));	//Malta
table.add(new MccEntry(280,"cy",2))316 		table.add(new MccEntry(280,"cy",2));	//Cyprus (Republic of)
table.add(new MccEntry(282,"ge",2))317 		table.add(new MccEntry(282,"ge",2));	//Georgia
table.add(new MccEntry(283,"am",2))318 		table.add(new MccEntry(283,"am",2));	//Armenia (Republic of)
table.add(new MccEntry(284,"bg",2))319 		table.add(new MccEntry(284,"bg",2));	//Bulgaria (Republic of)
table.add(new MccEntry(286,"tr",2))320 		table.add(new MccEntry(286,"tr",2));	//Turkey
table.add(new MccEntry(288,"fo",2))321 		table.add(new MccEntry(288,"fo",2));	//Faroe Islands
table.add(new MccEntry(289,"ge",2))322                 table.add(new MccEntry(289,"ge",2));    //Abkhazia (Georgia)
table.add(new MccEntry(290,"gl",2))323 		table.add(new MccEntry(290,"gl",2));	//Greenland (Denmark)
table.add(new MccEntry(292,"sm",2))324 		table.add(new MccEntry(292,"sm",2));	//San Marino (Republic of)
table.add(new MccEntry(293,"si",2))325 		table.add(new MccEntry(293,"si",2));	//Slovenia (Republic of)
table.add(new MccEntry(294,"mk",2))326                 table.add(new MccEntry(294,"mk",2));   //The Former Yugoslav Republic of Macedonia
table.add(new MccEntry(295,"li",2))327 		table.add(new MccEntry(295,"li",2));	//Liechtenstein (Principality of)
table.add(new MccEntry(297,"me",2))328                 table.add(new MccEntry(297,"me",2));    //Montenegro (Republic of)
table.add(new MccEntry(302,"ca",3,""))329 		table.add(new MccEntry(302,"ca",3,""));	//Canada
table.add(new MccEntry(308,"pm",2))330 		table.add(new MccEntry(308,"pm",2));	//Saint Pierre and Miquelon (Collectivit territoriale de la Rpublique franaise)
table.add(new MccEntry(310,"us",3,"en"))331 		table.add(new MccEntry(310,"us",3,"en"));	//United States of America
table.add(new MccEntry(311,"us",3,"en"))332 		table.add(new MccEntry(311,"us",3,"en"));	//United States of America
table.add(new MccEntry(312,"us",3,"en"))333 		table.add(new MccEntry(312,"us",3,"en"));	//United States of America
table.add(new MccEntry(313,"us",3,"en"))334 		table.add(new MccEntry(313,"us",3,"en"));	//United States of America
table.add(new MccEntry(314,"us",3,"en"))335 		table.add(new MccEntry(314,"us",3,"en"));	//United States of America
table.add(new MccEntry(315,"us",3,"en"))336 		table.add(new MccEntry(315,"us",3,"en"));	//United States of America
table.add(new MccEntry(316,"us",3,"en"))337 		table.add(new MccEntry(316,"us",3,"en"));	//United States of America
table.add(new MccEntry(330,"pr",2))338 		table.add(new MccEntry(330,"pr",2));	//Puerto Rico
table.add(new MccEntry(332,"vi",2))339 		table.add(new MccEntry(332,"vi",2));	//United States Virgin Islands
table.add(new MccEntry(334,"mx",3))340 		table.add(new MccEntry(334,"mx",3));	//Mexico
table.add(new MccEntry(338,"jm",3))341 		table.add(new MccEntry(338,"jm",3));	//Jamaica
table.add(new MccEntry(340,"gp",2))342 		table.add(new MccEntry(340,"gp",2));	//Guadeloupe (French Department of)
table.add(new MccEntry(342,"bb",3))343 		table.add(new MccEntry(342,"bb",3));	//Barbados
table.add(new MccEntry(344,"ag",3))344 		table.add(new MccEntry(344,"ag",3));	//Antigua and Barbuda
table.add(new MccEntry(346,"ky",3))345 		table.add(new MccEntry(346,"ky",3));	//Cayman Islands
table.add(new MccEntry(348,"vg",3))346 		table.add(new MccEntry(348,"vg",3));	//British Virgin Islands
table.add(new MccEntry(350,"bm",2))347 		table.add(new MccEntry(350,"bm",2));	//Bermuda
table.add(new MccEntry(352,"gd",2))348 		table.add(new MccEntry(352,"gd",2));	//Grenada
table.add(new MccEntry(354,"ms",2))349 		table.add(new MccEntry(354,"ms",2));	//Montserrat
table.add(new MccEntry(356,"kn",2))350 		table.add(new MccEntry(356,"kn",2));	//Saint Kitts and Nevis
table.add(new MccEntry(358,"lc",2))351 		table.add(new MccEntry(358,"lc",2));	//Saint Lucia
table.add(new MccEntry(360,"vc",2))352 		table.add(new MccEntry(360,"vc",2));	//Saint Vincent and the Grenadines
table.add(new MccEntry(362,"nl",2))353 		table.add(new MccEntry(362,"nl",2));	//Netherlands Antilles
table.add(new MccEntry(363,"aw",2))354 		table.add(new MccEntry(363,"aw",2));	//Aruba
table.add(new MccEntry(364,"bs",2))355 		table.add(new MccEntry(364,"bs",2));	//Bahamas (Commonwealth of the)
table.add(new MccEntry(365,"ai",3))356 		table.add(new MccEntry(365,"ai",3));	//Anguilla
table.add(new MccEntry(366,"dm",2))357 		table.add(new MccEntry(366,"dm",2));	//Dominica (Commonwealth of)
table.add(new MccEntry(368,"cu",2))358 		table.add(new MccEntry(368,"cu",2));	//Cuba
table.add(new MccEntry(370,"do",2))359 		table.add(new MccEntry(370,"do",2));	//Dominican Republic
table.add(new MccEntry(372,"ht",2))360 		table.add(new MccEntry(372,"ht",2));	//Haiti (Republic of)
table.add(new MccEntry(374,"tt",2))361 		table.add(new MccEntry(374,"tt",2));	//Trinidad and Tobago
table.add(new MccEntry(376,"tc",2))362 		table.add(new MccEntry(376,"tc",2));	//Turks and Caicos Islands
table.add(new MccEntry(400,"az",2))363 		table.add(new MccEntry(400,"az",2));	//Azerbaijani Republic
table.add(new MccEntry(401,"kz",2))364 		table.add(new MccEntry(401,"kz",2));	//Kazakhstan (Republic of)
table.add(new MccEntry(402,"bt",2))365 		table.add(new MccEntry(402,"bt",2));	//Bhutan (Kingdom of)
table.add(new MccEntry(404,"in",2))366 		table.add(new MccEntry(404,"in",2));	//India (Republic of)
table.add(new MccEntry(405,"in",2))367 		table.add(new MccEntry(405,"in",2));	//India (Republic of)
table.add(new MccEntry(410,"pk",2))368 		table.add(new MccEntry(410,"pk",2));	//Pakistan (Islamic Republic of)
table.add(new MccEntry(412,"af",2))369 		table.add(new MccEntry(412,"af",2));	//Afghanistan
table.add(new MccEntry(413,"lk",2))370 		table.add(new MccEntry(413,"lk",2));	//Sri Lanka (Democratic Socialist Republic of)
table.add(new MccEntry(414,"mm",2))371 		table.add(new MccEntry(414,"mm",2));	//Myanmar (Union of)
table.add(new MccEntry(415,"lb",2))372 		table.add(new MccEntry(415,"lb",2));	//Lebanon
table.add(new MccEntry(416,"jo",2))373 		table.add(new MccEntry(416,"jo",2));	//Jordan (Hashemite Kingdom of)
table.add(new MccEntry(417,"sy",2))374 		table.add(new MccEntry(417,"sy",2));	//Syrian Arab Republic
table.add(new MccEntry(418,"iq",2))375 		table.add(new MccEntry(418,"iq",2));	//Iraq (Republic of)
table.add(new MccEntry(419,"kw",2))376 		table.add(new MccEntry(419,"kw",2));	//Kuwait (State of)
table.add(new MccEntry(420,"sa",2))377 		table.add(new MccEntry(420,"sa",2));	//Saudi Arabia (Kingdom of)
table.add(new MccEntry(421,"ye",2))378 		table.add(new MccEntry(421,"ye",2));	//Yemen (Republic of)
table.add(new MccEntry(422,"om",2))379 		table.add(new MccEntry(422,"om",2));	//Oman (Sultanate of)
table.add(new MccEntry(423,"ps",2))380                 table.add(new MccEntry(423,"ps",2));    //Palestine
table.add(new MccEntry(424,"ae",2))381 		table.add(new MccEntry(424,"ae",2));	//United Arab Emirates
table.add(new MccEntry(425,"il",2))382 		table.add(new MccEntry(425,"il",2));	//Israel (State of)
table.add(new MccEntry(426,"bh",2))383 		table.add(new MccEntry(426,"bh",2));	//Bahrain (Kingdom of)
table.add(new MccEntry(427,"qa",2))384 		table.add(new MccEntry(427,"qa",2));	//Qatar (State of)
table.add(new MccEntry(428,"mn",2))385 		table.add(new MccEntry(428,"mn",2));	//Mongolia
table.add(new MccEntry(429,"np",2))386 		table.add(new MccEntry(429,"np",2));	//Nepal
table.add(new MccEntry(430,"ae",2))387 		table.add(new MccEntry(430,"ae",2));	//United Arab Emirates
table.add(new MccEntry(431,"ae",2))388 		table.add(new MccEntry(431,"ae",2));	//United Arab Emirates
table.add(new MccEntry(432,"ir",2))389 		table.add(new MccEntry(432,"ir",2));	//Iran (Islamic Republic of)
table.add(new MccEntry(434,"uz",2))390 		table.add(new MccEntry(434,"uz",2));	//Uzbekistan (Republic of)
table.add(new MccEntry(436,"tj",2))391 		table.add(new MccEntry(436,"tj",2));	//Tajikistan (Republic of)
table.add(new MccEntry(437,"kg",2))392 		table.add(new MccEntry(437,"kg",2));	//Kyrgyz Republic
table.add(new MccEntry(438,"tm",2))393 		table.add(new MccEntry(438,"tm",2));	//Turkmenistan
table.add(new MccEntry(440,"jp",2,"ja"))394 		table.add(new MccEntry(440,"jp",2,"ja"));	//Japan
table.add(new MccEntry(441,"jp",2,"ja"))395 		table.add(new MccEntry(441,"jp",2,"ja"));	//Japan
table.add(new MccEntry(450,"kr",2,"ko"))396 		table.add(new MccEntry(450,"kr",2,"ko"));	//Korea (Republic of)
table.add(new MccEntry(452,"vn",2))397 		table.add(new MccEntry(452,"vn",2));	//Viet Nam (Socialist Republic of)
table.add(new MccEntry(454,"hk",2))398 		table.add(new MccEntry(454,"hk",2));	//"Hong Kong, China"
table.add(new MccEntry(455,"mo",2))399 		table.add(new MccEntry(455,"mo",2));	//"Macao, China"
table.add(new MccEntry(456,"kh",2))400 		table.add(new MccEntry(456,"kh",2));	//Cambodia (Kingdom of)
table.add(new MccEntry(457,"la",2))401 		table.add(new MccEntry(457,"la",2));	//Lao People's Democratic Republic
table.add(new MccEntry(460,"cn",2,"zh"))402 		table.add(new MccEntry(460,"cn",2,"zh"));	//China (People's Republic of)
table.add(new MccEntry(461,"cn",2,"zh"))403 		table.add(new MccEntry(461,"cn",2,"zh"));	//China (People's Republic of)
table.add(new MccEntry(466,"tw",2))404 		table.add(new MccEntry(466,"tw",2));	//"Taiwan, China"
table.add(new MccEntry(467,"kp",2))405 		table.add(new MccEntry(467,"kp",2));	//Democratic People's Republic of Korea
table.add(new MccEntry(470,"bd",2))406 		table.add(new MccEntry(470,"bd",2));	//Bangladesh (People's Republic of)
table.add(new MccEntry(472,"mv",2))407 		table.add(new MccEntry(472,"mv",2));	//Maldives (Republic of)
table.add(new MccEntry(502,"my",2))408 		table.add(new MccEntry(502,"my",2));	//Malaysia
table.add(new MccEntry(505,"au",2,"en"))409 		table.add(new MccEntry(505,"au",2,"en"));	//Australia
table.add(new MccEntry(510,"id",2))410 		table.add(new MccEntry(510,"id",2));	//Indonesia (Republic of)
table.add(new MccEntry(514,"tl",2))411 		table.add(new MccEntry(514,"tl",2));	//Democratic Republic of Timor-Leste
table.add(new MccEntry(515,"ph",2))412 		table.add(new MccEntry(515,"ph",2));	//Philippines (Republic of the)
table.add(new MccEntry(520,"th",2))413 		table.add(new MccEntry(520,"th",2));	//Thailand
table.add(new MccEntry(525,"sg",2,"en"))414 		table.add(new MccEntry(525,"sg",2,"en"));	//Singapore (Republic of)
table.add(new MccEntry(528,"bn",2))415 		table.add(new MccEntry(528,"bn",2));	//Brunei Darussalam
table.add(new MccEntry(530,"nz",2, "en"))416 		table.add(new MccEntry(530,"nz",2, "en"));	//New Zealand
table.add(new MccEntry(534,"mp",2))417 		table.add(new MccEntry(534,"mp",2));	//Northern Mariana Islands (Commonwealth of the)
table.add(new MccEntry(535,"gu",2))418 		table.add(new MccEntry(535,"gu",2));	//Guam
table.add(new MccEntry(536,"nr",2))419 		table.add(new MccEntry(536,"nr",2));	//Nauru (Republic of)
table.add(new MccEntry(537,"pg",2))420 		table.add(new MccEntry(537,"pg",2));	//Papua New Guinea
table.add(new MccEntry(539,"to",2))421 		table.add(new MccEntry(539,"to",2));	//Tonga (Kingdom of)
table.add(new MccEntry(540,"sb",2))422 		table.add(new MccEntry(540,"sb",2));	//Solomon Islands
table.add(new MccEntry(541,"vu",2))423 		table.add(new MccEntry(541,"vu",2));	//Vanuatu (Republic of)
table.add(new MccEntry(542,"fj",2))424 		table.add(new MccEntry(542,"fj",2));	//Fiji (Republic of)
table.add(new MccEntry(543,"wf",2))425 		table.add(new MccEntry(543,"wf",2));	//Wallis and Futuna (Territoire franais d'outre-mer)
table.add(new MccEntry(544,"as",2))426 		table.add(new MccEntry(544,"as",2));	//American Samoa
table.add(new MccEntry(545,"ki",2))427 		table.add(new MccEntry(545,"ki",2));	//Kiribati (Republic of)
table.add(new MccEntry(546,"nc",2))428 		table.add(new MccEntry(546,"nc",2));	//New Caledonia (Territoire franais d'outre-mer)
table.add(new MccEntry(547,"pf",2))429 		table.add(new MccEntry(547,"pf",2));	//French Polynesia (Territoire franais d'outre-mer)
table.add(new MccEntry(548,"ck",2))430 		table.add(new MccEntry(548,"ck",2));	//Cook Islands
table.add(new MccEntry(549,"ws",2))431 		table.add(new MccEntry(549,"ws",2));	//Samoa (Independent State of)
table.add(new MccEntry(550,"fm",2))432 		table.add(new MccEntry(550,"fm",2));	//Micronesia (Federated States of)
table.add(new MccEntry(551,"mh",2))433 		table.add(new MccEntry(551,"mh",2));	//Marshall Islands (Republic of the)
table.add(new MccEntry(552,"pw",2))434 		table.add(new MccEntry(552,"pw",2));	//Palau (Republic of)
table.add(new MccEntry(602,"eg",2))435 		table.add(new MccEntry(602,"eg",2));	//Egypt (Arab Republic of)
table.add(new MccEntry(603,"dz",2))436 		table.add(new MccEntry(603,"dz",2));	//Algeria (People's Democratic Republic of)
table.add(new MccEntry(604,"ma",2))437 		table.add(new MccEntry(604,"ma",2));	//Morocco (Kingdom of)
table.add(new MccEntry(605,"tn",2))438 		table.add(new MccEntry(605,"tn",2));	//Tunisia
table.add(new MccEntry(606,"ly",2))439 		table.add(new MccEntry(606,"ly",2));	//Libya (Socialist People's Libyan Arab Jamahiriya)
table.add(new MccEntry(607,"gm",2))440 		table.add(new MccEntry(607,"gm",2));	//Gambia (Republic of the)
table.add(new MccEntry(608,"sn",2))441 		table.add(new MccEntry(608,"sn",2));	//Senegal (Republic of)
table.add(new MccEntry(609,"mr",2))442 		table.add(new MccEntry(609,"mr",2));	//Mauritania (Islamic Republic of)
table.add(new MccEntry(610,"ml",2))443 		table.add(new MccEntry(610,"ml",2));	//Mali (Republic of)
table.add(new MccEntry(611,"gn",2))444 		table.add(new MccEntry(611,"gn",2));	//Guinea (Republic of)
table.add(new MccEntry(612,"ci",2))445 		table.add(new MccEntry(612,"ci",2));	//Cte d'Ivoire (Republic of)
table.add(new MccEntry(613,"bf",2))446 		table.add(new MccEntry(613,"bf",2));	//Burkina Faso
table.add(new MccEntry(614,"ne",2))447 		table.add(new MccEntry(614,"ne",2));	//Niger (Republic of the)
table.add(new MccEntry(615,"tg",2))448 		table.add(new MccEntry(615,"tg",2));	//Togolese Republic
table.add(new MccEntry(616,"bj",2))449 		table.add(new MccEntry(616,"bj",2));	//Benin (Republic of)
table.add(new MccEntry(617,"mu",2))450 		table.add(new MccEntry(617,"mu",2));	//Mauritius (Republic of)
table.add(new MccEntry(618,"lr",2))451 		table.add(new MccEntry(618,"lr",2));	//Liberia (Republic of)
table.add(new MccEntry(619,"sl",2))452 		table.add(new MccEntry(619,"sl",2));	//Sierra Leone
table.add(new MccEntry(620,"gh",2))453 		table.add(new MccEntry(620,"gh",2));	//Ghana
table.add(new MccEntry(621,"ng",2))454 		table.add(new MccEntry(621,"ng",2));	//Nigeria (Federal Republic of)
table.add(new MccEntry(622,"td",2))455 		table.add(new MccEntry(622,"td",2));	//Chad (Republic of)
table.add(new MccEntry(623,"cf",2))456 		table.add(new MccEntry(623,"cf",2));	//Central African Republic
table.add(new MccEntry(624,"cm",2))457 		table.add(new MccEntry(624,"cm",2));	//Cameroon (Republic of)
table.add(new MccEntry(625,"cv",2))458 		table.add(new MccEntry(625,"cv",2));	//Cape Verde (Republic of)
table.add(new MccEntry(626,"st",2))459 		table.add(new MccEntry(626,"st",2));	//Sao Tome and Principe (Democratic Republic of)
table.add(new MccEntry(627,"gq",2))460 		table.add(new MccEntry(627,"gq",2));	//Equatorial Guinea (Republic of)
table.add(new MccEntry(628,"ga",2))461 		table.add(new MccEntry(628,"ga",2));	//Gabonese Republic
table.add(new MccEntry(629,"cg",2))462 		table.add(new MccEntry(629,"cg",2));	//Congo (Republic of the)
table.add(new MccEntry(630,"cg",2))463 		table.add(new MccEntry(630,"cg",2));	//Democratic Republic of the Congo
table.add(new MccEntry(631,"ao",2))464 		table.add(new MccEntry(631,"ao",2));	//Angola (Republic of)
table.add(new MccEntry(632,"gw",2))465 		table.add(new MccEntry(632,"gw",2));	//Guinea-Bissau (Republic of)
table.add(new MccEntry(633,"sc",2))466 		table.add(new MccEntry(633,"sc",2));	//Seychelles (Republic of)
table.add(new MccEntry(634,"sd",2))467 		table.add(new MccEntry(634,"sd",2));	//Sudan (Republic of the)
table.add(new MccEntry(635,"rw",2))468 		table.add(new MccEntry(635,"rw",2));	//Rwanda (Republic of)
table.add(new MccEntry(636,"et",2))469 		table.add(new MccEntry(636,"et",2));	//Ethiopia (Federal Democratic Republic of)
table.add(new MccEntry(637,"so",2))470 		table.add(new MccEntry(637,"so",2));	//Somali Democratic Republic
table.add(new MccEntry(638,"dj",2))471 		table.add(new MccEntry(638,"dj",2));	//Djibouti (Republic of)
table.add(new MccEntry(639,"ke",2))472 		table.add(new MccEntry(639,"ke",2));	//Kenya (Republic of)
table.add(new MccEntry(640,"tz",2))473 		table.add(new MccEntry(640,"tz",2));	//Tanzania (United Republic of)
table.add(new MccEntry(641,"ug",2))474 		table.add(new MccEntry(641,"ug",2));	//Uganda (Republic of)
table.add(new MccEntry(642,"bi",2))475 		table.add(new MccEntry(642,"bi",2));	//Burundi (Republic of)
table.add(new MccEntry(643,"mz",2))476 		table.add(new MccEntry(643,"mz",2));	//Mozambique (Republic of)
table.add(new MccEntry(645,"zm",2))477 		table.add(new MccEntry(645,"zm",2));	//Zambia (Republic of)
table.add(new MccEntry(646,"mg",2))478 		table.add(new MccEntry(646,"mg",2));	//Madagascar (Republic of)
table.add(new MccEntry(647,"re",2))479 		table.add(new MccEntry(647,"re",2));	//Reunion (French Department of)
table.add(new MccEntry(648,"zw",2))480 		table.add(new MccEntry(648,"zw",2));	//Zimbabwe (Republic of)
table.add(new MccEntry(649,"na",2))481 		table.add(new MccEntry(649,"na",2));	//Namibia (Republic of)
table.add(new MccEntry(650,"mw",2))482 		table.add(new MccEntry(650,"mw",2));	//Malawi
table.add(new MccEntry(651,"ls",2))483 		table.add(new MccEntry(651,"ls",2));	//Lesotho (Kingdom of)
table.add(new MccEntry(652,"bw",2))484 		table.add(new MccEntry(652,"bw",2));	//Botswana (Republic of)
table.add(new MccEntry(653,"sz",2))485 		table.add(new MccEntry(653,"sz",2));	//Swaziland (Kingdom of)
table.add(new MccEntry(654,"km",2))486 		table.add(new MccEntry(654,"km",2));	//Comoros (Union of the)
table.add(new MccEntry(655,"za",2,"en"))487 		table.add(new MccEntry(655,"za",2,"en"));	//South Africa (Republic of)
table.add(new MccEntry(657,"er",2))488 		table.add(new MccEntry(657,"er",2));	//Eritrea
table.add(new MccEntry(702,"bz",2))489 		table.add(new MccEntry(702,"bz",2));	//Belize
table.add(new MccEntry(704,"gt",2))490 		table.add(new MccEntry(704,"gt",2));	//Guatemala (Republic of)
table.add(new MccEntry(706,"sv",2))491 		table.add(new MccEntry(706,"sv",2));	//El Salvador (Republic of)
table.add(new MccEntry(708,"hn",3))492 		table.add(new MccEntry(708,"hn",3));	//Honduras (Republic of)
table.add(new MccEntry(710,"ni",2))493 		table.add(new MccEntry(710,"ni",2));	//Nicaragua
table.add(new MccEntry(712,"cr",2))494 		table.add(new MccEntry(712,"cr",2));	//Costa Rica
table.add(new MccEntry(714,"pa",2))495 		table.add(new MccEntry(714,"pa",2));	//Panama (Republic of)
table.add(new MccEntry(716,"pe",2))496 		table.add(new MccEntry(716,"pe",2));	//Peru
table.add(new MccEntry(722,"ar",3))497 		table.add(new MccEntry(722,"ar",3));	//Argentine Republic
table.add(new MccEntry(724,"br",2))498 		table.add(new MccEntry(724,"br",2));	//Brazil (Federative Republic of)
table.add(new MccEntry(730,"cl",2))499 		table.add(new MccEntry(730,"cl",2));	//Chile
table.add(new MccEntry(732,"co",3))500 		table.add(new MccEntry(732,"co",3));	//Colombia (Republic of)
table.add(new MccEntry(734,"ve",2))501 		table.add(new MccEntry(734,"ve",2));	//Venezuela (Bolivarian Republic of)
table.add(new MccEntry(736,"bo",2))502 		table.add(new MccEntry(736,"bo",2));	//Bolivia (Republic of)
table.add(new MccEntry(738,"gy",2))503 		table.add(new MccEntry(738,"gy",2));	//Guyana
table.add(new MccEntry(740,"ec",2))504 		table.add(new MccEntry(740,"ec",2));	//Ecuador
table.add(new MccEntry(742,"gf",2))505 		table.add(new MccEntry(742,"gf",2));	//French Guiana (French Department of)
table.add(new MccEntry(744,"py",2))506 		table.add(new MccEntry(744,"py",2));	//Paraguay (Republic of)
table.add(new MccEntry(746,"sr",2))507 		table.add(new MccEntry(746,"sr",2));	//Suriname (Republic of)
table.add(new MccEntry(748,"uy",2))508 		table.add(new MccEntry(748,"uy",2));	//Uruguay (Eastern Republic of)
table.add(new MccEntry(750,"fk",2))509 		table.add(new MccEntry(750,"fk",2));	//Falkland Islands (Malvinas)
510         //table.add(new MccEntry(901,"",2));	//"International Mobile, shared code"
511 
512         Collections.sort(table);
513     }
514 }
515