Merge "Add calculatePreferredNetworkType to TelephonyManager."

This commit is contained in:
Junda Liu
2014-07-08 19:20:26 +00:00
committed by Android (Google) Code Review
2 changed files with 27 additions and 0 deletions

View File

@@ -2755,6 +2755,25 @@ public class TelephonyManager {
}
}
/**
* Get the calculated preferred network type.
* Used for debugging incorrect network type.
*
* @return the preferred network type, defined in RILConstants.java or -1 if
* none available.
* @hide
*/
public int getCalculatedPreferredNetworkType() {
try {
return getITelephony().getCalculatedPreferredNetworkType();
} catch (RemoteException ex) {
Rlog.e(TAG, "getCalculatedPreferredNetworkType RemoteException", ex);
} catch (NullPointerException ex) {
Rlog.e(TAG, "getCalculatedPreferredNetworkType NPE", ex);
}
return -1;
}
/**
* Get the preferred network type.
* Used for device configuration by some CDMA operators.

View File

@@ -583,6 +583,14 @@ interface ITelephony {
*/
boolean nvResetConfig(int resetType);
/*
* Get the calculated preferred network type.
* Used for device configuration by some CDMA operators.
*
* @return the calculated preferred network type, defined in RILConstants.java.
*/
int getCalculatedPreferredNetworkType();
/*
* Get the preferred network type.
* Used for device configuration by some CDMA operators.