Loading Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -51,8 +51,10 @@ java_library { "android.hardware.radio-V1.1-java", "android.hardware.radio-V1.2-java", "android.hardware.radio-V1.3-java", "android.hardware.radio-V1.4-java", "android.hardware.radio.config-V1.0-java", "android.hardware.radio.config-V1.1-java", "android.hardware.radio.config-V1.2-java", "android.hardware.radio.deprecated-V1.0-java", "android.hidl.base-V1.0-java", ], Loading src/java/com/android/internal/telephony/CellularNetworkService.java +3 −3 Original line number Diff line number Diff line Loading @@ -294,9 +294,9 @@ public class CellularNetworkService extends NetworkService { accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */); } else if (result instanceof android.hardware.radio.V1_3.DataRegStateResult) { android.hardware.radio.V1_3.DataRegStateResult dataRegState = (android.hardware.radio.V1_3.DataRegStateResult) result; } else if (result instanceof android.hardware.radio.V1_4.DataRegStateResult) { android.hardware.radio.V1_4.DataRegStateResult dataRegState = (android.hardware.radio.V1_4.DataRegStateResult) result; int regState = getRegStateFromHalRegState(dataRegState.base.regState); int accessNetworkTechnology = getAccessNetworkTechnologyFromRat( dataRegState.base.rat); Loading src/java/com/android/internal/telephony/RIL.java +42 −31 Original line number Diff line number Diff line Loading @@ -165,6 +165,8 @@ public class RIL extends BaseCommands implements CommandsInterface { private static final HalVersion RADIO_HAL_VERSION_1_3 = new HalVersion(1, 3); private static final HalVersion RADIO_HAL_VERSION_1_4 = new HalVersion(1, 4); // IRadio version private HalVersion mRadioVersion = RADIO_HAL_VERSION_UNKNOWN; Loading Loading @@ -400,12 +402,21 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLoge("getRadioProxy: mRadioProxy for " + HIDL_SERVICE_NAME[mPhoneId] + " is disabled"); } else { try { mRadioProxy = android.hardware.radio.V1_4.IRadio.getService( HIDL_SERVICE_NAME[mPhoneId], true); mRadioVersion = RADIO_HAL_VERSION_1_4; } catch (NoSuchElementException e) { } if (mRadioProxy == null) { try { mRadioProxy = android.hardware.radio.V1_3.IRadio.getService( HIDL_SERVICE_NAME[mPhoneId], true); mRadioVersion = RADIO_HAL_VERSION_1_3; } catch (NoSuchElementException e) { } } if (mRadioProxy == null) { try { Loading Loading @@ -1235,14 +1246,14 @@ public class RIL extends BaseCommands implements CommandsInterface { } /** * Convert to DataProfileInfo defined in radio/1.3/types.hal * Convert to DataProfileInfo defined in radio/1.4/types.hal * @param dp Data profile * @return A converted data profile */ private static android.hardware.radio.V1_3.DataProfileInfo convertToHalDataProfile13( private static android.hardware.radio.V1_4.DataProfileInfo convertToHalDataProfile14( DataProfile dp) { android.hardware.radio.V1_3.DataProfileInfo dpi = new android.hardware.radio.V1_3.DataProfileInfo(); android.hardware.radio.V1_4.DataProfileInfo dpi = new android.hardware.radio.V1_4.DataProfileInfo(); dpi.apn = dp.getApn(); dpi.protocol = dp.getProtocol(); Loading Loading @@ -1311,14 +1322,14 @@ public class RIL extends BaseCommands implements CommandsInterface { } try { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { // IRadio V1.3 android.hardware.radio.V1_3.IRadio radioProxy13 = (android.hardware.radio.V1_3.IRadio) radioProxy; if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { // IRadio V1.4 android.hardware.radio.V1_4.IRadio radioProxy14 = (android.hardware.radio.V1_4.IRadio) radioProxy; // Convert to HAL data profile android.hardware.radio.V1_3.DataProfileInfo dpi = convertToHalDataProfile13(dataProfile); android.hardware.radio.V1_4.DataProfileInfo dpi = convertToHalDataProfile14(dataProfile); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) Loading @@ -1327,10 +1338,10 @@ public class RIL extends BaseCommands implements CommandsInterface { + ",addresses=" + addresses + ",dnses=" + dnses); } radioProxy13.setupDataCall_1_3(rr.mSerial, accessNetworkType, dpi, allowRoaming, radioProxy14.setupDataCall_1_4(rr.mSerial, accessNetworkType, dpi, allowRoaming, reason, addresses, dnses); } else if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_2)) { // IRadio V1.2 // IRadio V1.2 and IRadio V1.3 android.hardware.radio.V1_2.IRadio radioProxy12 = (android.hardware.radio.V1_2.IRadio) radioProxy; Loading Loading @@ -3144,14 +3155,14 @@ public class RIL extends BaseCommands implements CommandsInterface { } try { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { // v1.3 android.hardware.radio.V1_3.IRadio radioProxy13 = (android.hardware.radio.V1_3.IRadio) radioProxy; radioProxy13.setInitialAttachApn_1_3(rr.mSerial, convertToHalDataProfile13(dataProfile)); if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { // v1.4 android.hardware.radio.V1_4.IRadio radioProxy14 = (android.hardware.radio.V1_4.IRadio) radioProxy; radioProxy14.setInitialAttachApn_1_4(rr.mSerial, convertToHalDataProfile14(dataProfile)); } else { // v1.2, v1.1, and v1.0 // v1.3, v1.2, v1.1, and v1.0 radioProxy.setInitialAttachApn(rr.mSerial, convertToHalDataProfile10(dataProfile), dataProfile.isPersistent(), isRoaming); Loading Loading @@ -3544,17 +3555,17 @@ public class RIL extends BaseCommands implements CommandsInterface { RILRequest rr = null; try { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { // V1.3 android.hardware.radio.V1_3.IRadio radioProxy13 = (android.hardware.radio.V1_3.IRadio) radioProxy; if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { // V1.4 android.hardware.radio.V1_4.IRadio radioProxy14 = (android.hardware.radio.V1_4.IRadio) radioProxy; rr = obtainRequest(RIL_REQUEST_SET_DATA_PROFILE, result, mRILDefaultWorkSource); ArrayList<android.hardware.radio.V1_3.DataProfileInfo> dpis = new ArrayList<>(); ArrayList<android.hardware.radio.V1_4.DataProfileInfo> dpis = new ArrayList<>(); for (DataProfile dp : dps) { dpis.add(convertToHalDataProfile13(dp)); dpis.add(convertToHalDataProfile14(dp)); } if (RILJ_LOGD) { Loading @@ -3565,9 +3576,9 @@ public class RIL extends BaseCommands implements CommandsInterface { } } radioProxy13.setDataProfile_1_3(rr.mSerial, dpis); radioProxy14.setDataProfile_1_4(rr.mSerial, dpis); } else { // V1.0, 1.1, and 1.2 // V1.0, 1.1, 1,2 and 1.3 ArrayList<android.hardware.radio.V1_0.DataProfileInfo> dpis = new ArrayList<>(); for (DataProfile dp : dps) { // For v1.0 to v1.2, we only send data profiles that has the persistent Loading Loading @@ -5806,10 +5817,10 @@ public class RIL extends BaseCommands implements CommandsInterface { TransportManager.IWLAN_OPERATION_MODE_DEFAULT); // If the operation mode is default, then we use the HAL version to determine it. // On 1.3 or later version of IRadio, it is expected the device to support // On 1.4 or later version of IRadio, it is expected the device to support // IWLAN AP-assisted mode. if (mode == TransportManager.IWLAN_OPERATION_MODE_DEFAULT) { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { return TransportManager.IWLAN_OPERATION_MODE_AP_ASSISTED; } else { return TransportManager.IWLAN_OPERATION_MODE_LEGACY; Loading src/java/com/android/internal/telephony/RadioConfig.java +3 −3 Original line number Diff line number Diff line Loading @@ -357,10 +357,10 @@ public class RadioConfig extends Handler { return response; } static ArrayList<IccSlotStatus> convertHalSlotStatus_1_1( ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> halSlotStatusList) { static ArrayList<IccSlotStatus> convertHalSlotStatus_1_2( ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> halSlotStatusList) { ArrayList<IccSlotStatus> response = new ArrayList<IccSlotStatus>(halSlotStatusList.size()); for (android.hardware.radio.config.V1_1.SimSlotStatus slotStatus : halSlotStatusList) { for (android.hardware.radio.config.V1_2.SimSlotStatus slotStatus : halSlotStatusList) { IccSlotStatus iccSlotStatus = new IccSlotStatus(); iccSlotStatus.setCardState(slotStatus.base.cardState); iccSlotStatus.setSlotState(slotStatus.base.slotState); Loading src/java/com/android/internal/telephony/RadioConfigIndication.java +3 −3 Original line number Diff line number Diff line Loading @@ -51,9 +51,9 @@ public class RadioConfigIndication extends IRadioConfigIndication.Stub { /** * Unsolicited indication for slot status changed */ public void simSlotsStatusChanged_1_1(int indicationType, ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> slotStatus) { ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_1(slotStatus); public void simSlotsStatusChanged_1_2(int indicationType, ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> slotStatus) { ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_2(slotStatus); Rlog.d(TAG, "[UNSL]< " + " UNSOL_SIM_SLOT_STATUS_CHANGED " + ret.toString()); if (mRadioConfig.mSimSlotStatusRegistrant != null) { mRadioConfig.mSimSlotStatusRegistrant.notifyRegistrant( Loading Loading
Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -51,8 +51,10 @@ java_library { "android.hardware.radio-V1.1-java", "android.hardware.radio-V1.2-java", "android.hardware.radio-V1.3-java", "android.hardware.radio-V1.4-java", "android.hardware.radio.config-V1.0-java", "android.hardware.radio.config-V1.1-java", "android.hardware.radio.config-V1.2-java", "android.hardware.radio.deprecated-V1.0-java", "android.hidl.base-V1.0-java", ], Loading
src/java/com/android/internal/telephony/CellularNetworkService.java +3 −3 Original line number Diff line number Diff line Loading @@ -294,9 +294,9 @@ public class CellularNetworkService extends NetworkService { accessNetworkTechnology, reasonForDenial, emergencyOnly, availableServices, cellIdentity, maxDataCalls, false /* isDcNrRestricted */, false /* isNrAvailable */); } else if (result instanceof android.hardware.radio.V1_3.DataRegStateResult) { android.hardware.radio.V1_3.DataRegStateResult dataRegState = (android.hardware.radio.V1_3.DataRegStateResult) result; } else if (result instanceof android.hardware.radio.V1_4.DataRegStateResult) { android.hardware.radio.V1_4.DataRegStateResult dataRegState = (android.hardware.radio.V1_4.DataRegStateResult) result; int regState = getRegStateFromHalRegState(dataRegState.base.regState); int accessNetworkTechnology = getAccessNetworkTechnologyFromRat( dataRegState.base.rat); Loading
src/java/com/android/internal/telephony/RIL.java +42 −31 Original line number Diff line number Diff line Loading @@ -165,6 +165,8 @@ public class RIL extends BaseCommands implements CommandsInterface { private static final HalVersion RADIO_HAL_VERSION_1_3 = new HalVersion(1, 3); private static final HalVersion RADIO_HAL_VERSION_1_4 = new HalVersion(1, 4); // IRadio version private HalVersion mRadioVersion = RADIO_HAL_VERSION_UNKNOWN; Loading Loading @@ -400,12 +402,21 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLoge("getRadioProxy: mRadioProxy for " + HIDL_SERVICE_NAME[mPhoneId] + " is disabled"); } else { try { mRadioProxy = android.hardware.radio.V1_4.IRadio.getService( HIDL_SERVICE_NAME[mPhoneId], true); mRadioVersion = RADIO_HAL_VERSION_1_4; } catch (NoSuchElementException e) { } if (mRadioProxy == null) { try { mRadioProxy = android.hardware.radio.V1_3.IRadio.getService( HIDL_SERVICE_NAME[mPhoneId], true); mRadioVersion = RADIO_HAL_VERSION_1_3; } catch (NoSuchElementException e) { } } if (mRadioProxy == null) { try { Loading Loading @@ -1235,14 +1246,14 @@ public class RIL extends BaseCommands implements CommandsInterface { } /** * Convert to DataProfileInfo defined in radio/1.3/types.hal * Convert to DataProfileInfo defined in radio/1.4/types.hal * @param dp Data profile * @return A converted data profile */ private static android.hardware.radio.V1_3.DataProfileInfo convertToHalDataProfile13( private static android.hardware.radio.V1_4.DataProfileInfo convertToHalDataProfile14( DataProfile dp) { android.hardware.radio.V1_3.DataProfileInfo dpi = new android.hardware.radio.V1_3.DataProfileInfo(); android.hardware.radio.V1_4.DataProfileInfo dpi = new android.hardware.radio.V1_4.DataProfileInfo(); dpi.apn = dp.getApn(); dpi.protocol = dp.getProtocol(); Loading Loading @@ -1311,14 +1322,14 @@ public class RIL extends BaseCommands implements CommandsInterface { } try { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { // IRadio V1.3 android.hardware.radio.V1_3.IRadio radioProxy13 = (android.hardware.radio.V1_3.IRadio) radioProxy; if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { // IRadio V1.4 android.hardware.radio.V1_4.IRadio radioProxy14 = (android.hardware.radio.V1_4.IRadio) radioProxy; // Convert to HAL data profile android.hardware.radio.V1_3.DataProfileInfo dpi = convertToHalDataProfile13(dataProfile); android.hardware.radio.V1_4.DataProfileInfo dpi = convertToHalDataProfile14(dataProfile); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + requestToString(rr.mRequest) Loading @@ -1327,10 +1338,10 @@ public class RIL extends BaseCommands implements CommandsInterface { + ",addresses=" + addresses + ",dnses=" + dnses); } radioProxy13.setupDataCall_1_3(rr.mSerial, accessNetworkType, dpi, allowRoaming, radioProxy14.setupDataCall_1_4(rr.mSerial, accessNetworkType, dpi, allowRoaming, reason, addresses, dnses); } else if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_2)) { // IRadio V1.2 // IRadio V1.2 and IRadio V1.3 android.hardware.radio.V1_2.IRadio radioProxy12 = (android.hardware.radio.V1_2.IRadio) radioProxy; Loading Loading @@ -3144,14 +3155,14 @@ public class RIL extends BaseCommands implements CommandsInterface { } try { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { // v1.3 android.hardware.radio.V1_3.IRadio radioProxy13 = (android.hardware.radio.V1_3.IRadio) radioProxy; radioProxy13.setInitialAttachApn_1_3(rr.mSerial, convertToHalDataProfile13(dataProfile)); if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { // v1.4 android.hardware.radio.V1_4.IRadio radioProxy14 = (android.hardware.radio.V1_4.IRadio) radioProxy; radioProxy14.setInitialAttachApn_1_4(rr.mSerial, convertToHalDataProfile14(dataProfile)); } else { // v1.2, v1.1, and v1.0 // v1.3, v1.2, v1.1, and v1.0 radioProxy.setInitialAttachApn(rr.mSerial, convertToHalDataProfile10(dataProfile), dataProfile.isPersistent(), isRoaming); Loading Loading @@ -3544,17 +3555,17 @@ public class RIL extends BaseCommands implements CommandsInterface { RILRequest rr = null; try { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { // V1.3 android.hardware.radio.V1_3.IRadio radioProxy13 = (android.hardware.radio.V1_3.IRadio) radioProxy; if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { // V1.4 android.hardware.radio.V1_4.IRadio radioProxy14 = (android.hardware.radio.V1_4.IRadio) radioProxy; rr = obtainRequest(RIL_REQUEST_SET_DATA_PROFILE, result, mRILDefaultWorkSource); ArrayList<android.hardware.radio.V1_3.DataProfileInfo> dpis = new ArrayList<>(); ArrayList<android.hardware.radio.V1_4.DataProfileInfo> dpis = new ArrayList<>(); for (DataProfile dp : dps) { dpis.add(convertToHalDataProfile13(dp)); dpis.add(convertToHalDataProfile14(dp)); } if (RILJ_LOGD) { Loading @@ -3565,9 +3576,9 @@ public class RIL extends BaseCommands implements CommandsInterface { } } radioProxy13.setDataProfile_1_3(rr.mSerial, dpis); radioProxy14.setDataProfile_1_4(rr.mSerial, dpis); } else { // V1.0, 1.1, and 1.2 // V1.0, 1.1, 1,2 and 1.3 ArrayList<android.hardware.radio.V1_0.DataProfileInfo> dpis = new ArrayList<>(); for (DataProfile dp : dps) { // For v1.0 to v1.2, we only send data profiles that has the persistent Loading Loading @@ -5806,10 +5817,10 @@ public class RIL extends BaseCommands implements CommandsInterface { TransportManager.IWLAN_OPERATION_MODE_DEFAULT); // If the operation mode is default, then we use the HAL version to determine it. // On 1.3 or later version of IRadio, it is expected the device to support // On 1.4 or later version of IRadio, it is expected the device to support // IWLAN AP-assisted mode. if (mode == TransportManager.IWLAN_OPERATION_MODE_DEFAULT) { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_3)) { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_1_4)) { return TransportManager.IWLAN_OPERATION_MODE_AP_ASSISTED; } else { return TransportManager.IWLAN_OPERATION_MODE_LEGACY; Loading
src/java/com/android/internal/telephony/RadioConfig.java +3 −3 Original line number Diff line number Diff line Loading @@ -357,10 +357,10 @@ public class RadioConfig extends Handler { return response; } static ArrayList<IccSlotStatus> convertHalSlotStatus_1_1( ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> halSlotStatusList) { static ArrayList<IccSlotStatus> convertHalSlotStatus_1_2( ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> halSlotStatusList) { ArrayList<IccSlotStatus> response = new ArrayList<IccSlotStatus>(halSlotStatusList.size()); for (android.hardware.radio.config.V1_1.SimSlotStatus slotStatus : halSlotStatusList) { for (android.hardware.radio.config.V1_2.SimSlotStatus slotStatus : halSlotStatusList) { IccSlotStatus iccSlotStatus = new IccSlotStatus(); iccSlotStatus.setCardState(slotStatus.base.cardState); iccSlotStatus.setSlotState(slotStatus.base.slotState); Loading
src/java/com/android/internal/telephony/RadioConfigIndication.java +3 −3 Original line number Diff line number Diff line Loading @@ -51,9 +51,9 @@ public class RadioConfigIndication extends IRadioConfigIndication.Stub { /** * Unsolicited indication for slot status changed */ public void simSlotsStatusChanged_1_1(int indicationType, ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> slotStatus) { ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_1(slotStatus); public void simSlotsStatusChanged_1_2(int indicationType, ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> slotStatus) { ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_2(slotStatus); Rlog.d(TAG, "[UNSL]< " + " UNSOL_SIM_SLOT_STATUS_CHANGED " + ret.toString()); if (mRadioConfig.mSimSlotStatusRegistrant != null) { mRadioConfig.mSimSlotStatusRegistrant.notifyRegistrant( Loading