Fixed the incorrect cdma RAT detection logic.

Used the correct CDMA bitmask to determine if the bearer services
are based on 3GPP2 radio technologies.

bug: 26318528
Change-Id: Ic30c25aa7b67372898a041dd1f3a08a3abede394
This commit is contained in:
Jack Yu
2016-01-04 10:04:34 -08:00
parent d2cf0ce9c1
commit fa530b4a10

View File

@@ -153,6 +153,17 @@ public class ServiceState implements Parcelable {
* @hide * @hide
*/ */
public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18; public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18;
/** @hide */
public static final int RIL_RADIO_CDMA_TECHNOLOGY_BITMASK =
(1 << (RIL_RADIO_TECHNOLOGY_IS95A - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_IS95B - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_1xRTT - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_EVDO_0 - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_EVDO_A - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_EVDO_B - 1))
| (1 << (RIL_RADIO_TECHNOLOGY_EHRPD - 1));
/** /**
* Available registration states for GSM, UMTS and CDMA. * Available registration states for GSM, UMTS and CDMA.
*/ */
@@ -1141,16 +1152,8 @@ public class ServiceState implements Parcelable {
} }
/** @hide */ /** @hide */
public static boolean hasCdma(int radioTechnologyBitmask) { public static boolean bearerBitmapHasCdma(int radioTechnologyBitmap) {
int cdmaBitmask = (RIL_RADIO_TECHNOLOGY_IS95A return (RIL_RADIO_CDMA_TECHNOLOGY_BITMASK & radioTechnologyBitmap) != 0;
| RIL_RADIO_TECHNOLOGY_IS95B
| RIL_RADIO_TECHNOLOGY_1xRTT
| RIL_RADIO_TECHNOLOGY_EVDO_0
| RIL_RADIO_TECHNOLOGY_EVDO_A
| RIL_RADIO_TECHNOLOGY_EVDO_B
| RIL_RADIO_TECHNOLOGY_EHRPD);
return ((radioTechnologyBitmask & cdmaBitmask) != 0);
} }
/** @hide */ /** @hide */