FileDocCategorySizeDatePackage
MccTable.javaAPI DocAndroid 1.5 API19407Wed May 06 22:42:02 BST 2009com.android.internal.telephony.gsm

MccTable

public final class MccTable extends Object
Mobile Country Code {@hide}

Fields Summary
static ArrayList
table
Constructors Summary
Methods Summary
public static java.lang.StringcountryCodeForMcc(int mcc)
Given a GSM Mobile Country Code, returns an ISO two-character country code if available. Returns "" if unavailable.

        MccEntry entry;

        entry = entryForMcc(mcc);

        if (entry == null) {
            return "";
        } else {
            return entry.iso;
        }
    
static java.lang.StringdefaultLanguageForMcc(int mcc)
Given a GSM Mobile Country Code, returns an ISO 2-3 character language code if available. Returns null if unavailable.

        MccEntry entry;

        entry = entryForMcc(mcc);

        if (entry == null) {
            return null;
        } else {
            return entry.language;
        }
    
static java.lang.StringdefaultTimeZoneForMcc(int mcc)
Returns a default time zone ID for the given MCC.

param
mcc Mobile Country Code
return
default TimeZone ID, or null if not specified

        MccEntry entry;

        entry = entryForMcc(mcc);

        if (entry == null) {
            return null;
        } else {
            return entry.timezone;
        }
    
private static com.android.internal.telephony.gsm.MccTable$MccEntryentryForMcc(int mcc)

        int index;
        
        MccEntry m;

        m = new MccEntry(mcc, null, 0);
        
        index = Collections.binarySearch(table, m);

        if (index < 0) {
            return null;
        } else {
            return table.get(index);
        }
    
public static intsmallestDigitsMccForMnc(int mcc)
Given a GSM Mobile Country Code, returns the smallest number of digits that M if available. Returns "" if unavailable.

        MccEntry entry;

        entry = entryForMcc(mcc);

        if (entry == null) {
            return 2;
        } else {
            return entry.smallestDigitsMnc;
        }