Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72727ffd authored by Aishwarya Mallampati's avatar Aishwarya Mallampati
Browse files

Removed duplicate error messages in

RadioConfig.java

If proxy returned by getRadioConfigProxy() is empty, then there is no
need to send error message again as RADIO_NOT_AVAILABLE error is already
sent to target by getRadioConfigProxy().

Bug: 230675060
Test: Sanity
Change-Id: Iee2fb444ea649f4d629742027b6c4885dd9e51ab
Merged-In: Iee2fb444ea649f4d629742027b6c4885dd9e51ab
parent b62ced8f
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -454,6 +454,8 @@ public class RadioConfig extends Handler {
     */
    public void setPreferredDataModem(int modemId, Message result) {
        RadioConfigProxy proxy = getRadioConfigProxy(null);
        if (proxy.isEmpty()) return;

        if (!isSetPreferredDataCommandSupported()) {
            if (result != null) {
                AsyncResult.forMessage(result, null,
@@ -480,7 +482,9 @@ public class RadioConfig extends Handler {
     */
    public void getPhoneCapability(Message result) {
        RadioConfigProxy proxy = getRadioConfigProxy(null);
        if (proxy.isEmpty() || proxy.getVersion().less(RADIO_CONFIG_HAL_VERSION_1_1)) {
        if (proxy.isEmpty()) return;

        if (proxy.getVersion().less(RADIO_CONFIG_HAL_VERSION_1_1)) {
            if (result != null) {
                AsyncResult.forMessage(result, null,
                        CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
@@ -537,7 +541,9 @@ public class RadioConfig extends Handler {
     */
    public void setNumOfLiveModems(int numOfLiveModems, Message result) {
        RadioConfigProxy proxy = getRadioConfigProxy(result);
        if (proxy.isEmpty() || proxy.getVersion().less(RADIO_CONFIG_HAL_VERSION_1_1)) {
        if (proxy.isEmpty()) return;

        if (proxy.getVersion().less(RADIO_CONFIG_HAL_VERSION_1_1)) {
            if (result != null) {
                AsyncResult.forMessage(
                        result, null, CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
@@ -581,7 +587,9 @@ public class RadioConfig extends Handler {
     */
    public void getHalDeviceCapabilities(Message result) {
        RadioConfigProxy proxy = getRadioConfigProxy(Message.obtain(result));
        if (proxy.isEmpty() || proxy.getVersion().less(RADIO_CONFIG_HAL_VERSION_1_3)) {
        if (proxy.isEmpty()) return;

        if (proxy.getVersion().less(RADIO_CONFIG_HAL_VERSION_1_3)) {
            if (result != null) {
                if (DBG) {
                    logd("RIL_REQUEST_GET_HAL_DEVICE_CAPABILITIES > REQUEST_NOT_SUPPORTED");