diff options
author | Evan Charlton <evanc@google.com> | 2014-03-06 10:08:06 -0800 |
---|---|---|
committer | Evan Charlton <evanc@google.com> | 2014-03-06 10:08:06 -0800 |
commit | 9bbb37116d2c5b597f9b5e3094ff328971e03c0b (patch) | |
tree | eaf4a12bc84f8dcfed58d515ec10b6daf61a699a /telephony/java/android | |
parent | a693e2ba5954be17190df9f359aa5ecb4cfc4126 (diff) | |
parent | 322f7d6e4abf8d0098ae322fe328b2510383baf5 (diff) | |
download | frameworks_base-9bbb37116d2c5b597f9b5e3094ff328971e03c0b.zip frameworks_base-9bbb37116d2c5b597f9b5e3094ff328971e03c0b.tar.gz frameworks_base-9bbb37116d2c5b597f9b5e3094ff328971e03c0b.tar.bz2 |
resolved conflicts for merge 322f7d6e to master-nova
Change-Id: I31de6084253ce21f50224582f82b7f7e630ef34e
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 53c6a2e..f621fa4 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1931,4 +1931,41 @@ public class TelephonyManager { } catch (RemoteException ex) { } } + + /** + * Get the preferred network type. + * Used for device configuration by some CDMA operators. + * + * @return the preferred network type, defined in RILConstants.java. + * @hide + */ + public int getPreferredNetworkType() { + try { + return getITelephony().getPreferredNetworkType(); + } catch (RemoteException ex) { + Rlog.e(TAG, "getPreferredNetworkType RemoteException", ex); + } catch (NullPointerException ex) { + Rlog.e(TAG, "getPreferredNetworkType NPE", ex); + } + return -1; + } + + /** + * Set the preferred network type. + * Used for device configuration by some CDMA operators. + * + * @param networkType the preferred network type, defined in RILConstants.java. + * @return true on success; false on any failure. + * @hide + */ + public boolean setPreferredNetworkType(int networkType) { + try { + return getITelephony().setPreferredNetworkType(networkType); + } catch (RemoteException ex) { + Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex); + } catch (NullPointerException ex) { + Rlog.e(TAG, "setPreferredNetworkType NPE", ex); + } + return false; + } } |