Merge "Add NR to CellInfo"
This commit is contained in:
@@ -61,6 +61,12 @@ public final class CellIdentityNr extends CellIdentity {
|
||||
mNci = inRangeOrUnavailable(nci, 0, MAX_NCI);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellIdentityNr(android.hardware.radio.V1_4.CellIdentityNr cid) {
|
||||
this(cid.pci, cid.tac, cid.nrarfcn, cid.mcc, cid.mnc, cid.nci, cid.operatorNames.alphaLong,
|
||||
cid.operatorNames.alphaShort);
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellIdentityNr sanitizeLocationInfo() {
|
||||
return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
|
||||
|
||||
@@ -374,6 +374,7 @@ public abstract class CellInfo implements Parcelable {
|
||||
case Info.hidl_discriminator.lte: return new CellInfoLte(ci, timeStamp);
|
||||
case Info.hidl_discriminator.wcdma: return new CellInfoWcdma(ci, timeStamp);
|
||||
case Info.hidl_discriminator.tdscdma: return new CellInfoTdscdma(ci, timeStamp);
|
||||
case Info.hidl_discriminator.nr: return new CellInfoNr(ci, timeStamp);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,14 @@ public final class CellInfoNr extends CellInfo {
|
||||
mCellSignalStrength = other.mCellSignalStrength;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellInfoNr(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
super(ci, timeStamp);
|
||||
final android.hardware.radio.V1_4.CellInfoNr cil = ci.info.nr();
|
||||
mCellIdentity = new CellIdentityNr(cil.cellidentity);
|
||||
mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrength);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a {@link CellIdentityNr} instance.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user