diff options
author | Ricardo Cerqueira <github@cerqueira.org> | 2012-04-17 01:14:37 +0100 |
---|---|---|
committer | Mike Kasick <mike@kasick.org> | 2012-12-05 15:11:22 -0500 |
commit | 16fb747613156b5d19261ff282f1cff45a84014e (patch) | |
tree | 28017465b2aa297474102bada5afb182a68c0e68 /telephony | |
parent | c70ebdae9f02d133504874bb8d0ed842c4e812c2 (diff) | |
download | frameworks_base-16fb747613156b5d19261ff282f1cff45a84014e.zip frameworks_base-16fb747613156b5d19261ff282f1cff45a84014e.tar.gz frameworks_base-16fb747613156b5d19261ff282f1cff45a84014e.tar.bz2 |
Telephony: Add getLteOnGsmMode() method (1/2)
Same functionality as the existing getLteOnCdmaMode, but for GSM
LTE devices.
Enable with the telephony.lteOnGsmDevice system property
From CM 10.0: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e
- Moved getLteOnGsmModeStatic() to TelephonyManager.
Diffstat (limited to 'telephony')
3 files changed, 31 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 1349dbc..d486529 100755 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -475,6 +475,15 @@ public class TelephonyManager { return retVal; } + /** + * Return if the current radio is LTE on GSM + * @hide + */ + public static int getLteOnGsmModeStatic() { + return SystemProperties.getInt(TelephonyProperties.PROPERTY_LTE_ON_GSM_DEVICE, + 0); + } + // // // Current Network @@ -827,6 +836,21 @@ public class TelephonyManager { } } + /** + * Return if the current radio is LTE on GSM + * @hide + */ + public int getLteOnGsmMode() { + try { + return getITelephony().getLteOnGsmMode(); + } catch (RemoteException ex) { + return 0; + } catch (NullPointerException ex) { + // This could happen before phone restarts due to crashing + return 0; + } + } + // // // Subscriber Info diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 12a7286..11e01b9 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -284,5 +284,7 @@ interface ITelephony { * Returns the all observed cell information of the device. */ List<CellInfo> getAllCellInfo(); + + int getLteOnGsmMode(); } diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java index f95e081..41f87a3 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java +++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java @@ -88,6 +88,11 @@ public interface TelephonyProperties */ static final String PROPERTY_LTE_ON_CDMA_DEVICE = "telephony.lteOnCdmaDevice"; + /** + * {@see BaseCommands#getLteOnGsmMode()} + */ + static final String PROPERTY_LTE_ON_GSM_DEVICE = "telephony.lteOnGsmDevice"; + static final String CURRENT_ACTIVE_PHONE = "gsm.current.phone-type"; //****** SIM Card |