diff options
author | Simon Shields <keepcalm444@gmail.com> | 2016-02-25 19:45:33 +1100 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-02-25 20:23:43 +1100 |
commit | 2ecc6a053755cf9dba8a4994501755c60d0a0c74 (patch) | |
tree | 8a918cf503059026d8d14a47d4db8ba5d23d8fec | |
parent | c8cff8ce3b0535dca43f4e5b0bc8bfb6766dd593 (diff) | |
download | device_samsung_i9300-2ecc6a053755cf9dba8a4994501755c60d0a0c74.zip device_samsung_i9300-2ecc6a053755cf9dba8a4994501755c60d0a0c74.tar.gz device_samsung_i9300-2ecc6a053755cf9dba8a4994501755c60d0a0c74.tar.bz2 |
i9300: refactor processUnsolicited closer to frameworks
* easier kanging later on
Change-Id: I0217a819187f914e261d4e58d53de3e085b97607
-rw-r--r-- | ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java b/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java index 5501efc..2b6fcc3 100644 --- a/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java +++ b/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java @@ -440,10 +440,25 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface { processUnsolicited (Parcel p) { int dataPosition = p.dataPosition(); int response = p.readInt(); + Object ret; + + try{switch(response) { + case RIL_UNSOL_STK_PROACTIVE_COMMAND: ret = responseString(p); break; + default: + // Rewind the Parcel + p.setDataPosition(dataPosition); + + // Forward responses that we are not overriding to the super class + super.processUnsolicited(p); + return; + }} catch (Throwable tr) { + Rlog.e(RILJ_LOG_TAG, "Exception processing unsol response: " + response + + " Exception: " + tr.toString()); + return; + } switch(response) { - case RIL_UNSOL_STK_PROACTIVE_COMMAND: - Object ret = responseString(p); + case RIL_UNSOL_STK_PROACTIVE_COMMAND: if (RILJ_LOGD) unsljLogRet(response, ret); if (mCatProCmdRegistrant != null) { @@ -455,15 +470,7 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface { // does not get ignored (and breaks CatService). mCatProCmdBuffer = ret; } - break; - - default: - // Rewind the Parcel - p.setDataPosition(dataPosition); - - // Forward responses that we are not overriding to the super class - super.processUnsolicited(p); - return; + break; } } |