MS: Adding Support for Emergency APN in Telephony Framework
(base/telephony) Replacement for https://partner-android-review.googlesource.com/#/c/171175/ Change-Id: I16fc37f5c00ed79f2370bc46554fc7a24c52c4cb Conflicts: core/java/android/net/ConnectivityManager.java
This commit is contained in:
@@ -387,6 +387,12 @@ public class ConnectivityManager {
|
||||
*/
|
||||
public static final int TYPE_MOBILE_IA = 14;
|
||||
|
||||
/**
|
||||
* Emergency PDN connection for emergency calls
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int TYPE_MOBILE_EMERGENCY = 15;
|
||||
|
||||
/**
|
||||
* The network that uses proxy to achieve connectivity.
|
||||
* {@hide}
|
||||
@@ -490,6 +496,8 @@ public class ConnectivityManager {
|
||||
return "WIFI_P2P";
|
||||
case TYPE_MOBILE_IA:
|
||||
return "MOBILE_IA";
|
||||
case TYPE_MOBILE_EMERGENCY:
|
||||
return "MOBILE_EMERGENCY";
|
||||
case TYPE_PROXY:
|
||||
return "PROXY";
|
||||
default:
|
||||
@@ -515,6 +523,7 @@ public class ConnectivityManager {
|
||||
case TYPE_MOBILE_IMS:
|
||||
case TYPE_MOBILE_CBS:
|
||||
case TYPE_MOBILE_IA:
|
||||
case TYPE_MOBILE_EMERGENCY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -3925,6 +3925,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
usedNetworkType = ConnectivityManager.TYPE_MOBILE_IMS;
|
||||
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_CBS)) {
|
||||
usedNetworkType = ConnectivityManager.TYPE_MOBILE_CBS;
|
||||
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_EMERGENCY)) {
|
||||
usedNetworkType = ConnectivityManager.TYPE_MOBILE_EMERGENCY;
|
||||
} else {
|
||||
Slog.e(TAG, "Can't match any mobile netTracker!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user