aboutsummaryrefslogtreecommitdiff
path: root/ril/telephony/java/com
diff options
context:
space:
mode:
authorRicardo Cerqueira <android@cerqueira.org>2016-11-15 12:24:07 +0000
committerMister Oyster <oysterized@gmail.com>2017-09-17 14:14:38 +0200
commit944362ee48df5081f3d0fe8cffe22c6e19a0cea7 (patch)
tree5de84d8a83c8e0810168e24e3f53af46dad4a918 /ril/telephony/java/com
parent99dc713e3bb343abcf7412f00a468eb6c1a3bc2a (diff)
ril: Normalize ICC refresh responses
We were ignoring some non-standard partial refresh results, resulting in no-ops. Fit them into the regular refresh hooks by using the pre-existing operation result codes. Change-Id: Icfeb045a9e6cf01fd350cc1f5a4734b31c883034
Diffstat (limited to 'ril/telephony/java/com')
-rw-r--r--ril/telephony/java/com/android/internal/telephony/MediaTekRIL.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/ril/telephony/java/com/android/internal/telephony/MediaTekRIL.java b/ril/telephony/java/com/android/internal/telephony/MediaTekRIL.java
index 1909338..a222418 100644
--- a/ril/telephony/java/com/android/internal/telephony/MediaTekRIL.java
+++ b/ril/telephony/java/com/android/internal/telephony/MediaTekRIL.java
@@ -43,6 +43,8 @@ import com.android.internal.telephony.MtkEccList;
public class MediaTekRIL extends RIL implements CommandsInterface {
static final String LOG_TAG = "MediaTekRIL";
+ static final int REFRESH_SESSION_RESET = 6; /* Session reset */
+
static final int RIL_REQUEST_VENDOR_BASE = 2000;
static final int RIL_REQUEST_MODEM_POWEROFF = (RIL_REQUEST_VENDOR_BASE + 10);
// static final int RIL_REQUEST_DUAL_SIM_MODE_SWITCH = (RIL_REQUEST_VENDOR_BASE + 11);
@@ -269,6 +271,14 @@ public class MediaTekRIL extends RIL implements CommandsInterface {
response.efId = rawefId == null ? 0 : Integer.parseInt(rawefId);
response.aid = p.readString();
+ if (response.refreshResult > IccRefreshResponse.REFRESH_RESULT_RESET) {
+ if (response.refreshResult == REFRESH_SESSION_RESET) {
+ response.refreshResult = IccRefreshResponse.REFRESH_RESULT_RESET;
+ } else {
+ response.refreshResult = IccRefreshResponse.REFRESH_RESULT_INIT;
+ }
+ }
+
return response;
}