diff options
| author | 2020-08-19 14:54:39 +0000 | |
|---|---|---|
| committer | 2020-08-19 14:54:39 +0000 | |
| commit | f12f3415d071fb297f4366ef201e12d05e3f525c (patch) | |
| tree | 18586b228c0ca798ebe9136c30f2af50da66c7d7 | |
| parent | c235669ec270d4d967c6476cc72080a0d1fae10e (diff) | |
| parent | 3737f3a44aaf8e9381dc836fa0e1dd36d0fb926a (diff) | |
Merge "Add default constructor to NR cell classes"
| -rw-r--r-- | telephony/java/android/telephony/CellIdentityNr.java | 12 | ||||
| -rw-r--r-- | telephony/java/android/telephony/CellInfoNr.java | 14 |
2 files changed, 25 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java index 8dd7bdd57841..6c55c70e6cc2 100644 --- a/telephony/java/android/telephony/CellIdentityNr.java +++ b/telephony/java/android/telephony/CellIdentityNr.java @@ -50,6 +50,18 @@ public final class CellIdentityNr extends CellIdentity { // a list of additional PLMN-IDs reported for this cell private final ArraySet<String> mAdditionalPlmns; + /** @hide */ + public CellIdentityNr() { + super(TAG, CellInfo.TYPE_NR, null, null, null, null); + mNrArfcn = CellInfo.UNAVAILABLE; + mPci = CellInfo.UNAVAILABLE; + mTac = CellInfo.UNAVAILABLE; + mNci = CellInfo.UNAVAILABLE; + mBands = new int[] {}; + mAdditionalPlmns = new ArraySet(); + mGlobalCellId = null; + } + /** * * @param pci Physical Cell Id in range [0, 1007]. diff --git a/telephony/java/android/telephony/CellInfoNr.java b/telephony/java/android/telephony/CellInfoNr.java index a7e79f93ae89..e01e8f0d5b51 100644 --- a/telephony/java/android/telephony/CellInfoNr.java +++ b/telephony/java/android/telephony/CellInfoNr.java @@ -29,9 +29,16 @@ import java.util.Objects; public final class CellInfoNr extends CellInfo { private static final String TAG = "CellInfoNr"; - private final CellIdentityNr mCellIdentity; + private CellIdentityNr mCellIdentity; private final CellSignalStrengthNr mCellSignalStrength; + /** @hide */ + public CellInfoNr() { + super(); + mCellIdentity = new CellIdentityNr(); + mCellSignalStrength = new CellSignalStrengthNr(); + } + private CellInfoNr(Parcel in) { super(in); mCellIdentity = CellIdentityNr.CREATOR.createFromParcel(in); @@ -71,6 +78,11 @@ public final class CellInfoNr extends CellInfo { return mCellIdentity; } + /** @hide */ + public void setCellIdentity(CellIdentityNr cid) { + mCellIdentity = cid; + } + /** * @return a {@link CellSignalStrengthNr} instance. */ |