Loading telephony/java/android/telephony/CellIdentityCdma.java +50 −20 Original line number Diff line number Diff line Loading @@ -105,7 +105,16 @@ public final class CellIdentityCdma extends CellIdentity { */ public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat, @Nullable String alphal, @Nullable String alphas) { super(TAG, CellInfo.TYPE_CDMA, null, null, alphal, alphas); super(TAG, CellInfo.TYPE_CDMA, null, null, Flags.cleanupCdma() ? null : alphal, Flags.cleanupCdma() ? null : alphas); if (Flags.cleanupCdma()) { mNetworkId = CellInfo.UNAVAILABLE; mSystemId = CellInfo.UNAVAILABLE; mBasestationId = CellInfo.UNAVAILABLE; mLongitude = CellInfo.UNAVAILABLE; mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = inRangeOrUnavailable(nid, 0, NETWORK_ID_MAX); mSystemId = inRangeOrUnavailable(sid, 0, SYSTEM_ID_MAX); mBasestationId = inRangeOrUnavailable(bid, 0, BASESTATION_ID_MAX); Loading @@ -120,6 +129,7 @@ public final class CellIdentityCdma extends CellIdentity { } updateGlobalCellId(); } } private CellIdentityCdma(@NonNull CellIdentityCdma cid) { this(cid.mNetworkId, cid.mSystemId, cid.mBasestationId, cid.mLongitude, cid.mLatitude, Loading Loading @@ -300,6 +310,25 @@ public final class CellIdentityCdma extends CellIdentity { /** Construct from Parcel, type has already been processed */ private CellIdentityCdma(Parcel in) { super(TAG, CellInfo.TYPE_CDMA, in); if (Flags.cleanupCdma()) { in.readInt(); mNetworkId = CellInfo.UNAVAILABLE; in.readInt(); mSystemId = CellInfo.UNAVAILABLE; in.readInt(); mBasestationId = CellInfo.UNAVAILABLE; in.readInt(); mLongitude = CellInfo.UNAVAILABLE; in.readInt(); mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = in.readInt(); mSystemId = in.readInt(); mBasestationId = in.readInt(); Loading @@ -309,6 +338,7 @@ public final class CellIdentityCdma extends CellIdentity { updateGlobalCellId(); if (DBG) log(toString()); } } /** * Implement the Parcelable interface Loading telephony/java/android/telephony/CellSignalStrengthCdma.java +22 −7 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.PersistableBundle; import com.android.internal.telephony.flags.Flags; import com.android.telephony.Rlog; import java.util.Objects; Loading Loading @@ -68,6 +69,9 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements */ public CellSignalStrengthCdma(int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr) { if (Flags.cleanupCdma()) { setDefaultValues(); } else { mCdmaDbm = inRangeOrUnavailable(cdmaDbm, -120, 0); mCdmaEcio = inRangeOrUnavailable(cdmaEcio, -160, 0); mEvdoDbm = inRangeOrUnavailable(evdoDbm, -120, 0); Loading @@ -76,6 +80,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements updateLevel(null, null); } } /** @hide */ public CellSignalStrengthCdma(CellSignalStrengthCdma s) { Loading @@ -84,6 +89,10 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ protected void copyFrom(CellSignalStrengthCdma s) { if (Flags.cleanupCdma()) { setDefaultValues(); return; } mCdmaDbm = s.mCdmaDbm; mCdmaEcio = s.mCdmaEcio; mEvdoDbm = s.mEvdoDbm; Loading Loading @@ -389,6 +398,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ @Override public boolean isValid() { if (Flags.cleanupCdma()) return false; return !this.equals(sInvalid); } Loading Loading @@ -446,8 +456,13 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements mEvdoEcio = in.readInt(); mEvdoSnr = in.readInt(); mLevel = in.readInt(); if (Flags.cleanupCdma()) { setDefaultValues(); } else { if (DBG) log("CellSignalStrengthCdma(Parcel): " + toString()); } } /** Implement the Parcelable interface */ @Override Loading Loading
telephony/java/android/telephony/CellIdentityCdma.java +50 −20 Original line number Diff line number Diff line Loading @@ -105,7 +105,16 @@ public final class CellIdentityCdma extends CellIdentity { */ public CellIdentityCdma(int nid, int sid, int bid, int lon, int lat, @Nullable String alphal, @Nullable String alphas) { super(TAG, CellInfo.TYPE_CDMA, null, null, alphal, alphas); super(TAG, CellInfo.TYPE_CDMA, null, null, Flags.cleanupCdma() ? null : alphal, Flags.cleanupCdma() ? null : alphas); if (Flags.cleanupCdma()) { mNetworkId = CellInfo.UNAVAILABLE; mSystemId = CellInfo.UNAVAILABLE; mBasestationId = CellInfo.UNAVAILABLE; mLongitude = CellInfo.UNAVAILABLE; mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = inRangeOrUnavailable(nid, 0, NETWORK_ID_MAX); mSystemId = inRangeOrUnavailable(sid, 0, SYSTEM_ID_MAX); mBasestationId = inRangeOrUnavailable(bid, 0, BASESTATION_ID_MAX); Loading @@ -120,6 +129,7 @@ public final class CellIdentityCdma extends CellIdentity { } updateGlobalCellId(); } } private CellIdentityCdma(@NonNull CellIdentityCdma cid) { this(cid.mNetworkId, cid.mSystemId, cid.mBasestationId, cid.mLongitude, cid.mLatitude, Loading Loading @@ -300,6 +310,25 @@ public final class CellIdentityCdma extends CellIdentity { /** Construct from Parcel, type has already been processed */ private CellIdentityCdma(Parcel in) { super(TAG, CellInfo.TYPE_CDMA, in); if (Flags.cleanupCdma()) { in.readInt(); mNetworkId = CellInfo.UNAVAILABLE; in.readInt(); mSystemId = CellInfo.UNAVAILABLE; in.readInt(); mBasestationId = CellInfo.UNAVAILABLE; in.readInt(); mLongitude = CellInfo.UNAVAILABLE; in.readInt(); mLatitude = CellInfo.UNAVAILABLE; mGlobalCellId = null; } else { mNetworkId = in.readInt(); mSystemId = in.readInt(); mBasestationId = in.readInt(); Loading @@ -309,6 +338,7 @@ public final class CellIdentityCdma extends CellIdentity { updateGlobalCellId(); if (DBG) log(toString()); } } /** * Implement the Parcelable interface Loading
telephony/java/android/telephony/CellSignalStrengthCdma.java +22 −7 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.PersistableBundle; import com.android.internal.telephony.flags.Flags; import com.android.telephony.Rlog; import java.util.Objects; Loading Loading @@ -68,6 +69,9 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements */ public CellSignalStrengthCdma(int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr) { if (Flags.cleanupCdma()) { setDefaultValues(); } else { mCdmaDbm = inRangeOrUnavailable(cdmaDbm, -120, 0); mCdmaEcio = inRangeOrUnavailable(cdmaEcio, -160, 0); mEvdoDbm = inRangeOrUnavailable(evdoDbm, -120, 0); Loading @@ -76,6 +80,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements updateLevel(null, null); } } /** @hide */ public CellSignalStrengthCdma(CellSignalStrengthCdma s) { Loading @@ -84,6 +89,10 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ protected void copyFrom(CellSignalStrengthCdma s) { if (Flags.cleanupCdma()) { setDefaultValues(); return; } mCdmaDbm = s.mCdmaDbm; mCdmaEcio = s.mCdmaEcio; mEvdoDbm = s.mEvdoDbm; Loading Loading @@ -389,6 +398,7 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements /** @hide */ @Override public boolean isValid() { if (Flags.cleanupCdma()) return false; return !this.equals(sInvalid); } Loading Loading @@ -446,8 +456,13 @@ public final class CellSignalStrengthCdma extends CellSignalStrength implements mEvdoEcio = in.readInt(); mEvdoSnr = in.readInt(); mLevel = in.readInt(); if (Flags.cleanupCdma()) { setDefaultValues(); } else { if (DBG) log("CellSignalStrengthCdma(Parcel): " + toString()); } } /** Implement the Parcelable interface */ @Override Loading