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

Commit a24f84bd authored by Ling Ma's avatar Ling Ma Committed by Android (Google) Code Review
Browse files

Merge "Check whether radio available before whether request supported" into main

parents 9f8be83f 2c63e9f0
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -1295,23 +1295,22 @@ public class RIL extends BaseCommands implements CommandsInterface {
        } else if (proxy instanceof RadioImsProxy) {
            service = HAL_SERVICE_IMS;
        }

        if (mHalVersion.get(service).less(version)) {
            riljLoge(String.format("%s not supported on service %s < %s.",
                    request, serviceToString(service), version));
        if (proxy == null || proxy.isEmpty()) {
            riljLoge(String.format("Unable to complete %s because service %s is not available.",
                    request, serviceToString(service)));
            if (result != null) {
                AsyncResult.forMessage(result, null,
                        CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
                        CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
                result.sendToTarget();
            }
            return false;
        }
        if (proxy == null || proxy.isEmpty()) {
            riljLoge(String.format("Unable to complete %s because service %s is not available.",
                    request, serviceToString(service)));
        if (mHalVersion.get(service).less(version)) {
            riljLoge(String.format("%s not supported on service %s < %s.",
                    request, serviceToString(service), version));
            if (result != null) {
                AsyncResult.forMessage(result, null,
                        CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
                        CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
                result.sendToTarget();
            }
            return false;