Loading src/java/com/android/internal/telephony/RIL.java +51 −14 Original line number Diff line number Diff line Loading @@ -2875,12 +2875,31 @@ public class RIL extends BaseCommands implements CommandsInterface { */ @Override public void isVoNrEnabled(Message result, WorkSource workSource) { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_2_0)) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class, result); if (!voiceProxy.isEmpty()) { RILRequest rr = obtainRequest(RIL_REQUEST_IS_VONR_ENABLED , result, getDefaultWorkSourceIfInvalid(workSource)); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); } try { voiceProxy.isVoNrEnabled(rr.mSerial); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(VOICE_SERVICE, "isVoNrEnabled", e); } } } else { boolean isEnabled = isVoNrEnabled(); if (result != null) { AsyncResult.forMessage(result, isEnabled, null); result.sendToTarget(); } } } /** * Enable or disable Voice over NR (VoNR) Loading @@ -2889,11 +2908,28 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setVoNrEnabled(boolean enabled, Message result, WorkSource workSource) { setVoNrEnabled(enabled); if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_2_0)) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class, result); if (!voiceProxy.isEmpty()) { RILRequest rr = obtainRequest(RIL_REQUEST_ENABLE_VONR, result, getDefaultWorkSourceIfInvalid(workSource)); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); } try { voiceProxy.setVoNrEnabled(rr.mSerial, enabled); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(VOICE_SERVICE, "setVoNrEnabled", e); } } } else { /* calling a query api to let HAL know that VoNREnabled state is updated. This is a temporary work around as new HIDL API is not allowed. This is a work around as new AIDL API is not allowed for older HAL version devices. HAL can check the value of PROPERTY_IS_VONR_ENABLED property to determine if there is any change whenever it receives isNrDualConnectivityEnabled request. This behavior will be removed in Android T. */ isNrDualConnectivityEnabled(null, workSource); if (result != null) { Loading @@ -2901,6 +2937,7 @@ public class RIL extends BaseCommands implements CommandsInterface { result.sendToTarget(); } } } @Override public void setCdmaSubscriptionSource(int cdmaSubscription, Message result) { Loading src/java/com/android/internal/telephony/RILUtils.java +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_EMERGENCY_ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_MODEM; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_UICC_APPLICATIONS; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_VONR; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENTER_SIM_PIN; Loading Loading @@ -111,6 +112,7 @@ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IMS_REGIST import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IMS_SEND_SMS; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ISIM_AUTHENTICATION; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_VONR_ENABLED; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_LAST_CALL_FAIL_CAUSE; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_NV_READ_ITEM; Loading Loading @@ -4870,6 +4872,10 @@ public class RILUtils { return "GET_ALLOWED_NETWORK_TYPES_BITMAP"; case RIL_REQUEST_GET_SLICING_CONFIG: return "GET_SLICING_CONFIG"; case RIL_REQUEST_ENABLE_VONR: return "ENABLE_VONR"; case RIL_REQUEST_IS_VONR_ENABLED: return "IS_VONR_ENABLED"; default: return "<unknown request " + request + ">"; } Loading src/java/com/android/internal/telephony/RadioVoiceProxy.java +25 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,18 @@ public class RadioVoiceProxy extends RadioServiceProxy { } } /** * Call IRadioVoice#isVoNrEnabled * @param serial Serial number of request * @throws RemoteException */ public void isVoNrEnabled(int serial) throws RemoteException { if (isEmpty()) return; if (isAidl()) { mVoiceProxy.isVoNrEnabled(serial); } } /** * Call IRadioVoice#rejectCall * @param serial Serial number of request Loading Loading @@ -600,6 +612,19 @@ public class RadioVoiceProxy extends RadioServiceProxy { } } /** * Call IRadioVoice#setVoNrEnabled * @param serial Serial number of request * @param enable True to enable, false to disable * @throws RemoteException */ public void setVoNrEnabled(int serial, boolean enable) throws RemoteException { if (isEmpty()) return; if (isAidl()) { mVoiceProxy.setVoNrEnabled(serial, enable); } } /** * Call IRadioVoice#startDtmf * @param serial Serial number of request Loading src/java/com/android/internal/telephony/VoiceResponse.java +15 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,14 @@ public class VoiceResponse extends IRadioVoiceResponse.Stub { RadioResponse.responseVoid(mRil, responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error * @param enable true for "vonr enabled" and false for "vonr disabled" */ public void isVoNrEnabledResponse(RadioResponseInfo responseInfo, boolean enable) { RadioResponse.responseInts(mRil, responseInfo, enable ? 1 : 0); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ Loading Loading @@ -333,6 +341,13 @@ public class VoiceResponse extends IRadioVoiceResponse.Stub { RadioResponse.responseVoid(mRil, responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ public void setVoNrEnabledResponse(RadioResponseInfo responseInfo) { RadioResponse.responseVoid(mRil, responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ Loading Loading
src/java/com/android/internal/telephony/RIL.java +51 −14 Original line number Diff line number Diff line Loading @@ -2875,12 +2875,31 @@ public class RIL extends BaseCommands implements CommandsInterface { */ @Override public void isVoNrEnabled(Message result, WorkSource workSource) { if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_2_0)) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class, result); if (!voiceProxy.isEmpty()) { RILRequest rr = obtainRequest(RIL_REQUEST_IS_VONR_ENABLED , result, getDefaultWorkSourceIfInvalid(workSource)); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); } try { voiceProxy.isVoNrEnabled(rr.mSerial); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(VOICE_SERVICE, "isVoNrEnabled", e); } } } else { boolean isEnabled = isVoNrEnabled(); if (result != null) { AsyncResult.forMessage(result, isEnabled, null); result.sendToTarget(); } } } /** * Enable or disable Voice over NR (VoNR) Loading @@ -2889,11 +2908,28 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void setVoNrEnabled(boolean enabled, Message result, WorkSource workSource) { setVoNrEnabled(enabled); if (mRadioVersion.greaterOrEqual(RADIO_HAL_VERSION_2_0)) { RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class, result); if (!voiceProxy.isEmpty()) { RILRequest rr = obtainRequest(RIL_REQUEST_ENABLE_VONR, result, getDefaultWorkSourceIfInvalid(workSource)); if (RILJ_LOGD) { riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)); } try { voiceProxy.setVoNrEnabled(rr.mSerial, enabled); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(VOICE_SERVICE, "setVoNrEnabled", e); } } } else { /* calling a query api to let HAL know that VoNREnabled state is updated. This is a temporary work around as new HIDL API is not allowed. This is a work around as new AIDL API is not allowed for older HAL version devices. HAL can check the value of PROPERTY_IS_VONR_ENABLED property to determine if there is any change whenever it receives isNrDualConnectivityEnabled request. This behavior will be removed in Android T. */ isNrDualConnectivityEnabled(null, workSource); if (result != null) { Loading @@ -2901,6 +2937,7 @@ public class RIL extends BaseCommands implements CommandsInterface { result.sendToTarget(); } } } @Override public void setCdmaSubscriptionSource(int cdmaSubscription, Message result) { Loading
src/java/com/android/internal/telephony/RILUtils.java +6 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_EMERGENCY_ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_MODEM; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_UICC_APPLICATIONS; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENABLE_VONR; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ENTER_SIM_PIN; Loading Loading @@ -111,6 +112,7 @@ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IMS_REGIST import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IMS_SEND_SMS; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ISIM_AUTHENTICATION; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_VONR_ENABLED; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_LAST_CALL_FAIL_CAUSE; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE; import static com.android.internal.telephony.RILConstants.RIL_REQUEST_NV_READ_ITEM; Loading Loading @@ -4870,6 +4872,10 @@ public class RILUtils { return "GET_ALLOWED_NETWORK_TYPES_BITMAP"; case RIL_REQUEST_GET_SLICING_CONFIG: return "GET_SLICING_CONFIG"; case RIL_REQUEST_ENABLE_VONR: return "ENABLE_VONR"; case RIL_REQUEST_IS_VONR_ENABLED: return "IS_VONR_ENABLED"; default: return "<unknown request " + request + ">"; } Loading
src/java/com/android/internal/telephony/RadioVoiceProxy.java +25 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,18 @@ public class RadioVoiceProxy extends RadioServiceProxy { } } /** * Call IRadioVoice#isVoNrEnabled * @param serial Serial number of request * @throws RemoteException */ public void isVoNrEnabled(int serial) throws RemoteException { if (isEmpty()) return; if (isAidl()) { mVoiceProxy.isVoNrEnabled(serial); } } /** * Call IRadioVoice#rejectCall * @param serial Serial number of request Loading Loading @@ -600,6 +612,19 @@ public class RadioVoiceProxy extends RadioServiceProxy { } } /** * Call IRadioVoice#setVoNrEnabled * @param serial Serial number of request * @param enable True to enable, false to disable * @throws RemoteException */ public void setVoNrEnabled(int serial, boolean enable) throws RemoteException { if (isEmpty()) return; if (isAidl()) { mVoiceProxy.setVoNrEnabled(serial, enable); } } /** * Call IRadioVoice#startDtmf * @param serial Serial number of request Loading
src/java/com/android/internal/telephony/VoiceResponse.java +15 −0 Original line number Diff line number Diff line Loading @@ -256,6 +256,14 @@ public class VoiceResponse extends IRadioVoiceResponse.Stub { RadioResponse.responseVoid(mRil, responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error * @param enable true for "vonr enabled" and false for "vonr disabled" */ public void isVoNrEnabledResponse(RadioResponseInfo responseInfo, boolean enable) { RadioResponse.responseInts(mRil, responseInfo, enable ? 1 : 0); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ Loading Loading @@ -333,6 +341,13 @@ public class VoiceResponse extends IRadioVoiceResponse.Stub { RadioResponse.responseVoid(mRil, responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ public void setVoNrEnabledResponse(RadioResponseInfo responseInfo) { RadioResponse.responseVoid(mRil, responseInfo); } /** * @param responseInfo Response info struct containing response type, serial no. and error */ Loading