diff options
author | Wink Saville <wink@google.com> | 2013-04-05 15:03:31 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2013-04-08 15:19:43 -0700 |
commit | 094beeccf5bf6e68d73f94a1aeaeda6690f4bf06 (patch) | |
tree | 9d603e88276ee843f65c400b6e1d11bf6259cb87 | |
parent | 89454f8331cd7d582eafca87c6586feb5db509c7 (diff) | |
download | frameworks_base-094beeccf5bf6e68d73f94a1aeaeda6690f4bf06.zip frameworks_base-094beeccf5bf6e68d73f94a1aeaeda6690f4bf06.tar.gz frameworks_base-094beeccf5bf6e68d73f94a1aeaeda6690f4bf06.tar.bz2 |
Add FW support for CellInfo RIL commands.
Bug: 8235566
Change-Id: I7ad7dabc4b6c38bfba4461b08e6e30d0eb9efea1
10 files changed, 48 insertions, 17 deletions
diff --git a/telephony/java/android/telephony/CellIdentityCdma.java b/telephony/java/android/telephony/CellIdentityCdma.java index 6e2a70d..31e01c0 100644 --- a/telephony/java/android/telephony/CellIdentityCdma.java +++ b/telephony/java/android/telephony/CellIdentityCdma.java @@ -162,13 +162,13 @@ public final class CellIdentityCdma implements Parcelable { @Override public String toString() { - StringBuilder sb = new StringBuilder("CdmaCellIdentitiy:"); - sb.append(super.toString()); + StringBuilder sb = new StringBuilder("CellIdentitiyCdma:{"); sb.append(" mNetworkId="); sb.append(mNetworkId); sb.append(" mSystemId="); sb.append(mSystemId); sb.append(" mBasestationId="); sb.append(mBasestationId); sb.append(" mLongitude="); sb.append(mLongitude); sb.append(" mLatitude="); sb.append(mLatitude); + sb.append("}"); return sb.toString(); } diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java index bda96be..98113e7 100644 --- a/telephony/java/android/telephony/CellIdentityGsm.java +++ b/telephony/java/android/telephony/CellIdentityGsm.java @@ -147,13 +147,13 @@ public final class CellIdentityGsm implements Parcelable { @Override public String toString() { - StringBuilder sb = new StringBuilder("GsmCellIdentitiy:"); - sb.append(super.toString()); + StringBuilder sb = new StringBuilder("CellIdentitiyGsm:{"); sb.append(" mMcc=").append(mMcc); - sb.append(" mMnc=").append(mMcc); + sb.append(" mMnc=").append(mMnc); sb.append(" mLac=").append(mLac); sb.append(" mCid=").append(mCid); sb.append(" mPsc=").append(mPsc); + sb.append("}"); return sb.toString(); } diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java index f72d583..86924bd 100644 --- a/telephony/java/android/telephony/CellIdentityLte.java +++ b/telephony/java/android/telephony/CellIdentityLte.java @@ -142,13 +142,13 @@ public final class CellIdentityLte implements Parcelable { @Override public String toString() { - StringBuilder sb = new StringBuilder("LteCellIdentitiy:"); - sb.append(super.toString()); + StringBuilder sb = new StringBuilder("CellIdentitiyLte:{"); sb.append(" mMcc="); sb.append(mMcc); sb.append(" mMnc="); sb.append(mMnc); sb.append(" mCi="); sb.append(mCi); sb.append(" mPci="); sb.append(mPci); sb.append(" mTac="); sb.append(mTac); + sb.append("}"); return sb.toString(); } diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java index f367f99..fe3c68b 100644 --- a/telephony/java/android/telephony/CellInfo.java +++ b/telephony/java/android/telephony/CellInfo.java @@ -149,7 +149,7 @@ public abstract class CellInfo implements Parcelable { StringBuffer sb = new StringBuffer(); String timeStampType; - sb.append(" mRegistered=").append(mRegistered ? "YES" : "NO"); + sb.append("mRegistered=").append(mRegistered ? "YES" : "NO"); timeStampType = timeStampTypeToString(mTimeStampType); sb.append(" mTimeStampType=").append(timeStampType); sb.append(" mTimeStamp=").append(mTimeStamp).append("ns"); diff --git a/telephony/java/android/telephony/CellInfoCdma.java b/telephony/java/android/telephony/CellInfoCdma.java index a5d6e9c..6f2f1f6 100644 --- a/telephony/java/android/telephony/CellInfoCdma.java +++ b/telephony/java/android/telephony/CellInfoCdma.java @@ -87,10 +87,11 @@ public final class CellInfoCdma extends CellInfo implements Parcelable { public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("CellInfoCdma:"); + sb.append("CellInfoCdma:{"); sb.append(super.toString()); - sb.append(", ").append(mCellIdentityCdma); - sb.append(", ").append(mCellSignalStrengthCdma); + sb.append(" ").append(mCellIdentityCdma); + sb.append(" ").append(mCellSignalStrengthCdma); + sb.append("}"); return sb.toString(); } diff --git a/telephony/java/android/telephony/CellInfoGsm.java b/telephony/java/android/telephony/CellInfoGsm.java index bf0eca8..1bedddb 100644 --- a/telephony/java/android/telephony/CellInfoGsm.java +++ b/telephony/java/android/telephony/CellInfoGsm.java @@ -87,10 +87,11 @@ public final class CellInfoGsm extends CellInfo implements Parcelable { public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("CellInfoGsm:"); + sb.append("CellInfoGsm:{"); sb.append(super.toString()); - sb.append(", ").append(mCellIdentityGsm); - sb.append(", ").append(mCellSignalStrengthGsm); + sb.append(" ").append(mCellIdentityGsm); + sb.append(" ").append(mCellSignalStrengthGsm); + sb.append("}"); return sb.toString(); } diff --git a/telephony/java/android/telephony/CellInfoLte.java b/telephony/java/android/telephony/CellInfoLte.java index d7a58b6..287c9f0 100644 --- a/telephony/java/android/telephony/CellInfoLte.java +++ b/telephony/java/android/telephony/CellInfoLte.java @@ -91,10 +91,11 @@ public final class CellInfoLte extends CellInfo implements Parcelable { public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("CellInfoLte:"); + sb.append("CellInfoLte:{"); sb.append(super.toString()); - sb.append(", ").append(mCellIdentityLte); - sb.append(", ").append(mCellSignalStrengthLte); + sb.append(" ").append(mCellIdentityLte); + sb.append(" ").append(mCellSignalStrengthLte); + sb.append("}"); return sb.toString(); } diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4aee902..a30f87d 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1357,4 +1357,24 @@ public class TelephonyManager { return null; } } + + /** + * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged + * PhoneStateListener.onCellInfoChanged} will be invoked. + * + * The default, 0, means invoke onCellInfoChanged when any of the reported + * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue + * A onCellInfoChanged. + * + * @param rateInMillis the rate + * + * @hide + */ + public void setCellInfoListRate(int rateInMillis) { + try { + getITelephony().setCellInfoListRate(rateInMillis); + } catch (RemoteException ex) { + } catch (NullPointerException ex) { + } + } } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 1449ab1..b78f589 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -294,5 +294,10 @@ interface ITelephony { * Returns the all observed cell information of the device. */ List<CellInfo> getAllCellInfo(); + + /** + * Sets minimum time in milli-seconds between onCellInfoChanged + */ + void setCellInfoListRate(int rateInMillis); } diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 077ad68..9650b99 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -260,6 +260,8 @@ cat include/telephony/ril.h | \ int RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU = 106; int RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS = 107; int RIL_REQUEST_VOICE_RADIO_TECH = 108; + int RIL_REQUEST_GET_CELL_INFO_LIST = 109; + int RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE = 110; int RIL_UNSOL_RESPONSE_BASE = 1000; int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000; int RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001; @@ -297,4 +299,5 @@ cat include/telephony/ril.h | \ int RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE = 1033; int RIL_UNSOL_RIL_CONNECTED = 1034; int RIL_UNSOL_VOICE_RADIO_TECH_CHANGED = 1035; + int RIL_UNSOL_CELL_INFO_LIST = 1036; } |