diff options
author | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2012-12-09 03:27:05 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-12-09 03:27:05 -0800 |
commit | e15ecd0fa9e5858b35a35702852ce702ac3ba5f6 (patch) | |
tree | e898eac4f8b36fe487759443256518b3846865c4 /src/java/com | |
parent | 424c86550a5d8840eaa1980606e9c04e64cf011a (diff) | |
parent | 5ff73894a8dcc170df79c274c6770ee539c6b351 (diff) | |
download | frameworks_opt_telephony-e15ecd0fa9e5858b35a35702852ce702ac3ba5f6.zip frameworks_opt_telephony-e15ecd0fa9e5858b35a35702852ce702ac3ba5f6.tar.gz frameworks_opt_telephony-e15ecd0fa9e5858b35a35702852ce702ac3ba5f6.tar.bz2 |
Merge "SamsungExynos3RIL: buffer CAT Proactive Command" into mr1-staging
Diffstat (limited to 'src/java/com')
-rw-r--r-- | src/java/com/android/internal/telephony/SamsungExynos3RIL.java | 28 |
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 |