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

Commit ff290f05 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "ProxyController.setRadioCability - do not throw exception on...

Merge "ProxyController.setRadioCability - do not throw exception on simultaneous requests." into lmp-mr1-dev
parents f5960ecb 12fe7c9d
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -224,8 +224,9 @@ public class ProxyController {
     * @param rafs an RadioAccessFamily array to indicate all phone's
     *        new radio access family. The length of RadioAccessFamily
     *        must equal to phone count.
     * @return false if another session is already active and the request is rejected.
     */
    public void setRadioCapability(RadioAccessFamily[] rafs) {
    public boolean setRadioCapability(RadioAccessFamily[] rafs) {
        if (rafs.length != mProxyPhones.length) {
            throw new RuntimeException("Length of input rafs must equal to total phone count");
        }
@@ -237,7 +238,9 @@ public class ProxyController {
                logd("setRadioCapability: mSetRadioAccessFamilyStatus[" + i + "]="
                        + mSetRadioAccessFamilyStatus[i]);
                if (mSetRadioAccessFamilyStatus[i] != SET_RC_STATUS_IDLE) {
                    throw new RuntimeException("setRadioCapability: Phone" + i + " is not idle");
                    // TODO: The right behaviour is to cancel previous request and send this.
                    loge("setRadioCapability: Phone[" + i + "] is not idle. Rejecting request.");
                    return false;
                }
            }
        }
@@ -282,6 +285,8 @@ public class ProxyController {
                        EVENT_START_RC_RESPONSE);
            }
        }

        return true;
    }

    private Handler mHandler = new Handler() {
@@ -596,6 +601,10 @@ public class ProxyController {
        Rlog.d(LOG_TAG, string);
    }

    private void loge(String string) {
        Rlog.e(LOG_TAG, string);
    }

    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
        try {
            mDctController.dump(fd, pw, args);