Move HAL constructors to RILUtils
Test: atest FrameworksTelephonyTests
Bug: 198331673
Change-Id: Ib91982eecad87d958cb0c72a49c916a3a5e05a9a
Merged-In: Ib91982eecad87d958cb0c72a49c916a3a5e05a9a
diff --git a/telephony/java/android/telephony/BarringInfo.java b/telephony/java/android/telephony/BarringInfo.java
index e9698ad..0aa4b58 100644
--- a/telephony/java/android/telephony/BarringInfo.java
+++ b/telephony/java/android/telephony/BarringInfo.java
@@ -28,7 +28,6 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.util.List;
import java.util.Objects;
/**
@@ -269,42 +268,6 @@
mBarringServiceInfos = barringServiceInfos;
}
- /** @hide */
- public static BarringInfo create(
- @NonNull android.hardware.radio.V1_5.CellIdentity halBarringCellId,
- @NonNull List<android.hardware.radio.V1_5.BarringInfo> halBarringInfos) {
- CellIdentity ci = CellIdentity.create(halBarringCellId);
- SparseArray<BarringServiceInfo> serviceInfos = new SparseArray<>();
-
- for (android.hardware.radio.V1_5.BarringInfo halBarringInfo : halBarringInfos) {
- if (halBarringInfo.barringType
- == android.hardware.radio.V1_5.BarringInfo.BarringType.CONDITIONAL) {
- if (halBarringInfo.barringTypeSpecificInfo.getDiscriminator()
- != android.hardware.radio.V1_5.BarringInfo.BarringTypeSpecificInfo
- .hidl_discriminator.conditional) {
- // this is an error case where the barring info is conditional but the
- // conditional barring fields weren't included
- continue;
- }
- android.hardware.radio.V1_5.BarringInfo.BarringTypeSpecificInfo
- .Conditional conditionalInfo =
- halBarringInfo.barringTypeSpecificInfo.conditional();
- serviceInfos.put(
- halBarringInfo.serviceType, new BarringServiceInfo(
- halBarringInfo.barringType, // will always be CONDITIONAL here
- conditionalInfo.isBarred,
- conditionalInfo.factor,
- conditionalInfo.timeSeconds));
- } else {
- // Barring type is either NONE or UNCONDITIONAL
- serviceInfos.put(
- halBarringInfo.serviceType, new BarringServiceInfo(
- halBarringInfo.barringType, false, 0, 0));
- }
- }
- return new BarringInfo(ci, serviceInfos);
- }
-
/**
* Get the BarringServiceInfo for a specified service.
*
diff --git a/telephony/java/android/telephony/CellConfigLte.java b/telephony/java/android/telephony/CellConfigLte.java
index 4b57d71..3e4e244 100644
--- a/telephony/java/android/telephony/CellConfigLte.java
+++ b/telephony/java/android/telephony/CellConfigLte.java
@@ -34,11 +34,6 @@
}
/** @hide */
- public CellConfigLte(android.hardware.radio.V1_4.CellConfigLte cellConfig) {
- mIsEndcAvailable = cellConfig.isEndcAvailable;
- }
-
- /** @hide */
public CellConfigLte(boolean isEndcAvailable) {
mIsEndcAvailable = isEndcAvailable;
}
diff --git a/telephony/java/android/telephony/CellIdentity.java b/telephony/java/android/telephony/CellIdentity.java
index 15147da..06cfd67 100644
--- a/telephony/java/android/telephony/CellIdentity.java
+++ b/telephony/java/android/telephony/CellIdentity.java
@@ -20,7 +20,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
-import android.hardware.radio.V1_0.CellInfoType;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -359,104 +358,4 @@
return true;
}
-
- /** @hide */
- public static CellIdentity create(android.hardware.radio.V1_0.CellIdentity cellIdentity) {
- if (cellIdentity == null) return null;
- switch(cellIdentity.cellInfoType) {
- case CellInfoType.GSM: {
- if (cellIdentity.cellIdentityGsm.size() == 1) {
- return new CellIdentityGsm(cellIdentity.cellIdentityGsm.get(0));
- }
- break;
- }
- case CellInfoType.WCDMA: {
- if (cellIdentity.cellIdentityWcdma.size() == 1) {
- return new CellIdentityWcdma(cellIdentity.cellIdentityWcdma.get(0));
- }
- break;
- }
- case CellInfoType.TD_SCDMA: {
- if (cellIdentity.cellIdentityTdscdma.size() == 1) {
- return new CellIdentityTdscdma(cellIdentity.cellIdentityTdscdma.get(0));
- }
- break;
- }
- case CellInfoType.LTE: {
- if (cellIdentity.cellIdentityLte.size() == 1) {
- return new CellIdentityLte(cellIdentity.cellIdentityLte.get(0));
- }
- break;
- }
- case CellInfoType.CDMA: {
- if (cellIdentity.cellIdentityCdma.size() == 1) {
- return new CellIdentityCdma(cellIdentity.cellIdentityCdma.get(0));
- }
- break;
- }
- case CellInfoType.NONE: break;
- default: break;
- }
- return null;
- }
-
- /** @hide */
- public static CellIdentity create(android.hardware.radio.V1_2.CellIdentity cellIdentity) {
- if (cellIdentity == null) return null;
- switch(cellIdentity.cellInfoType) {
- case CellInfoType.GSM: {
- if (cellIdentity.cellIdentityGsm.size() == 1) {
- return new CellIdentityGsm(cellIdentity.cellIdentityGsm.get(0));
- }
- break;
- }
- case CellInfoType.WCDMA: {
- if (cellIdentity.cellIdentityWcdma.size() == 1) {
- return new CellIdentityWcdma(cellIdentity.cellIdentityWcdma.get(0));
- }
- break;
- }
- case CellInfoType.TD_SCDMA: {
- if (cellIdentity.cellIdentityTdscdma.size() == 1) {
- return new CellIdentityTdscdma(cellIdentity.cellIdentityTdscdma.get(0));
- }
- break;
- }
- case CellInfoType.LTE: {
- if (cellIdentity.cellIdentityLte.size() == 1) {
- return new CellIdentityLte(cellIdentity.cellIdentityLte.get(0));
- }
- break;
- }
- case CellInfoType.CDMA: {
- if (cellIdentity.cellIdentityCdma.size() == 1) {
- return new CellIdentityCdma(cellIdentity.cellIdentityCdma.get(0));
- }
- break;
- }
- case CellInfoType.NONE: break;
- default: break;
- }
- return null;
- }
-
- /** @hide */
- public static CellIdentity create(android.hardware.radio.V1_5.CellIdentity ci) {
- if (ci == null) return null;
- switch (ci.getDiscriminator()) {
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.gsm:
- return new CellIdentityGsm(ci.gsm());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.cdma:
- return new CellIdentityCdma(ci.cdma());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.lte:
- return new CellIdentityLte(ci.lte());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.wcdma:
- return new CellIdentityWcdma(ci.wcdma());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.tdscdma:
- return new CellIdentityTdscdma(ci.tdscdma());
- case android.hardware.radio.V1_5.CellIdentity.hidl_discriminator.nr:
- return new CellIdentityNr(ci.nr());
- default: return null;
- }
- }
}
diff --git a/telephony/java/android/telephony/CellIdentityCdma.java b/telephony/java/android/telephony/CellIdentityCdma.java
index 58a01e9..ba3a192 100644
--- a/telephony/java/android/telephony/CellIdentityCdma.java
+++ b/telephony/java/android/telephony/CellIdentityCdma.java
@@ -112,17 +112,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityCdma(@NonNull android.hardware.radio.V1_0.CellIdentityCdma cid) {
- this(cid.networkId, cid.systemId, cid.baseStationId, cid.longitude, cid.latitude, "", "");
- }
-
- /** @hide */
- public CellIdentityCdma(@NonNull android.hardware.radio.V1_2.CellIdentityCdma cid) {
- this(cid.base.networkId, cid.base.systemId, cid.base.baseStationId, cid.base.longitude,
- cid.base.latitude, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort);
- }
-
private CellIdentityCdma(@NonNull CellIdentityCdma cid) {
this(cid.mNetworkId, cid.mSystemId, cid.mBasestationId, cid.mLongitude, cid.mLatitude,
cid.mAlphaLong, cid.mAlphaShort);
diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java
index a3bec33..2516a79 100644
--- a/telephony/java/android/telephony/CellIdentityGsm.java
+++ b/telephony/java/android/telephony/CellIdentityGsm.java
@@ -101,30 +101,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityGsm(@NonNull android.hardware.radio.V1_0.CellIdentityGsm cid) {
- this(cid.lac, cid.cid, cid.arfcn,
- cid.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.bsic,
- cid.mcc, cid.mnc, "", "", new ArraySet<>());
- }
-
- /** @hide */
- public CellIdentityGsm(@NonNull android.hardware.radio.V1_2.CellIdentityGsm cid) {
- this(cid.base.lac, cid.base.cid, cid.base.arfcn,
- cid.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.bsic, cid.base.mcc,
- cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- new ArraySet<>());
- }
-
- /** @hide */
- public CellIdentityGsm(@NonNull android.hardware.radio.V1_5.CellIdentityGsm cid) {
- this(cid.base.base.lac, cid.base.base.cid, cid.base.base.arfcn,
- cid.base.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE
- : cid.base.base.bsic, cid.base.base.mcc,
- cid.base.base.mnc, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns);
- }
-
private CellIdentityGsm(@NonNull CellIdentityGsm cid) {
this(cid.mLac, cid.mCid, cid.mArfcn, cid.mBsic, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns);
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index bd92d00a..4db00cf 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -136,31 +136,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityLte(@NonNull android.hardware.radio.V1_0.CellIdentityLte cid) {
- this(cid.ci, cid.pci, cid.tac, cid.earfcn, new int[] {},
- CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", "", new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityLte(@NonNull android.hardware.radio.V1_2.CellIdentityLte cid) {
- this(cid.base.ci, cid.base.pci, cid.base.tac, cid.base.earfcn, new int[] {},
- cid.bandwidth, cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong,
- cid.operatorNames.alphaShort, new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityLte(@NonNull android.hardware.radio.V1_5.CellIdentityLte cid) {
- this(cid.base.base.ci, cid.base.base.pci, cid.base.base.tac, cid.base.base.earfcn,
- cid.bands.stream().mapToInt(Integer::intValue).toArray(), cid.base.bandwidth,
- cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns,
- cid.optionalCsgInfo.getDiscriminator()
- == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
- : null);
- }
-
private CellIdentityLte(@NonNull CellIdentityLte cid) {
this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mBands, cid.mBandwidth, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo);
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index 4f50521..6aeb482 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -65,7 +65,6 @@
}
/**
- *
* @param pci Physical Cell Id in range [0, 1007].
* @param tac 24-bit Tracking Area Code.
* @param nrArfcn NR Absolute Radio Frequency Channel Number, in range [0, 3279165].
@@ -100,21 +99,6 @@
}
/** @hide */
- public CellIdentityNr(@NonNull android.hardware.radio.V1_4.CellIdentityNr cid) {
- this(cid.pci, cid.tac, cid.nrarfcn, new int[] {}, cid.mcc, cid.mnc, cid.nci,
- cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- new ArraySet<>());
- }
-
- /** @hide */
- public CellIdentityNr(@NonNull android.hardware.radio.V1_5.CellIdentityNr cid) {
- this(cid.base.pci, cid.base.tac, cid.base.nrarfcn,
- cid.bands.stream().mapToInt(Integer::intValue).toArray(), cid.base.mcc,
- cid.base.mnc, cid.base.nci, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns);
- }
-
- /** @hide */
@Override
public @NonNull CellIdentityNr sanitizeLocationInfo() {
return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mNrArfcn,
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index ec07d54..13d9373 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -113,31 +113,6 @@
}
/** @hide */
- public CellIdentityTdscdma(@NonNull android.hardware.radio.V1_0.CellIdentityTdscdma cid) {
- this(cid.mcc, cid.mnc, cid.lac, cid.cid, cid.cpid, CellInfo.UNAVAILABLE, "", "",
- Collections.emptyList(), null);
- }
-
- /** @hide */
- public CellIdentityTdscdma(@NonNull android.hardware.radio.V1_2.CellIdentityTdscdma cid) {
- this(cid.base.mcc, cid.base.mnc, cid.base.lac, cid.base.cid, cid.base.cpid,
- cid.uarfcn, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- Collections.emptyList(), null);
- }
-
- /** @hide */
- public CellIdentityTdscdma(@NonNull android.hardware.radio.V1_5.CellIdentityTdscdma cid) {
- this(cid.base.base.mcc, cid.base.base.mnc, cid.base.base.lac, cid.base.base.cid,
- cid.base.base.cpid, cid.base.uarfcn, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort,
- cid.additionalPlmns,
- cid.optionalCsgInfo.getDiscriminator()
- == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
- : null);
- }
-
- /** @hide */
@Override
public @NonNull CellIdentityTdscdma sanitizeLocationInfo() {
return new CellIdentityTdscdma(mMccStr, mMncStr, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java
index b04a51d..9b463da 100644
--- a/telephony/java/android/telephony/CellIdentityWcdma.java
+++ b/telephony/java/android/telephony/CellIdentityWcdma.java
@@ -107,30 +107,6 @@
updateGlobalCellId();
}
- /** @hide */
- public CellIdentityWcdma(@NonNull android.hardware.radio.V1_0.CellIdentityWcdma cid) {
- this(cid.lac, cid.cid, cid.psc, cid.uarfcn, cid.mcc, cid.mnc, "", "",
- new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityWcdma(@NonNull android.hardware.radio.V1_2.CellIdentityWcdma cid) {
- this(cid.base.lac, cid.base.cid, cid.base.psc, cid.base.uarfcn,
- cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong,
- cid.operatorNames.alphaShort, new ArraySet<>(), null);
- }
-
- /** @hide */
- public CellIdentityWcdma(@NonNull android.hardware.radio.V1_5.CellIdentityWcdma cid) {
- this(cid.base.base.lac, cid.base.base.cid, cid.base.base.psc, cid.base.base.uarfcn,
- cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong,
- cid.base.operatorNames.alphaShort, cid.additionalPlmns,
- cid.optionalCsgInfo.getDiscriminator()
- == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
- : null);
- }
-
private CellIdentityWcdma(@NonNull CellIdentityWcdma cid) {
this(cid.mLac, cid.mCid, cid.mPsc, cid.mUarfcn, cid.mMccStr,
cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo);
diff --git a/telephony/java/android/telephony/CellInfo.java b/telephony/java/android/telephony/CellInfo.java
index 189a4b8..2b2df24 100644
--- a/telephony/java/android/telephony/CellInfo.java
+++ b/telephony/java/android/telephony/CellInfo.java
@@ -20,7 +20,6 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.compat.annotation.UnsupportedAppUsage;
-import android.hardware.radio.V1_4.CellInfo.Info;
import android.os.Parcel;
import android.os.Parcelable;
@@ -150,6 +149,13 @@
private long mTimeStamp;
/** @hide */
+ protected CellInfo(int cellConnectionStatus, boolean registered, long timestamp) {
+ mCellConnectionStatus = cellConnectionStatus;
+ mRegistered = registered;
+ mTimeStamp = timestamp;
+ }
+
+ /** @hide */
protected CellInfo() {
this.mRegistered = false;
this.mTimeStamp = Long.MAX_VALUE;
@@ -321,131 +327,4 @@
return new CellInfo[size];
}
};
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_0.CellInfo ci) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = ci.timeStamp;
- this.mCellConnectionStatus = CONNECTION_UNKNOWN;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_2.CellInfo ci) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = ci.timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_4.CellInfo ci, long timeStamp) {
- this.mRegistered = ci.isRegistered;
- this.mTimeStamp = timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- protected CellInfo(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- this.mRegistered = ci.registered;
- this.mTimeStamp = timeStamp;
- this.mCellConnectionStatus = ci.connectionStatus;
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_0.CellInfo ci) {
- if (ci == null) return null;
- switch(ci.cellInfoType) {
- case android.hardware.radio.V1_0.CellInfoType.GSM: return new CellInfoGsm(ci);
- case android.hardware.radio.V1_0.CellInfoType.CDMA: return new CellInfoCdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.LTE: return new CellInfoLte(ci);
- case android.hardware.radio.V1_0.CellInfoType.WCDMA: return new CellInfoWcdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.TD_SCDMA: return new CellInfoTdscdma(ci);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_2.CellInfo ci) {
- if (ci == null) return null;
- switch(ci.cellInfoType) {
- case android.hardware.radio.V1_0.CellInfoType.GSM: return new CellInfoGsm(ci);
- case android.hardware.radio.V1_0.CellInfoType.CDMA: return new CellInfoCdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.LTE: return new CellInfoLte(ci);
- case android.hardware.radio.V1_0.CellInfoType.WCDMA: return new CellInfoWcdma(ci);
- case android.hardware.radio.V1_0.CellInfoType.TD_SCDMA: return new CellInfoTdscdma(ci);
- default: return null;
- }
- }
-
- /** @hide */
- 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, 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);
- case Info.hidl_discriminator.nr: return new CellInfoNr(ci, timeStamp);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- if (ci == null) return null;
- switch (ci.ratSpecificInfo.getDiscriminator()) {
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.gsm:
- return new CellInfoGsm(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.cdma:
- return new CellInfoCdma(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.lte:
- return new CellInfoLte(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
- return new CellInfoWcdma(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
- return new CellInfoTdscdma(ci, timeStamp);
- case android.hardware.radio.V1_5.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.nr:
- return new CellInfoNr(ci, timeStamp);
- default: return null;
- }
- }
-
- /** @hide */
- public static CellInfo create(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- if (ci == null) return null;
- switch (ci.ratSpecificInfo.getDiscriminator()) {
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.gsm:
- return new CellInfoGsm(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.cdma:
- return new CellInfoCdma(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.lte:
- return new CellInfoLte(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.wcdma:
- return new CellInfoWcdma(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.tdscdma:
- return new CellInfoTdscdma(ci, timeStamp);
- case android.hardware.radio.V1_6.CellInfo
- .CellInfoRatSpecificInfo.hidl_discriminator.nr:
- return new CellInfoNr(ci, timeStamp);
- default: return null;
- }
- }
}
diff --git a/telephony/java/android/telephony/CellInfoCdma.java b/telephony/java/android/telephony/CellInfoCdma.java
index dbb30d2..aa8cff5 100644
--- a/telephony/java/android/telephony/CellInfoCdma.java
+++ b/telephony/java/android/telephony/CellInfoCdma.java
@@ -52,48 +52,11 @@
}
/** @hide */
- public CellInfoCdma(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoCdma cic = ci.cdma.get(0);
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.cdma.get(0);
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- 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 =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.ratSpecificInfo.cdma();
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
- }
-
- /** @hide */
- public CellInfoCdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_2.CellInfoCdma cic = ci.ratSpecificInfo.cdma();
- mCellIdentityCdma = new CellIdentityCdma(cic.cellIdentityCdma);
- mCellSignalStrengthCdma =
- new CellSignalStrengthCdma(cic.signalStrengthCdma, cic.signalStrengthEvdo);
+ public CellInfoCdma(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityCdma cellIdentityCdma, CellSignalStrengthCdma cellSignalStrengthCdma) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityCdma = cellIdentityCdma;
+ mCellSignalStrengthCdma = cellSignalStrengthCdma;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoGsm.java b/telephony/java/android/telephony/CellInfoGsm.java
index e1d996e..76e825b 100644
--- a/telephony/java/android/telephony/CellInfoGsm.java
+++ b/telephony/java/android/telephony/CellInfoGsm.java
@@ -51,43 +51,11 @@
}
/** @hide */
- public CellInfoGsm(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoGsm cig = ci.gsm.get(0);
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoGsm cig = ci.gsm.get(0);
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- 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);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoGsm cig = ci.ratSpecificInfo.gsm();
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
- }
-
- /** @hide */
- public CellInfoGsm(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoGsm cig = ci.ratSpecificInfo.gsm();
- mCellIdentityGsm = new CellIdentityGsm(cig.cellIdentityGsm);
- mCellSignalStrengthGsm = new CellSignalStrengthGsm(cig.signalStrengthGsm);
+ public CellInfoGsm(int cellConnectionStatus, boolean registered, long timeStamp,
+ CellIdentityGsm cellIdentityGsm, CellSignalStrengthGsm cellSignalStrengthGsm) {
+ super(cellConnectionStatus, registered, timeStamp);
+ mCellIdentityGsm = cellIdentityGsm;
+ mCellSignalStrengthGsm = cellSignalStrengthGsm;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoLte.java b/telephony/java/android/telephony/CellInfoLte.java
index 39b320a..2d176d5 100644
--- a/telephony/java/android/telephony/CellInfoLte.java
+++ b/telephony/java/android/telephony/CellInfoLte.java
@@ -56,48 +56,13 @@
}
/** @hide */
- public CellInfoLte(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoLte cil = ci.lte.get(0);
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoLte cil = ci.lte.get(0);
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
- }
-
- /** @hide */
- 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);
- mCellConfig = new CellConfigLte(cil.cellConfig);
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoLte cil = ci.ratSpecificInfo.lte();
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
- }
-
- /** @hide */
- public CellInfoLte(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_6.CellInfoLte cil = ci.ratSpecificInfo.lte();
- mCellIdentityLte = new CellIdentityLte(cil.cellIdentityLte);
- mCellSignalStrengthLte = new CellSignalStrengthLte(cil.signalStrengthLte);
- mCellConfig = new CellConfigLte();
+ public CellInfoLte(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityLte cellIdentityLte, CellSignalStrengthLte cellSignalStrengthLte,
+ CellConfigLte cellConfig) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityLte = cellIdentityLte;
+ mCellSignalStrengthLte = cellSignalStrengthLte;
+ mCellConfig = cellConfig;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoNr.java b/telephony/java/android/telephony/CellInfoNr.java
index 12e6a38..37fac24 100644
--- a/telephony/java/android/telephony/CellInfoNr.java
+++ b/telephony/java/android/telephony/CellInfoNr.java
@@ -53,27 +53,11 @@
}
/** @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);
- }
-
- /** @hide */
- public CellInfoNr(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoNr cil = ci.ratSpecificInfo.nr();
- mCellIdentity = new CellIdentityNr(cil.cellIdentityNr);
- mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrengthNr);
- }
-
- /** @hide */
- public CellInfoNr(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_6.CellInfoNr cil = ci.ratSpecificInfo.nr();
- mCellIdentity = new CellIdentityNr(cil.cellIdentityNr);
- mCellSignalStrength = new CellSignalStrengthNr(cil.signalStrengthNr);
+ public CellInfoNr(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityNr cellIdentityNr, CellSignalStrengthNr cellSignalStrengthNr) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentity = cellIdentityNr;
+ mCellSignalStrength = cellSignalStrengthNr;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoTdscdma.java b/telephony/java/android/telephony/CellInfoTdscdma.java
index 994b317..d8db429 100644
--- a/telephony/java/android/telephony/CellInfoTdscdma.java
+++ b/telephony/java/android/telephony/CellInfoTdscdma.java
@@ -54,43 +54,12 @@
}
/** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoTdscdma cit = ci.tdscdma.get(0);
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoTdscdma cit = ci.tdscdma.get(0);
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- 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);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoTdscdma cit = ci.ratSpecificInfo.tdscdma();
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
- }
-
- /** @hide */
- public CellInfoTdscdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoTdscdma cit = ci.ratSpecificInfo.tdscdma();
- mCellIdentityTdscdma = new CellIdentityTdscdma(cit.cellIdentityTdscdma);
- mCellSignalStrengthTdscdma = new CellSignalStrengthTdscdma(cit.signalStrengthTdscdma);
+ public CellInfoTdscdma(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityTdscdma cellIdentityTdscdma,
+ CellSignalStrengthTdscdma cellSignalStrengthTdscdma) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityTdscdma = cellIdentityTdscdma;
+ mCellSignalStrengthTdscdma = cellSignalStrengthTdscdma;
}
/**
diff --git a/telephony/java/android/telephony/CellInfoWcdma.java b/telephony/java/android/telephony/CellInfoWcdma.java
index 62ac0b8..dc8e1fe 100644
--- a/telephony/java/android/telephony/CellInfoWcdma.java
+++ b/telephony/java/android/telephony/CellInfoWcdma.java
@@ -49,43 +49,11 @@
}
/** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_0.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_0.CellInfoWcdma ciw = ci.wcdma.get(0);
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_2.CellInfo ci) {
- super(ci);
- final android.hardware.radio.V1_2.CellInfoWcdma ciw = ci.wcdma.get(0);
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- 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);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_5.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoWcdma ciw = ci.ratSpecificInfo.wcdma();
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
- }
-
- /** @hide */
- public CellInfoWcdma(android.hardware.radio.V1_6.CellInfo ci, long timeStamp) {
- super(ci, timeStamp);
- final android.hardware.radio.V1_5.CellInfoWcdma ciw = ci.ratSpecificInfo.wcdma();
- mCellIdentityWcdma = new CellIdentityWcdma(ciw.cellIdentityWcdma);
- mCellSignalStrengthWcdma = new CellSignalStrengthWcdma(ciw.signalStrengthWcdma);
+ public CellInfoWcdma(int connectionStatus, boolean registered, long timeStamp,
+ CellIdentityWcdma cellIdentityWcdma, CellSignalStrengthWcdma cellSignalStrengthWcdma) {
+ super(connectionStatus, registered, timeStamp);
+ mCellIdentityWcdma = cellIdentityWcdma;
+ mCellSignalStrengthWcdma = cellSignalStrengthWcdma;
}
/**
diff --git a/telephony/java/android/telephony/CellSignalStrength.java b/telephony/java/android/telephony/CellSignalStrength.java
index e089657..9727ab7 100644
--- a/telephony/java/android/telephony/CellSignalStrength.java
+++ b/telephony/java/android/telephony/CellSignalStrength.java
@@ -108,7 +108,7 @@
// Range for RSSI in ASU (0-31, 99) as defined in TS 27.007 8.69
/** @hide */
- protected static final int getRssiDbmFromAsu(int asu) {
+ public static final int getRssiDbmFromAsu(int asu) {
if (asu > 31 || asu < 0) return CellInfo.UNAVAILABLE;
return -113 + (2 * asu);
}
@@ -122,7 +122,7 @@
// Range for RSCP in ASU (0-96, 255) as defined in TS 27.007 8.69
/** @hide */
- protected static final int getRscpDbmFromAsu(int asu) {
+ public static final int getRscpDbmFromAsu(int asu) {
if (asu > 96 || asu < 0) return CellInfo.UNAVAILABLE;
return asu - 120;
}
@@ -136,7 +136,7 @@
// Range for SNR in ASU (0-49, 255) as defined in TS 27.007 8.69
/** @hide */
- protected static final int getEcNoDbFromAsu(int asu) {
+ public static final int getEcNoDbFromAsu(int asu) {
if (asu > 49 || asu < 0) return CellInfo.UNAVAILABLE;
return -24 + (asu / 2);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthCdma.java b/telephony/java/android/telephony/CellSignalStrengthCdma.java
index d00049c..5298e67 100644
--- a/telephony/java/android/telephony/CellSignalStrengthCdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthCdma.java
@@ -78,13 +78,6 @@
}
/** @hide */
- public CellSignalStrengthCdma(android.hardware.radio.V1_0.CdmaSignalStrength cdma,
- android.hardware.radio.V1_0.EvdoSignalStrength evdo) {
- // Convert from HAL values as part of construction.
- this(-cdma.dbm, -cdma.ecio, -evdo.dbm, -evdo.ecio, evdo.signalNoiseRatio);
- }
-
- /** @hide */
public CellSignalStrengthCdma(CellSignalStrengthCdma s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthGsm.java b/telephony/java/android/telephony/CellSignalStrengthGsm.java
index 51e1ebc..7b78084 100644
--- a/telephony/java/android/telephony/CellSignalStrengthGsm.java
+++ b/telephony/java/android/telephony/CellSignalStrengthGsm.java
@@ -67,16 +67,6 @@
}
/** @hide */
- public CellSignalStrengthGsm(android.hardware.radio.V1_0.GsmSignalStrength gsm) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(gsm.signalStrength), gsm.bitErrorRate, gsm.timingAdvance);
-
- if (mRssi == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
public CellSignalStrengthGsm(CellSignalStrengthGsm s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index 9211482..e8633dd 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -166,25 +166,6 @@
}
/** @hide */
- public CellSignalStrengthLte(android.hardware.radio.V1_0.LteSignalStrength lte) {
- // Convert from HAL values as part of construction.
- this(convertRssiAsuToDBm(lte.signalStrength),
- lte.rsrp != CellInfo.UNAVAILABLE ? -lte.rsrp : lte.rsrp,
- lte.rsrq != CellInfo.UNAVAILABLE ? -lte.rsrq : lte.rsrq,
- convertRssnrUnitFromTenDbToDB(lte.rssnr), lte.cqi, lte.timingAdvance);
- }
-
- /** @hide */
- public CellSignalStrengthLte(android.hardware.radio.V1_6.LteSignalStrength lte) {
- // Convert from HAL values as part of construction.
- this(convertRssiAsuToDBm(lte.base.signalStrength),
- lte.base.rsrp != CellInfo.UNAVAILABLE ? -lte.base.rsrp : lte.base.rsrp,
- lte.base.rsrq != CellInfo.UNAVAILABLE ? -lte.base.rsrq : lte.base.rsrq,
- convertRssnrUnitFromTenDbToDB(lte.base.rssnr), lte.cqiTableIndex, lte.base.cqi,
- lte.base.timingAdvance);
- }
-
- /** @hide */
public CellSignalStrengthLte(CellSignalStrengthLte s) {
copyFrom(s);
}
@@ -617,11 +598,13 @@
Rlog.w(LOG_TAG, s);
}
- private static int convertRssnrUnitFromTenDbToDB(int rssnr) {
+ /** @hide */
+ public static int convertRssnrUnitFromTenDbToDB(int rssnr) {
return rssnr / 10;
}
- private static int convertRssiAsuToDBm(int rssiAsu) {
+ /** @hide */
+ public static int convertRssiAsuToDBm(int rssiAsu) {
if (rssiAsu == SIGNAL_STRENGTH_LTE_RSSI_ASU_UNKNOWN) {
return CellInfo.UNAVAILABLE;
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index 6ada32e..cd22abd 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -202,29 +202,12 @@
}
/**
- * @hide
- * @param ss signal strength from modem.
- */
- public CellSignalStrengthNr(android.hardware.radio.V1_4.NrSignalStrength ss) {
- this(flip(ss.csiRsrp), flip(ss.csiRsrq), ss.csiSinr, flip(ss.ssRsrp), flip(ss.ssRsrq),
- ss.ssSinr);
- }
-
- /**
- * @hide
- * @param ss signal strength from modem.
- */
- public CellSignalStrengthNr(android.hardware.radio.V1_6.NrSignalStrength ss) {
- this(flip(ss.base.csiRsrp), flip(ss.base.csiRsrq), ss.base.csiSinr, ss.csiCqiTableIndex,
- ss.csiCqiReport, flip(ss.base.ssRsrp), flip(ss.base.ssRsrq), ss.base.ssSinr);
- }
-
- /**
* Flip sign cell strength value when taking in the value from hal
* @param val cell strength value
* @return flipped value
+ * @hide
*/
- private static int flip(int val) {
+ public static int flip(int val) {
return val != CellInfo.UNAVAILABLE ? -val : val;
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
index e96f200..8a7c70e 100644
--- a/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthTdscdma.java
@@ -75,28 +75,6 @@
}
/** @hide */
- public CellSignalStrengthTdscdma(android.hardware.radio.V1_0.TdScdmaSignalStrength tdscdma) {
- // Convert from HAL values as part of construction.
- this(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE,
- tdscdma.rscp != CellInfo.UNAVAILABLE ? -tdscdma.rscp : tdscdma.rscp);
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
- public CellSignalStrengthTdscdma(android.hardware.radio.V1_2.TdscdmaSignalStrength tdscdma) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(tdscdma.signalStrength),
- tdscdma.bitErrorRate, getRscpDbmFromAsu(tdscdma.rscp));
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
public CellSignalStrengthTdscdma(CellSignalStrengthTdscdma s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/CellSignalStrengthWcdma.java b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
index 8b14b74..f30440d 100644
--- a/telephony/java/android/telephony/CellSignalStrengthWcdma.java
+++ b/telephony/java/android/telephony/CellSignalStrengthWcdma.java
@@ -95,30 +95,6 @@
}
/** @hide */
- public CellSignalStrengthWcdma(android.hardware.radio.V1_0.WcdmaSignalStrength wcdma) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(wcdma.signalStrength), wcdma.bitErrorRate,
- CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE);
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
- public CellSignalStrengthWcdma(android.hardware.radio.V1_2.WcdmaSignalStrength wcdma) {
- // Convert from HAL values as part of construction.
- this(getRssiDbmFromAsu(wcdma.base.signalStrength),
- wcdma.base.bitErrorRate,
- getRscpDbmFromAsu(wcdma.rscp),
- getEcNoDbFromAsu(wcdma.ecno));
-
- if (mRssi == CellInfo.UNAVAILABLE && mRscp == CellInfo.UNAVAILABLE) {
- setDefaultValues();
- }
- }
-
- /** @hide */
public CellSignalStrengthWcdma(CellSignalStrengthWcdma s) {
copyFrom(s);
}
diff --git a/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java b/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java
index e926272..bf418ab 100644
--- a/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java
+++ b/telephony/java/android/telephony/ClosedSubscriberGroupInfo.java
@@ -44,12 +44,6 @@
mCsgIdentity = csgIdentity;
}
- /** @hide */
- public ClosedSubscriberGroupInfo(
- @NonNull android.hardware.radio.V1_5.ClosedSubscriberGroupInfo csgInfo) {
- this(csgInfo.csgIndication, csgInfo.homeNodebName, csgInfo.csgIdentity);
- }
-
/**
* Indicates whether the cell is restricted to only CSG members.
*
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index b317c55..b7bc467 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -144,64 +144,6 @@
mTimestampMillis = SystemClock.elapsedRealtime();
}
- /**
- * Constructor for Radio HAL V1.0
- *
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_0.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gw),
- new CellSignalStrengthWcdma(),
- new CellSignalStrengthTdscdma(signalStrength.tdScdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr());
- }
-
- /**
- * Constructor for Radio HAL V1.2
- *
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_2.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gsm),
- new CellSignalStrengthWcdma(signalStrength.wcdma),
- new CellSignalStrengthTdscdma(signalStrength.tdScdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr());
- }
-
- /**
- * Constructor for Radio HAL V1.4.
- *
- * @param signalStrength signal strength reported from modem.
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_4.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gsm),
- new CellSignalStrengthWcdma(signalStrength.wcdma),
- new CellSignalStrengthTdscdma(signalStrength.tdscdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr(signalStrength.nr));
- }
-
- /**
- * Constructor for Radio HAL V1.6.
- *
- * @param signalStrength signal strength reported from modem.
- * @hide
- */
- public SignalStrength(android.hardware.radio.V1_6.SignalStrength signalStrength) {
- this(new CellSignalStrengthCdma(signalStrength.cdma, signalStrength.evdo),
- new CellSignalStrengthGsm(signalStrength.gsm),
- new CellSignalStrengthWcdma(signalStrength.wcdma),
- new CellSignalStrengthTdscdma(signalStrength.tdscdma),
- new CellSignalStrengthLte(signalStrength.lte),
- new CellSignalStrengthNr(signalStrength.nr));
- }
-
private CellSignalStrength getPrimary() {
// This behavior is intended to replicate the legacy behavior of getLevel() by prioritizing
// newer faster RATs for default/for display purposes.