diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2012-11-30 03:03:40 +0100 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.org> | 2012-11-30 03:58:18 +0100 |
commit | dc4e9dff039c7fd935bfe844a5c0be15400749d0 (patch) | |
tree | fb0f17f503a5a89dbfd640d037d7246af900be69 /src/java | |
parent | 16c247df45a9a65af3dc8f69d5cec75f02b33d05 (diff) | |
download | frameworks_opt_telephony-dc4e9dff039c7fd935bfe844a5c0be15400749d0.zip frameworks_opt_telephony-dc4e9dff039c7fd935bfe844a5c0be15400749d0.tar.gz frameworks_opt_telephony-dc4e9dff039c7fd935bfe844a5c0be15400749d0.tar.bz2 |
SamsungExynos4RIL: fixup radio states, notify on PIN-unlock
Change-Id: Id512e61d383ccc0df8ca1a6c398adce80d917a5d
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/com/android/internal/telephony/SamsungExynos4RIL.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/SamsungExynos4RIL.java b/src/java/com/android/internal/telephony/SamsungExynos4RIL.java index a9c6daf..9bda396 100644 --- a/src/java/com/android/internal/telephony/SamsungExynos4RIL.java +++ b/src/java/com/android/internal/telephony/SamsungExynos4RIL.java @@ -556,6 +556,7 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface { int response = p.readInt(); switch (response) { + case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: ret = responseVoid(p); break; case RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS: ret = responseString(p); break; case RIL_UNSOL_RIL_CONNECTED: ret = responseInts(p); break; // SAMSUNG STATES @@ -576,6 +577,35 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface { } switch (response) { + case RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED: + /* has bonus radio state int */ + int state = p.readInt(); + Log.d(LOG_TAG, "Radio state: " + state); + + switch (state) { + case 2: + // RADIO_UNAVAILABLE + state = 1; + break; + case 3: + // RADIO_ON + state = 10; + break; + case 4: + // RADIO_ON + state = 10; + // When SIM is PIN-unlocked, RIL doesn't respond with RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED. + // We notify the system here. + Log.d(LOG_TAG, "SIM is PIN-unlocked now"); + if (mIccStatusChangedRegistrants != null) { + mIccStatusChangedRegistrants.notifyRegistrants(); + } + break; + } + RadioState newState = getRadioStateFromInt(state); + Log.d(LOG_TAG, "New Radio state: " + state + " (" + newState.toString() + ")"); + switchToRadioState(newState); + break; case RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS: if (RILJ_LOGD) unsljLogRet(response, ret); |