summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/com/android/internal/telephony/DataCallState.java2
-rw-r--r--src/java/com/android/internal/telephony/RIL.java14
2 files changed, 15 insertions, 1 deletions
diff --git a/src/java/com/android/internal/telephony/DataCallState.java b/src/java/com/android/internal/telephony/DataCallState.java
index efbf608..eba3e4d 100644
--- a/src/java/com/android/internal/telephony/DataCallState.java
+++ b/src/java/com/android/internal/telephony/DataCallState.java
@@ -134,7 +134,7 @@ public class DataCallState {
String [] ap = addr.split("/");
if (ap.length == 2) {
addr = ap[0];
- addrPrefixLen = Integer.parseInt(ap[1]);
+ addrPrefixLen = Integer.parseInt(ap[1].replaceAll("[\\D]",""));
} else {
addrPrefixLen = 0;
}
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java
index 9d3314f..e36999e 100644
--- a/src/java/com/android/internal/telephony/RIL.java
+++ b/src/java/com/android/internal/telephony/RIL.java
@@ -559,6 +559,20 @@ public class RIL extends BaseCommands implements CommandsInterface {
mSocket = s;
Log.i(LOG_TAG, "Connected to '" + SOCKET_NAME_RIL + "' socket");
+ /* Compatibility with qcom's DSDS (Dual SIM) stack */
+ if (needsOldRilFeature("qcomdsds")) {
+ String str = "SUB1";
+ byte[] data = str.getBytes();
+ try {
+ mSocket.getOutputStream().write(data);
+ Log.i(LOG_TAG, "Data sent!!");
+ } catch (IOException ex) {
+ Log.e(LOG_TAG, "IOException", ex);
+ } catch (RuntimeException exc) {
+ Log.e(LOG_TAG, "Uncaught exception ", exc);
+ }
+ }
+
int length = 0;
try {
InputStream is = mSocket.getInputStream();