summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Harold <nharold@google.com>2020-04-03 23:28:39 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-04-03 23:28:39 +0000
commit3a87f98eb634cbcd99b2ec1154528acebddbea4b (patch)
tree41ad7cb9901344f8211549ffb5949009e6e98d49
parent2bded37dfceb4737b943404fb3c9da816a642455 (diff)
parent8f19e4f21f858ef31075f6163b4ffff43a4420c9 (diff)
Merge "Check HIDL Discriminator for CSG Info"
-rw-r--r--telephony/java/android/telephony/CellIdentityLte.java6
-rw-r--r--telephony/java/android/telephony/CellIdentityTdscdma.java7
-rw-r--r--telephony/java/android/telephony/CellIdentityWcdma.java6
3 files changed, 13 insertions, 6 deletions
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index c37735c729a2..13a8273d64d4 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -153,8 +153,10 @@ public final class CellIdentityLte extends CellIdentity {
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.csgInfo() != null
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null);
+ cid.optionalCsgInfo.getDiscriminator()
+ == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
+ ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
+ : null);
}
private CellIdentityLte(@NonNull CellIdentityLte cid) {
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index 3f95596a076e..6dffe922ffd1 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -128,8 +128,11 @@ public final class CellIdentityTdscdma extends CellIdentity {
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.csgInfo() != null
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null);
+ cid.additionalPlmns,
+ cid.optionalCsgInfo.getDiscriminator()
+ == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
+ ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
+ : null);
}
/** @hide */
diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java
index 38c4ed482e14..eab174ade3b7 100644
--- a/telephony/java/android/telephony/CellIdentityWcdma.java
+++ b/telephony/java/android/telephony/CellIdentityWcdma.java
@@ -123,8 +123,10 @@ public final class CellIdentityWcdma extends CellIdentity {
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.csgInfo() != null
- ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null);
+ cid.optionalCsgInfo.getDiscriminator()
+ == android.hardware.radio.V1_5.OptionalCsgInfo.hidl_discriminator.csgInfo
+ ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo())
+ : null);
}
private CellIdentityWcdma(@NonNull CellIdentityWcdma cid) {