From 2ecc6a053755cf9dba8a4994501755c60d0a0c74 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Thu, 25 Feb 2016 19:45:33 +1100 Subject: i9300: refactor processUnsolicited closer to frameworks * easier kanging later on Change-Id: I0217a819187f914e261d4e58d53de3e085b97607 --- .../internal/telephony/SamsungExynos4RIL.java | 29 ++++++++++++++-------- 1 file 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; } } -- cgit v1.1