summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ferguson <ferguson.david@gmail.com>2013-04-18 20:28:52 -0400
committerDavid Ferguson <ferguson.david@gmail.com>2013-04-18 20:28:52 -0400
commit6f8007b2a2567fa9124d7f710f92ebb4e7717299 (patch)
treed19d8189073dddd8dcfc1b80bcb1d6bbf338cb06
parent1b9060697bbb5f13cd89bc89f9df599711c52303 (diff)
downloadframeworks_opt_telephony-6f8007b2a2567fa9124d7f710f92ebb4e7717299.zip
frameworks_opt_telephony-6f8007b2a2567fa9124d7f710f92ebb4e7717299.tar.gz
frameworks_opt_telephony-6f8007b2a2567fa9124d7f710f92ebb4e7717299.tar.bz2
SamsungQualcommUiccRIL: fix responseCallList for v7 RIL
* copied Samsung-specific workaround from D2 RIL * only needed for v7 RIL; override not needed for v6 RIL Change-Id: Ifc7d7ebe1887317e4debc6acd2754e47ce1d0d6b
-rw-r--r--src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java b/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java
index 57007dd..d22f229 100644
--- a/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java
+++ b/src/java/com/android/internal/telephony/SamsungQualcommUiccRIL.java
@@ -27,8 +27,10 @@ import android.os.AsyncResult;
import android.telephony.SignalStrength;
import android.text.TextUtils;
import android.util.Log;
+import android.telephony.PhoneNumberUtils;
import com.android.internal.telephony.RILConstants;
+import java.util.Collections;
import java.util.ArrayList;
/**
@@ -230,6 +232,78 @@ public class SamsungQualcommUiccRIL extends QualcommSharedRIL implements Command
@Override
protected Object
+ responseCallList(Parcel p) {
+ if (mRilVersion < 7)
+ return super.responseCallList(p);
+
+ int num;
+ int voiceSettings;
+ ArrayList<DriverCall> response;
+ DriverCall dc;
+
+ num = p.readInt();
+ response = new ArrayList<DriverCall>(num);
+
+ for (int i = 0 ; i < num ; i++) {
+ dc = new DriverCall();
+
+ dc.state = DriverCall.stateFromCLCC(p.readInt());
+ dc.index = p.readInt();
+ dc.TOA = p.readInt();
+ dc.isMpty = (0 != p.readInt());
+ dc.isMT = (0 != p.readInt());
+ dc.als = p.readInt();
+ voiceSettings = p.readInt();
+ dc.isVoice = (0 == voiceSettings) ? false : true;
+ //Some Samsung magic data for Videocalls
+ // hack taken from smdk4210ril class
+ voiceSettings = p.readInt();
+ //printing it to cosole for later investigation
+ Log.d(LOG_TAG, "Samsung magic = " + voiceSettings);
+ dc.isVoicePrivacy = (0 != p.readInt());
+ dc.number = p.readString();
+ int np = p.readInt();
+ dc.numberPresentation = DriverCall.presentationFromCLIP(np);
+ dc.name = p.readString();
+ dc.namePresentation = p.readInt();
+ int uusInfoPresent = p.readInt();
+ if (uusInfoPresent == 1) {
+ dc.uusInfo = new UUSInfo();
+ dc.uusInfo.setType(p.readInt());
+ dc.uusInfo.setDcs(p.readInt());
+ byte[] userData = p.createByteArray();
+ dc.uusInfo.setUserData(userData);
+ riljLogv(String.format("Incoming UUS : type=%d, dcs=%d, length=%d",
+ dc.uusInfo.getType(), dc.uusInfo.getDcs(),
+ dc.uusInfo.getUserData().length));
+ riljLogv("Incoming UUS : data (string)="
+ + new String(dc.uusInfo.getUserData()));
+ riljLogv("Incoming UUS : data (hex): "
+ + IccUtils.bytesToHexString(dc.uusInfo.getUserData()));
+ } else {
+ riljLogv("Incoming UUS : NOT present!");
+ }
+
+ // Make sure there's a leading + on addresses with a TOA of 145
+ dc.number = PhoneNumberUtils.stringFromStringAndTOA(dc.number, dc.TOA);
+
+ response.add(dc);
+
+ if (dc.isVoicePrivacy) {
+ mVoicePrivacyOnRegistrants.notifyRegistrants();
+ riljLog("InCall VoicePrivacy is enabled");
+ } else {
+ mVoicePrivacyOffRegistrants.notifyRegistrants();
+ riljLog("InCall VoicePrivacy is disabled");
+ }
+ }
+
+ Collections.sort(response);
+
+ return response;
+ }
+ @Override
+ protected Object
responseSignalStrength(Parcel p) {
int numInts = 12;
int response[];