Add FW support for CellInfo RIL commands.
Bug: 8235566 Change-Id: I7ad7dabc4b6c38bfba4461b08e6e30d0eb9efea1
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user