Loading src/java/com/android/internal/telephony/CallTracker.java +2 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ public abstract class CallTracker extends Handler { protected abstract void handlePollCalls(AsyncResult ar); protected abstract Phone getPhone(); protected Connection getHoConnection(DriverCall dc) { for (Connection hoConn : mHandoverConnections) { log("getHoConnection - compare number: hoConn= " + hoConn.toString()); Loading src/java/com/android/internal/telephony/CarrierKeyDownloadManager.java +15 −11 Original line number Diff line number Diff line Loading @@ -96,8 +96,6 @@ public class CarrierKeyDownloadManager extends Handler { private static final String SEPARATOR = ":"; private static final String JSON_CERTIFICATE = "certificate"; // This is a hack to accommodate certain Carriers who insists on using the public-key // field to store the certificate. We'll just use which-ever is not null. private static final String JSON_CERTIFICATE_ALTERNATE = "public-key"; private static final String JSON_TYPE = "key-type"; private static final String JSON_IDENTIFIER = "key-identifier"; Loading @@ -111,7 +109,6 @@ public class CarrierKeyDownloadManager extends Handler { private static final int[] CARRIER_KEY_TYPES = {TelephonyManager.KEY_TYPE_EPDG, TelephonyManager.KEY_TYPE_WLAN}; private static final int UNINITIALIZED_KEY_TYPE = -1; private final Phone mPhone; private final Context mContext; Loading Loading @@ -451,20 +448,27 @@ public class CarrierKeyDownloadManager extends Handler { JSONArray keys = jsonObj.getJSONArray(JSON_CARRIER_KEYS); for (int i = 0; i < keys.length(); i++) { JSONObject key = keys.getJSONObject(i); // This is a hack to accommodate certain carriers who insist on using the public-key // field to store the certificate. We'll just use which-ever is not null. // Support both "public-key" and "certificate" String property. // "certificate" is a more accurate description, however, the 3GPP draft spec // S3-170116, "Privacy Protection for EAP-AKA" section 4.3 mandates the use of // "public-key". String cert = null; if (key.has(JSON_CERTIFICATE)) { cert = key.getString(JSON_CERTIFICATE); } else { cert = key.getString(JSON_CERTIFICATE_ALTERNATE); } // The 3GPP draft spec 3GPP draft spec S3-170116, "Privacy Protection for EAP-AKA" // section 4.3, does not specify any key-type property. To be compatible with these // networks, the logic defaults to WLAN type if not specified. int type = TelephonyManager.KEY_TYPE_WLAN; if (key.has(JSON_TYPE)) { String typeString = key.getString(JSON_TYPE); int type = UNINITIALIZED_KEY_TYPE; if (typeString.equals(JSON_TYPE_VALUE_WLAN)) { type = TelephonyManager.KEY_TYPE_WLAN; } else if (typeString.equals(JSON_TYPE_VALUE_EPDG)) { if (typeString.equals(JSON_TYPE_VALUE_EPDG)) { type = TelephonyManager.KEY_TYPE_EPDG; } else if (!typeString.equals(JSON_TYPE_VALUE_WLAN)) { Log.e(LOG_TAG, "Invalid key-type specified: " + typeString); } } String identifier = key.getString(JSON_IDENTIFIER); ByteArrayInputStream inStream = new ByteArrayInputStream(cert.getBytes()); Loading src/java/com/android/internal/telephony/Connection.java +11 −4 Original line number Diff line number Diff line Loading @@ -506,10 +506,9 @@ public abstract class Connection { * * @hide */ public void setEmergencyCallInfo() { Call call = getCall(); if (call != null) { Phone phone = call.getPhone(); public void setEmergencyCallInfo(CallTracker ct) { if (ct != null) { Phone phone = ct.getPhone(); if (phone != null) { EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker(); if (tracker != null) { Loading @@ -517,9 +516,17 @@ public abstract class Connection { if (num != null) { mIsEmergencyCall = true; mEmergencyNumberInfo = num; } else { Rlog.e(TAG, "setEmergencyCallInfo: emergency number is null"); } } else { Rlog.e(TAG, "setEmergencyCallInfo: emergency number tracker is null"); } } else { Rlog.e(TAG, "setEmergencyCallInfo: phone is null"); } } else { Rlog.e(TAG, "setEmergencyCallInfo: call tracker is null"); } } Loading src/java/com/android/internal/telephony/GsmCdmaCallTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -1748,6 +1748,7 @@ public class GsmCdmaCallTracker extends CallTracker { } @UnsupportedAppUsage @Override public GsmCdmaPhone getPhone() { return mPhone; } Loading src/java/com/android/internal/telephony/GsmCdmaConnection.java +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ public class GsmCdmaConnection extends Connection { mHandler = new MyHandler(mOwner.getLooper()); mAddress = dc.number; setEmergencyCallInfo(); setEmergencyCallInfo(mOwner); mIsIncoming = dc.isMT; mCreateTime = System.currentTimeMillis(); Loading Loading @@ -179,7 +179,7 @@ public class GsmCdmaConnection extends Connection { mAddress = PhoneNumberUtils.extractNetworkPortionAlt(dialString); if (isEmergencyCall) { setEmergencyCallInfo(); setEmergencyCallInfo(mOwner); } mPostDialString = PhoneNumberUtils.extractPostDialPortion(dialString); Loading Loading
src/java/com/android/internal/telephony/CallTracker.java +2 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ public abstract class CallTracker extends Handler { protected abstract void handlePollCalls(AsyncResult ar); protected abstract Phone getPhone(); protected Connection getHoConnection(DriverCall dc) { for (Connection hoConn : mHandoverConnections) { log("getHoConnection - compare number: hoConn= " + hoConn.toString()); Loading
src/java/com/android/internal/telephony/CarrierKeyDownloadManager.java +15 −11 Original line number Diff line number Diff line Loading @@ -96,8 +96,6 @@ public class CarrierKeyDownloadManager extends Handler { private static final String SEPARATOR = ":"; private static final String JSON_CERTIFICATE = "certificate"; // This is a hack to accommodate certain Carriers who insists on using the public-key // field to store the certificate. We'll just use which-ever is not null. private static final String JSON_CERTIFICATE_ALTERNATE = "public-key"; private static final String JSON_TYPE = "key-type"; private static final String JSON_IDENTIFIER = "key-identifier"; Loading @@ -111,7 +109,6 @@ public class CarrierKeyDownloadManager extends Handler { private static final int[] CARRIER_KEY_TYPES = {TelephonyManager.KEY_TYPE_EPDG, TelephonyManager.KEY_TYPE_WLAN}; private static final int UNINITIALIZED_KEY_TYPE = -1; private final Phone mPhone; private final Context mContext; Loading Loading @@ -451,20 +448,27 @@ public class CarrierKeyDownloadManager extends Handler { JSONArray keys = jsonObj.getJSONArray(JSON_CARRIER_KEYS); for (int i = 0; i < keys.length(); i++) { JSONObject key = keys.getJSONObject(i); // This is a hack to accommodate certain carriers who insist on using the public-key // field to store the certificate. We'll just use which-ever is not null. // Support both "public-key" and "certificate" String property. // "certificate" is a more accurate description, however, the 3GPP draft spec // S3-170116, "Privacy Protection for EAP-AKA" section 4.3 mandates the use of // "public-key". String cert = null; if (key.has(JSON_CERTIFICATE)) { cert = key.getString(JSON_CERTIFICATE); } else { cert = key.getString(JSON_CERTIFICATE_ALTERNATE); } // The 3GPP draft spec 3GPP draft spec S3-170116, "Privacy Protection for EAP-AKA" // section 4.3, does not specify any key-type property. To be compatible with these // networks, the logic defaults to WLAN type if not specified. int type = TelephonyManager.KEY_TYPE_WLAN; if (key.has(JSON_TYPE)) { String typeString = key.getString(JSON_TYPE); int type = UNINITIALIZED_KEY_TYPE; if (typeString.equals(JSON_TYPE_VALUE_WLAN)) { type = TelephonyManager.KEY_TYPE_WLAN; } else if (typeString.equals(JSON_TYPE_VALUE_EPDG)) { if (typeString.equals(JSON_TYPE_VALUE_EPDG)) { type = TelephonyManager.KEY_TYPE_EPDG; } else if (!typeString.equals(JSON_TYPE_VALUE_WLAN)) { Log.e(LOG_TAG, "Invalid key-type specified: " + typeString); } } String identifier = key.getString(JSON_IDENTIFIER); ByteArrayInputStream inStream = new ByteArrayInputStream(cert.getBytes()); Loading
src/java/com/android/internal/telephony/Connection.java +11 −4 Original line number Diff line number Diff line Loading @@ -506,10 +506,9 @@ public abstract class Connection { * * @hide */ public void setEmergencyCallInfo() { Call call = getCall(); if (call != null) { Phone phone = call.getPhone(); public void setEmergencyCallInfo(CallTracker ct) { if (ct != null) { Phone phone = ct.getPhone(); if (phone != null) { EmergencyNumberTracker tracker = phone.getEmergencyNumberTracker(); if (tracker != null) { Loading @@ -517,9 +516,17 @@ public abstract class Connection { if (num != null) { mIsEmergencyCall = true; mEmergencyNumberInfo = num; } else { Rlog.e(TAG, "setEmergencyCallInfo: emergency number is null"); } } else { Rlog.e(TAG, "setEmergencyCallInfo: emergency number tracker is null"); } } else { Rlog.e(TAG, "setEmergencyCallInfo: phone is null"); } } else { Rlog.e(TAG, "setEmergencyCallInfo: call tracker is null"); } } Loading
src/java/com/android/internal/telephony/GsmCdmaCallTracker.java +1 −0 Original line number Diff line number Diff line Loading @@ -1748,6 +1748,7 @@ public class GsmCdmaCallTracker extends CallTracker { } @UnsupportedAppUsage @Override public GsmCdmaPhone getPhone() { return mPhone; } Loading
src/java/com/android/internal/telephony/GsmCdmaConnection.java +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ public class GsmCdmaConnection extends Connection { mHandler = new MyHandler(mOwner.getLooper()); mAddress = dc.number; setEmergencyCallInfo(); setEmergencyCallInfo(mOwner); mIsIncoming = dc.isMT; mCreateTime = System.currentTimeMillis(); Loading Loading @@ -179,7 +179,7 @@ public class GsmCdmaConnection extends Connection { mAddress = PhoneNumberUtils.extractNetworkPortionAlt(dialString); if (isEmergencyCall) { setEmergencyCallInfo(); setEmergencyCallInfo(mOwner); } mPostDialString = PhoneNumberUtils.extractPostDialPortion(dialString); Loading