summaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2012-11-30 19:27:47 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2012-12-01 15:21:50 +0700
commit5ff73894a8dcc170df79c274c6770ee539c6b351 (patch)
tree099e2a0e7dbaa69aedf2f81fd31e55ed65d2b724 /src/java/com
parentdc4e9dff039c7fd935bfe844a5c0be15400749d0 (diff)
downloadframeworks_opt_telephony-5ff73894a8dcc170df79c274c6770ee539c6b351.zip
frameworks_opt_telephony-5ff73894a8dcc170df79c274c6770ee539c6b351.tar.gz
frameworks_opt_telephony-5ff73894a8dcc170df79c274c6770ee539c6b351.tar.bz2
SamsungExynos3RIL: buffer CAT Proactive Command
The RIL sends a CAT proactive command (init) before the registrant is registered causing the command to be missed and STK menu to not show up. Buffer it and fire it when the registrant is registered. Change-Id: I021ce911e55b30c1a2d95d8060f7d9ff72e3b742
Diffstat (limited to 'src/java/com')
-rw-r--r--src/java/com/android/internal/telephony/SamsungExynos3RIL.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/SamsungExynos3RIL.java b/src/java/com/android/internal/telephony/SamsungExynos3RIL.java
index 5cf1933..1993af2 100644
--- a/src/java/com/android/internal/telephony/SamsungExynos3RIL.java
+++ b/src/java/com/android/internal/telephony/SamsungExynos3RIL.java
@@ -31,6 +31,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.AsyncResult;
import android.os.Parcel;
+import android.os.Registrant;
import android.os.SystemProperties;
import android.telephony.PhoneNumberUtils;
import android.telephony.SignalStrength;
@@ -60,6 +61,7 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
private boolean mSignalbarCount = SystemProperties.getInt("ro.telephony.sends_barcount", 0) == 1 ? true : false;
private boolean mIsSamsungCdma = SystemProperties.getBoolean("ro.ril.samsung_cdma", false);
+ private Object mCatProCmdBuffer;
public SamsungExynos3RIL(Context context, int networkMode, int cdmaSubscription) {
super(context, networkMode, cdmaSubscription);
@@ -352,6 +354,7 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
case RIL_UNSOL_SIGNAL_STRENGTH: ret = responseSignalStrength(p); break;
case RIL_UNSOL_CDMA_INFO_REC: ret = responseCdmaInformationRecord(p); break;
case RIL_UNSOL_HSDPA_STATE_CHANGED: ret = responseInts(p); break;
+ case RIL_UNSOL_STK_PROACTIVE_COMMAND: ret = responseString(p); break;
//fixing anoying Exceptions caused by the new Samsung states
//FIXME figure out what the states mean an what data is in the parcel
@@ -437,6 +440,20 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
}
break;
+ case RIL_UNSOL_STK_PROACTIVE_COMMAND:
+ if (RILJ_LOGD) unsljLogRet(response, ret);
+
+ if (mCatProCmdRegistrant != null) {
+ mCatProCmdRegistrant.notifyRegistrant(
+ new AsyncResult (null, ret, null));
+ } else {
+ // The RIL will send a CAT proactive command before the
+ // registrant is registered. Buffer it to make sure it
+ // does not get ignored (and breaks CatService).
+ mCatProCmdBuffer = ret;
+ }
+ break;
+
case RIL_UNSOL_CDMA_INFO_REC:
ArrayList<CdmaInformationRecords> listInfoRecs;
@@ -878,6 +895,17 @@ public class SamsungExynos3RIL extends RIL implements CommandsInterface {
send(rr);
}
+
+ @Override
+ public void setOnCatProactiveCmd(Handler h, int what, Object obj) {
+ mCatProCmdRegistrant = new Registrant (h, what, obj);
+ if (mCatProCmdBuffer != null) {
+ mCatProCmdRegistrant.notifyRegistrant(
+ new AsyncResult (null, mCatProCmdBuffer, null));
+ mCatProCmdBuffer = null;
+ }
+ }
+
/* private class that does the handling for the dataconnection
* dataconnection is done async, so we send the request for disabling it,
* wait for the response, set the prefered networktype and notify the