diff options
| author | 2020-09-25 22:44:13 +0000 | |
|---|---|---|
| committer | 2020-09-25 22:44:13 +0000 | |
| commit | c4a8dba9711c7a06f5a772912d42230fb3658728 (patch) | |
| tree | 9af57bc6f31275dde5c685745a97e58fd20998dc | |
| parent | b1b830369e476191bfe909f9978d4c778980b1ed (diff) | |
| parent | c02910f164fa03bdc9baf471b6ca6d41b93b3220 (diff) | |
Merge "Add ncid to CellLocation in CellIdentityNr" am: c02910f164
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1438914
Change-Id: I84ea44169995dafff41ce947abce91ec44118dcc
| -rw-r--r-- | telephony/java/android/telephony/CellIdentityNr.java | 6 | ||||
| -rw-r--r-- | telephony/java/android/telephony/gsm/GsmCellLocation.java | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java index 067b98a16779..05cef9b92896 100644 --- a/telephony/java/android/telephony/CellIdentityNr.java +++ b/telephony/java/android/telephony/CellIdentityNr.java @@ -138,7 +138,11 @@ public final class CellIdentityNr extends CellIdentity { @NonNull @Override public CellLocation asCellLocation() { - return new GsmCellLocation(); + GsmCellLocation cl = new GsmCellLocation(); + int tac = mTac != CellInfo.UNAVAILABLE ? mTac : -1; + cl.setLacAndCid(tac, -1); + cl.setPsc(0); + return cl; } @Override diff --git a/telephony/java/android/telephony/gsm/GsmCellLocation.java b/telephony/java/android/telephony/gsm/GsmCellLocation.java index 30cea0e6dd59..bc8ee1dd9359 100644 --- a/telephony/java/android/telephony/gsm/GsmCellLocation.java +++ b/telephony/java/android/telephony/gsm/GsmCellLocation.java @@ -55,7 +55,7 @@ public class GsmCellLocation extends CellLocation { } /** - * @return gsm cell id, -1 if unknown, 0xffff max legal value + * @return gsm cell id, -1 if unknown or invalid, 0xffff max legal value */ public int getCid() { return mCid; |