Loading telephony/java/com/android/internal/telephony/RIL.java +27 −24 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ class RILRequest { } void onError(int error) { onError(int error, Object ret) { CommandException ex; ex = CommandException.fromRilErrno(error); Loading @@ -175,7 +175,7 @@ class RILRequest { + " error: " + ex); if (mResult != null) { AsyncResult.forMessage(mResult, null, ex); AsyncResult.forMessage(mResult, ret, ex); mResult.sendToTarget(); } Loading Loading @@ -290,7 +290,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { s = mSocket; if (s == null) { rr.onError(RADIO_NOT_AVAILABLE); rr.onError(RADIO_NOT_AVAILABLE, null); rr.release(); mRequestMessagesPending--; alreadySubtracted = true; Loading Loading @@ -331,7 +331,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { // make sure this request has not already been handled, // eg, if RILReceiver cleared the list. if (req != null || !alreadySubtracted) { rr.onError(RADIO_NOT_AVAILABLE); rr.onError(RADIO_NOT_AVAILABLE, null); rr.release(); } } catch (RuntimeException exc) { Loading @@ -340,7 +340,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { // make sure this request has not already been handled, // eg, if RILReceiver cleared the list. if (req != null || !alreadySubtracted) { rr.onError(GENERIC_FAILURE); rr.onError(GENERIC_FAILURE, null); rr.release(); } } Loading Loading @@ -545,7 +545,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { synchronized (mRequestsList) { for (int i = 0, sz = mRequestsList.size() ; i < sz ; i++) { RILRequest rr = mRequestsList.get(i); rr.onError(RADIO_NOT_AVAILABLE); rr.onError(RADIO_NOT_AVAILABLE, null); rr.release(); } Loading Loading @@ -1986,14 +1986,10 @@ public final class RIL extends BaseCommands implements CommandsInterface { return; } if (error != 0) { rr.onError(error); rr.release(); return; } Object ret; Object ret = null; if (error == 0 || p.dataAvail() > 0) { // either command succeeds or command fails but with data payload try {switch (rr.mRequest) { /* cat libs/telephony/ril_commands.h \ Loading Loading @@ -2118,6 +2114,13 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.release(); return; } } if (error != 0) { rr.onError(error, ret); rr.release(); return; } if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest) + " " + retToString(rr.mRequest, ret)); Loading Loading
telephony/java/com/android/internal/telephony/RIL.java +27 −24 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ class RILRequest { } void onError(int error) { onError(int error, Object ret) { CommandException ex; ex = CommandException.fromRilErrno(error); Loading @@ -175,7 +175,7 @@ class RILRequest { + " error: " + ex); if (mResult != null) { AsyncResult.forMessage(mResult, null, ex); AsyncResult.forMessage(mResult, ret, ex); mResult.sendToTarget(); } Loading Loading @@ -290,7 +290,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { s = mSocket; if (s == null) { rr.onError(RADIO_NOT_AVAILABLE); rr.onError(RADIO_NOT_AVAILABLE, null); rr.release(); mRequestMessagesPending--; alreadySubtracted = true; Loading Loading @@ -331,7 +331,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { // make sure this request has not already been handled, // eg, if RILReceiver cleared the list. if (req != null || !alreadySubtracted) { rr.onError(RADIO_NOT_AVAILABLE); rr.onError(RADIO_NOT_AVAILABLE, null); rr.release(); } } catch (RuntimeException exc) { Loading @@ -340,7 +340,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { // make sure this request has not already been handled, // eg, if RILReceiver cleared the list. if (req != null || !alreadySubtracted) { rr.onError(GENERIC_FAILURE); rr.onError(GENERIC_FAILURE, null); rr.release(); } } Loading Loading @@ -545,7 +545,7 @@ public final class RIL extends BaseCommands implements CommandsInterface { synchronized (mRequestsList) { for (int i = 0, sz = mRequestsList.size() ; i < sz ; i++) { RILRequest rr = mRequestsList.get(i); rr.onError(RADIO_NOT_AVAILABLE); rr.onError(RADIO_NOT_AVAILABLE, null); rr.release(); } Loading Loading @@ -1986,14 +1986,10 @@ public final class RIL extends BaseCommands implements CommandsInterface { return; } if (error != 0) { rr.onError(error); rr.release(); return; } Object ret; Object ret = null; if (error == 0 || p.dataAvail() > 0) { // either command succeeds or command fails but with data payload try {switch (rr.mRequest) { /* cat libs/telephony/ril_commands.h \ Loading Loading @@ -2118,6 +2114,13 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.release(); return; } } if (error != 0) { rr.onError(error, ret); rr.release(); return; } if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest) + " " + retToString(rr.mRequest, ret)); Loading