Merge "Add TimeStamp Constructor for HAL 1.4 Support"
am: f899e26857
Change-Id: I9f96a8846bfb137bdcae8d8495188229637fac2c
This commit is contained in:
@@ -22,7 +22,6 @@ import android.annotation.UnsupportedAppUsage;
|
||||
import android.hardware.radio.V1_4.CellInfo.Info;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
|
||||
@@ -325,9 +324,9 @@ public abstract class CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
protected CellInfo(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
protected CellInfo(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
this.mRegistered = ci.isRegistered;
|
||||
this.mTimeStamp = SystemClock.elapsedRealtimeNanos();
|
||||
this.mTimeStamp = timeStamp;
|
||||
this.mCellConnectionStatus = ci.connectionStatus;
|
||||
}
|
||||
|
||||
@@ -358,14 +357,14 @@ public abstract class CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public static CellInfo create(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
public static CellInfo create(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
if (ci == null) return null;
|
||||
switch (ci.info.getDiscriminator()) {
|
||||
case Info.hidl_discriminator.gsm: return new CellInfoGsm(ci);
|
||||
case Info.hidl_discriminator.cdma: return new CellInfoCdma(ci);
|
||||
case Info.hidl_discriminator.lte: return new CellInfoLte(ci);
|
||||
case Info.hidl_discriminator.wcdma: return new CellInfoWcdma(ci);
|
||||
case Info.hidl_discriminator.tdscdma: return new CellInfoTdscdma(ci);
|
||||
case Info.hidl_discriminator.gsm: return new CellInfoGsm(ci, timeStamp);
|
||||
case Info.hidl_discriminator.cdma: return new CellInfoCdma(ci, timeStamp);
|
||||
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);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ public final class CellInfoCdma extends CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellInfoCdma(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
super(ci);
|
||||
public CellInfoCdma(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
super(ci, timeStamp);
|
||||
final android.hardware.radio.V1_2.CellInfoCdma cic = ci.info.cdma();
|
||||
mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
|
||||
mCellSignalStrengthCdma =
|
||||
|
||||
@@ -64,8 +64,8 @@ public final class CellInfoGsm extends CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellInfoGsm(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
super(ci);
|
||||
public CellInfoGsm(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
super(ci, timeStamp);
|
||||
final android.hardware.radio.V1_2.CellInfoGsm cig = ci.info.gsm();
|
||||
mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
|
||||
mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
|
||||
|
||||
@@ -71,8 +71,8 @@ public final class CellInfoLte extends CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellInfoLte(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
super(ci);
|
||||
public CellInfoLte(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
super(ci, timeStamp);
|
||||
final android.hardware.radio.V1_4.CellInfoLte cil = ci.info.lte();
|
||||
mCellIdentityLte = new CellIdentityLte(cil.base.cellIdentityLte);
|
||||
mCellSignalStrengthLte = new CellSignalStrengthLte(cil.base.signalStrengthLte);
|
||||
|
||||
@@ -65,8 +65,8 @@ public final class CellInfoTdscdma extends CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellInfoTdscdma(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
super(ci);
|
||||
public CellInfoTdscdma(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
super(ci, timeStamp);
|
||||
final android.hardware.radio.V1_2.CellInfoTdscdma cit = ci.info.tdscdma();
|
||||
mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
|
||||
mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
|
||||
|
||||
@@ -64,8 +64,8 @@ public final class CellInfoWcdma extends CellInfo implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public CellInfoWcdma(android.hardware.radio.V1_4.CellInfo ci) {
|
||||
super(ci);
|
||||
public CellInfoWcdma(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
|
||||
super(ci, timeStamp);
|
||||
final android.hardware.radio.V1_2.CellInfoWcdma ciw = ci.info.wcdma();
|
||||
mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
|
||||
mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
|
||||
|
||||
Reference in New Issue
Block a user