summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/preference/ListPreferenceMultiSelect.java22
-rw-r--r--telephony/java/com/android/internal/telephony/QualcommSharedRIL.java2
-rw-r--r--telephony/java/com/android/internal/telephony/SamsungCDMAQualcommRIL.java21
-rw-r--r--telephony/java/com/android/internal/telephony/SamsungRIL.java287
4 files changed, 45 insertions, 287 deletions
diff --git a/core/java/android/preference/ListPreferenceMultiSelect.java b/core/java/android/preference/ListPreferenceMultiSelect.java
index a7dc1bd6..a8c711b 100644
--- a/core/java/android/preference/ListPreferenceMultiSelect.java
+++ b/core/java/android/preference/ListPreferenceMultiSelect.java
@@ -31,6 +31,8 @@ public class ListPreferenceMultiSelect extends ListPreference {
private boolean[] mClickedDialogEntryIndices;
+ private String mSummary;
+
public ListPreferenceMultiSelect(Context context) {
super(context);
}
@@ -106,4 +108,24 @@ public class ListPreferenceMultiSelect extends ListPreference {
}
}
}
+
+ @Override
+ public CharSequence getSummary() {
+ final CharSequence entry = getEntry();
+ if (mSummary == null) {
+ return super.getSummary();
+ } else {
+ return mSummary;
+ }
+ }
+
+ @Override
+ public void setSummary(CharSequence summary) {
+ super.setSummary(summary);
+ if (summary == null && mSummary != null) {
+ mSummary = null;
+ } else if (summary != null && !summary.equals(mSummary)) {
+ mSummary = summary.toString();
+ }
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java b/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java
index 811919d..4c29b2f 100644
--- a/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java
+++ b/telephony/java/com/android/internal/telephony/QualcommSharedRIL.java
@@ -629,7 +629,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
}
}
- private void setRadioStateFromRILInt (int stateCode) {
+ protected void setRadioStateFromRILInt (int stateCode) {
CommandsInterface.RadioState radioState;
HandlerThread handlerThread;
Looper looper;
diff --git a/telephony/java/com/android/internal/telephony/SamsungCDMAQualcommRIL.java b/telephony/java/com/android/internal/telephony/SamsungCDMAQualcommRIL.java
index 6a5487f..643c181 100644
--- a/telephony/java/com/android/internal/telephony/SamsungCDMAQualcommRIL.java
+++ b/telephony/java/com/android/internal/telephony/SamsungCDMAQualcommRIL.java
@@ -44,6 +44,7 @@ import java.util.Collections;
* Samsung CDMA RIL doesn't send CDMA NV in RIUM infomation format which causes the CDMA RIL stack to crash and end up not being provisioned.
* Samsung put CDMA NV in GSM format. I forced the RIL stack to process CDMA NV request as a GSM SIM in CDMA mode.
* Custom Qualcomm No SimReady RIL using the latest Uicc stack
+ * Check for CDMA phone on RADIO_ON* event and if so set status to RUIM_NOT_READY to trigger CSIM/RUIM processing
*
* {@hide}
*/
@@ -90,17 +91,17 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
ca.pin1_replaced = p.readInt();
ca.pin1 = ca.PinStateFromRILInt(p.readInt());
ca.pin2 = ca.PinStateFromRILInt(p.readInt());
- p.readInt(); //remaining_count_pin1
- p.readInt(); //remaining_count_puk1
- p.readInt(); //remaining_count_pin2
- p.readInt(); //remaining_count_puk2
+ p.readInt(); //remaining_count_pin1 - pin1_num_retries
+ p.readInt(); //remaining_count_puk1 - puk1_num_retries
+ p.readInt(); //remaining_count_pin2 - pin2_num_retries
+ p.readInt(); //remaining_count_puk2 - puk2_num_retries
+ p.readInt(); // - perso_unblock_retries
status.addApplication(ca);
}
int appIndex = -1;
appIndex = status.getGsmUmtsSubscriptionAppIndex();
Log.d(LOG_TAG, "This is a CDMA PHONE " + appIndex);
-
if (numApplications > 0) {
IccCardApplication application = status.getApplication(appIndex);
mAid = application.aid;
@@ -116,7 +117,8 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
return status;
}
- private void setRadioStateFromRILInt (int stateCode) {
+ @Override
+ protected void setRadioStateFromRILInt (int stateCode) {
CommandsInterface.RadioState radioState;
HandlerThread handlerThread;
Looper looper;
@@ -146,8 +148,12 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
mIccHandler = new IccHandler(this,looper);
mIccHandler.run();
}
- radioState = CommandsInterface.RadioState.SIM_NOT_READY;
+ if (mPhoneType == RILConstants.CDMA_PHONE) {
+ radioState = CommandsInterface.RadioState.RUIM_NOT_READY;
+ } else {
+ radioState = CommandsInterface.RadioState.SIM_NOT_READY;
+ }
setRadioState(radioState);
break;
default:
@@ -156,6 +162,7 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
setRadioState (radioState);
}
+
@Override
protected Object
responseSignalStrength(Parcel p) {
diff --git a/telephony/java/com/android/internal/telephony/SamsungRIL.java b/telephony/java/com/android/internal/telephony/SamsungRIL.java
index fca571c..fa19714 100644
--- a/telephony/java/com/android/internal/telephony/SamsungRIL.java
+++ b/telephony/java/com/android/internal/telephony/SamsungRIL.java
@@ -65,7 +65,6 @@ public class SamsungRIL extends RIL implements CommandsInterface {
}
// SAMSUNG SGS STATES
- static final int RIL_UNSOL_STK_SEND_SMS_RESULT = 11002;
static final int RIL_UNSOL_O2_HOME_ZONE_INFO = 11007;
static final int RIL_UNSOL_DEVICE_READY_NOTI = 11008;
static final int RIL_UNSOL_GPS_NOTI = 11009;
@@ -337,53 +336,26 @@ public class SamsungRIL extends RIL implements CommandsInterface {
processUnsolicited (Parcel p) {
int response;
Object ret;
+ int dataPosition = p.dataPosition();
response = p.readInt();
- try {switch(response) {
+ switch(response) {
/*
cat libs/telephony/ril_unsol_commands.h \
| egrep "^ *{RIL_" \
| sed -re 's/\{([^,]+),[^,]+,([^}]+).+/case \1: \2(rr, p); break;/'
*/
- case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: ret = responseVoid(p); break;
- case RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED: ret = responseVoid(p); break;
- case RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED: ret = responseVoid(p); break;
- case RIL_UNSOL_RESPONSE_NEW_SMS: ret = responseString(p); break;
- case RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT: ret = responseString(p); break;
- case RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM: ret = responseInts(p); break;
- case RIL_UNSOL_ON_USSD: ret = responseStrings(p); break;
case RIL_UNSOL_NITZ_TIME_RECEIVED: ret = responseString(p); break;
case RIL_UNSOL_SIGNAL_STRENGTH: ret = responseSignalStrength(p); break;
- case RIL_UNSOL_DATA_CALL_LIST_CHANGED: ret = responseDataCallList(p);break;
- case RIL_UNSOL_SUPP_SVC_NOTIFICATION: ret = responseSuppServiceNotification(p); break;
- case RIL_UNSOL_STK_SESSION_END: ret = responseVoid(p); break;
- case RIL_UNSOL_STK_PROACTIVE_COMMAND: ret = responseString(p); break;
- case RIL_UNSOL_STK_EVENT_NOTIFY: ret = responseString(p); break;
- case RIL_UNSOL_STK_CALL_SETUP: ret = responseInts(p); break;
- case RIL_UNSOL_SIM_SMS_STORAGE_FULL: ret = responseVoid(p); break;
- case RIL_UNSOL_SIM_REFRESH: ret = responseInts(p); break;
- case RIL_UNSOL_CALL_RING: ret = responseCallRing(p); break;
- case RIL_UNSOL_RESTRICTED_STATE_CHANGED: ret = responseInts(p); break;
- case RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED: ret = responseVoid(p); break;
- case RIL_UNSOL_RESPONSE_CDMA_NEW_SMS: ret = responseCdmaSms(p); break;
- case RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS: ret = responseString(p); break;
- case RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL: ret = responseVoid(p); break;
- case RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE: ret = responseVoid(p); break;
- case RIL_UNSOL_CDMA_CALL_WAITING: ret = responseCdmaCallWaiting(p); break;
- case RIL_UNSOL_CDMA_OTA_PROVISION_STATUS: ret = responseInts(p); break;
case RIL_UNSOL_CDMA_INFO_REC: ret = responseCdmaInformationRecord(p); break;
- case RIL_UNSOL_OEM_HOOK_RAW: ret = responseRaw(p); break;
- case RIL_UNSOL_RINGBACK_TONE: ret = responseInts(p); break;
- case RIL_UNSOL_RESEND_INCALL_MUTE: ret = responseVoid(p); break;
case RIL_UNSOL_HSDPA_STATE_CHANGED: ret = responseInts(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
case RIL_UNSOL_O2_HOME_ZONE_INFO: ret = responseVoid(p); break;
- case RIL_UNSOL_STK_SEND_SMS_RESULT: ret = responseVoid(p); break;
case RIL_UNSOL_DEVICE_READY_NOTI: ret = responseVoid(p); break;
case RIL_UNSOL_GPS_NOTI: ret = responseVoid(p); break; // Ignored in TW RIL.
case RIL_UNSOL_SAMSUNG_UNKNOWN_MAGIC_REQUEST: ret = responseVoid(p); break;
@@ -391,28 +363,15 @@ public class SamsungRIL extends RIL implements CommandsInterface {
case RIL_UNSOL_AM: ret = responseString(p); break;
default:
- throw new RuntimeException("Unrecognized unsol response: " + response);
- //break; (implied)
- }} catch (Throwable tr) {
- Log.e(LOG_TAG, "Exception processing unsol response: " + response +
- "Exception:" + tr.toString());
+ // Rewind the Parcel
+ p.setDataPosition(dataPosition);
+
+ // Forward responses that we are not overriding to the super class
+ super.processUnsolicited(p);
return;
}
switch(response) {
- case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED:
- /* has bonus radio state int */
- RadioState newState = getRadioStateFromInt(p.readInt());
- if (RILJ_LOGD) unsljLogMore(response, newState.toString());
-
- switchToRadioState(newState);
- break;
- case RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED:
- if (RILJ_LOGD) unsljLog(response);
-
- mCallStateRegistrants
- .notifyRegistrants(new AsyncResult(null, null, null));
- break;
case RIL_UNSOL_HSDPA_STATE_CHANGED:
if (RILJ_LOGD) unsljLog(response);
@@ -433,66 +392,6 @@ public class SamsungRIL extends RIL implements CommandsInterface {
}
break;
- case RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED:
- if (RILJ_LOGD) unsljLog(response);
-
- mVoiceNetworkStateRegistrants
- .notifyRegistrants(new AsyncResult(null, null, null));
- break;
- case RIL_UNSOL_RESPONSE_NEW_SMS: {
- if (RILJ_LOGD) unsljLog(response);
-
- // FIXME this should move up a layer
- String a[] = new String[2];
-
- a[1] = (String)ret;
-
- SmsMessage sms;
-
- sms = SmsMessage.newFromCMT(a);
- if (mGsmSmsRegistrant != null) {
- mGsmSmsRegistrant
- .notifyRegistrant(new AsyncResult(null, sms, null));
- }
- break;
- }
- case RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mSmsStatusRegistrant != null) {
- mSmsStatusRegistrant.notifyRegistrant(
- new AsyncResult(null, ret, null));
- }
- break;
- case RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- int[] smsIndex = (int[])ret;
-
- if(smsIndex.length == 1) {
- if (mSmsOnSimRegistrant != null) {
- mSmsOnSimRegistrant.
- notifyRegistrant(new AsyncResult(null, smsIndex, null));
- }
- } else {
- if (RILJ_LOGD) riljLog(" NEW_SMS_ON_SIM ERROR with wrong length "
- + smsIndex.length);
- }
- break;
- case RIL_UNSOL_ON_USSD:
- String[] resp = (String[])ret;
-
- if (resp.length < 2) {
- resp = new String[2];
- resp[0] = ((String[])ret)[0];
- resp[1] = null;
- }
- if (RILJ_LOGD) unsljLogMore(response, resp[0]);
- if (mUSSDRegistrant != null) {
- mUSSDRegistrant.notifyRegistrant(
- new AsyncResult (null, resp, null));
- }
- break;
case RIL_UNSOL_NITZ_TIME_RECEIVED:
if (RILJ_LOGD) unsljLogRet(response, ret);
@@ -533,153 +432,7 @@ public class SamsungRIL extends RIL implements CommandsInterface {
if (mSignalStrengthRegistrant != null) {
mSignalStrengthRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
- case RIL_UNSOL_DATA_CALL_LIST_CHANGED:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- mDataNetworkStateRegistrants.notifyRegistrants(new AsyncResult(null, ret, null));
- break;
-
- case RIL_UNSOL_SUPP_SVC_NOTIFICATION:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mSsnRegistrant != null) {
- mSsnRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_STK_SESSION_END:
- if (RILJ_LOGD) unsljLog(response);
-
- if (mCatSessionEndRegistrant != null) {
- mCatSessionEndRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_STK_PROACTIVE_COMMAND:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mCatProCmdRegistrant != null) {
- mCatProCmdRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_STK_EVENT_NOTIFY:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mCatEventRegistrant != null) {
- mCatEventRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_STK_CALL_SETUP:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mCatCallSetUpRegistrant != null) {
- mCatCallSetUpRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_SIM_SMS_STORAGE_FULL:
- if (RILJ_LOGD) unsljLog(response);
-
- if (mIccSmsFullRegistrant != null) {
- mIccSmsFullRegistrant.notifyRegistrant();
- }
- break;
-
- case RIL_UNSOL_SIM_REFRESH:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mIccRefreshRegistrants != null) {
- mIccRefreshRegistrants.notifyRegistrants(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_CALL_RING:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mRingRegistrant != null) {
- mRingRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_RESTRICTED_STATE_CHANGED:
- if (RILJ_LOGD) unsljLogvRet(response, ret);
- if (mRestrictedStateRegistrant != null) {
- mRestrictedStateRegistrant.notifyRegistrant(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED:
- if (RILJ_LOGD) unsljLog(response);
-
- if (mIccStatusChangedRegistrants != null) {
- mIccStatusChangedRegistrants.notifyRegistrants();
- }
- break;
-
- case RIL_UNSOL_RESPONSE_CDMA_NEW_SMS:
- if (RILJ_LOGD) unsljLog(response);
-
- SmsMessage sms = (SmsMessage) ret;
-
- if (mCdmaSmsRegistrant != null) {
- mCdmaSmsRegistrant
- .notifyRegistrant(new AsyncResult(null, sms, null));
- }
- break;
-
- case RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS:
- if (RILJ_LOGD) unsljLog(response);
-
- if (mGsmBroadcastSmsRegistrant != null) {
- mGsmBroadcastSmsRegistrant
- .notifyRegistrant(new AsyncResult(null, ret, null));
- }
- break;
-
- case RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL:
- if (RILJ_LOGD) unsljLog(response);
-
- if (mIccSmsFullRegistrant != null) {
- mIccSmsFullRegistrant.notifyRegistrant();
- }
- break;
-
- case RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE:
- if (RILJ_LOGD) unsljLog(response);
-
- if (mEmergencyCallbackModeRegistrant != null) {
- mEmergencyCallbackModeRegistrant.notifyRegistrant();
- }
- break;
-
- case RIL_UNSOL_CDMA_CALL_WAITING:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mCallWaitingInfoRegistrants != null) {
- mCallWaitingInfoRegistrants.notifyRegistrants(
- new AsyncResult (null, ret, null));
- }
- break;
-
- case RIL_UNSOL_CDMA_OTA_PROVISION_STATUS:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mOtaProvisionRegistrants != null) {
- mOtaProvisionRegistrants.notifyRegistrants(
- new AsyncResult (null, ret, null));
+ new AsyncResult (null, ret, null));
}
break;
@@ -699,30 +452,6 @@ public class SamsungRIL extends RIL implements CommandsInterface {
}
break;
- case RIL_UNSOL_OEM_HOOK_RAW:
- if (RILJ_LOGD) unsljLogvRet(response, IccUtils.bytesToHexString((byte[])ret));
- if (mUnsolOemHookRawRegistrant != null) {
- mUnsolOemHookRawRegistrant.notifyRegistrant(new AsyncResult(null, ret, null));
- }
- break;
-
- case RIL_UNSOL_RINGBACK_TONE:
- if (RILJ_LOGD) unsljLogvRet(response, ret);
- if (mRingbackToneRegistrants != null) {
- boolean playtone = (((int[])ret)[0] == 1);
- mRingbackToneRegistrants.notifyRegistrants(
- new AsyncResult (null, playtone, null));
- }
- break;
-
- case RIL_UNSOL_RESEND_INCALL_MUTE:
- if (RILJ_LOGD) unsljLogRet(response, ret);
-
- if (mResendIncallMuteRegistrants != null) {
- mResendIncallMuteRegistrants.notifyRegistrants(
- new AsyncResult (null, ret, null));
- }
- break;
case RIL_UNSOL_AM:
String amString = (String) ret;
Log.d(LOG_TAG, "Executing AM: " + amString);