Merge "Added APN to string method"
This commit is contained in:
@@ -32,7 +32,20 @@ public final class AccessNetworkConstants {
|
|||||||
public static final int IWLAN = 5;
|
public static final int IWLAN = 5;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
private AccessNetworkType() {};
|
private AccessNetworkType() {}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public static String toString(int type) {
|
||||||
|
switch (type) {
|
||||||
|
case UNKNOWN: return "UNKNOWN";
|
||||||
|
case GERAN: return "GERAN";
|
||||||
|
case UTRAN: return "UTRAN";
|
||||||
|
case EUTRAN: return "EUTRAN";
|
||||||
|
case CDMA2000: return "CDMA2000";
|
||||||
|
case IWLAN: return "IWLAN";
|
||||||
|
default: return Integer.toString(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,7 +60,16 @@ public final class AccessNetworkConstants {
|
|||||||
public static final int WLAN = 2;
|
public static final int WLAN = 2;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
private TransportType() {};
|
private TransportType() {}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public static String toString(int type) {
|
||||||
|
switch (type) {
|
||||||
|
case WWAN: return "WWAN";
|
||||||
|
case WLAN: return "WLAN";
|
||||||
|
default: return Integer.toString(type);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1183,6 +1183,16 @@ public class ApnSetting implements Parcelable {
|
|||||||
return TextUtils.join(",", types);
|
return TextUtils.join(",", types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param apnType APN type
|
||||||
|
* @return APN type in string format
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static String getApnTypeString(int apnType) {
|
||||||
|
String apnTypeString = APN_TYPE_INT_MAP.get(apnType);
|
||||||
|
return apnTypeString == null ? "Unknown" : apnTypeString;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param types comma delimited list of APN types.
|
* @param types comma delimited list of APN types.
|
||||||
* @return bitmask of APN types.
|
* @return bitmask of APN types.
|
||||||
|
|||||||
Reference in New Issue
Block a user