Merge "Add calculatePreferredNetworkType to TelephonyManager."
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user