diff options
Diffstat (limited to 'telephony')
23 files changed, 1038 insertions, 57 deletions
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java index 8443490..1821f30 100644 --- a/telephony/java/android/telephony/DisconnectCause.java +++ b/telephony/java/android/telephony/DisconnectCause.java @@ -187,6 +187,68 @@ public class DisconnectCause { */ public static final int CDMA_ALREADY_ACTIVATED = 49; + /** call failed due to LTE to 3G/2G handover not feasible */ + public static final int HO_NOT_FEASIBLE = 50; + + public static final int NO_CIRCUIT_AVAIL = 51; + public static final int NO_ROUTE_TO_DESTINAON = 52; + public static final int OPERATOR_DETERMINED_BARRING = 53; + public static final int CALL_FAIL_NO_USER_RESPONDING = 54; + public static final int CALL_FAIL_NO_ANSWER_FROM_USER = 55; + public static final int CALL_FAIL_DESTINATION_OUT_OF_ORDER = 56; + public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 57; + public static final int CHANNEL_UNACCEPTABLE = 58; + public static final int CALL_REJECTED = 59; + public static final int NUMBER_CHANGED = 60; + public static final int PREEMPTION = 61; + public static final int FACILITY_REJECTED = 62; + public static final int RESP_TO_STATUS_ENQUIRY = 63; + public static final int NORMAL_UNSPECIFIED = 64; + public static final int NETWORK_OUT_OF_ORDER = 65; + public static final int TEMPORARY_FAILURE = 66; + public static final int SWITCHING_EQUIPMENT_CONGESTION = 67; + public static final int ACCESS_INFORMATION_DISCARDED = 68; + public static final int REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 69; + public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 70; + public static final int QOS_UNAVAILABLE = 71; + public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 72; + public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 73; + public static final int BEARER_CAPABILITY_UNAVAILABLE = 74; + public static final int SERVICE_OPTION_NOT_AVAILABLE = 75; + public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 76; + public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 77; + public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 78; + public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79; + public static final int INVALID_TRANSACTION_IDENTIFIER = 80; + public static final int USER_NOT_MEMBER_OF_CUG = 81; + public static final int INCOMPATIBLE_DESTINATION = 82; + public static final int INVALID_TRANSIT_NW_SELECTION = 83; + public static final int SEMANTICALLY_INCORRECT_MESSAGE = 84; + public static final int INVALID_MANDATORY_INFORMATION = 85; + public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 86; + public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 87; + public static final int INFORMATION_ELEMENT_NON_EXISTENT = 88; + public static final int CONDITIONAL_IE_ERROR = 89; + public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 90; + public static final int RECOVERY_ON_TIMER_EXPIRED = 91; + public static final int PROTOCOL_ERROR_UNSPECIFIED = 92; + public static final int INTERWORKING_UNSPECIFIED = 93; + public static final int LOCAL_LOW_BATTERY = 94; + public static final int LOW_BATTERY = 95; + + /** EMERGENCY call failed with temporary fail cause */ + public static final int EMERGENCY_TEMP_FAILURE = 96; + /** EMERGENCY call failed with permanent fail cause */ + public static final int EMERGENCY_PERM_FAILURE = 97; + + public static final int NON_SELECTED_USER_CLEARING = 98; + + /** + * Call was rejected due to number being blacklisted by user. + * {@@hide} + */ + public static final int CALL_BLACKLISTED = 400; + //********************************************************************************************* // When adding a disconnect type: // 1) Please assign the new type the next id value below. @@ -195,14 +257,14 @@ public class DisconnectCause { // 4) Update toString() with the newly added disconnect type. // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause. // - // NextId: 50 + // NextId: 99 //********************************************************************************************* /** Smallest valid value for call disconnect codes. */ public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED; /** Largest valid value for call disconnect codes. */ - public static final int MAXIMUM_VALID_VALUE = CDMA_ALREADY_ACTIVATED; + public static final int MAXIMUM_VALID_VALUE = CALL_BLACKLISTED; /** Private constructor to avoid class instantiation. */ private DisconnectCause() { @@ -310,6 +372,106 @@ public class DisconnectCause { return "IMS_MERGED_SUCCESSFULLY"; case CDMA_ALREADY_ACTIVATED: return "CDMA_ALREADY_ACTIVATED"; + case NON_SELECTED_USER_CLEARING: + return "NON_SELECTED_USER_CLEARING"; + case HO_NOT_FEASIBLE: + return "HO_NOT_FEASIBLE"; + case NO_CIRCUIT_AVAIL: + return "NO_CIRCUIT_AVAIL"; + case NO_ROUTE_TO_DESTINAON: + return "NO_ROUTE_TO_DESTINAON"; + case OPERATOR_DETERMINED_BARRING: + return "OPERATOR_DETERMINED_BARRING"; + case CALL_FAIL_NO_USER_RESPONDING: + return "CALL_FAIL_NO_USER_RESPONDING"; + case CALL_FAIL_NO_ANSWER_FROM_USER: + return "CALL_FAIL_NO_ANSWER_FROM_USER"; + case CALL_FAIL_DESTINATION_OUT_OF_ORDER: + return "CALL_FAIL_DESTINATION_OUT_OF_ORDER"; + case BEARER_CAPABILITY_NOT_AUTHORIZED: + return "BEARER_CAPABILITY_NOT_AUTHORIZED"; + case CHANNEL_UNACCEPTABLE: + return "CHANNEL_UNACCEPTABLE"; + case CALL_REJECTED: + return "CALL_REJECTED"; + case NUMBER_CHANGED: + return "NUMBER_CHANGED"; + case PREEMPTION: + return "PREEMPTION"; + case FACILITY_REJECTED: + return "FACILITY_REJECTED"; + case RESP_TO_STATUS_ENQUIRY: + return "RESP_TO_STATUS_ENQUIRY"; + case NORMAL_UNSPECIFIED: + return "NORMAL_UNSPECIFIED"; + case NETWORK_OUT_OF_ORDER: + return "NETWORK_OUT_OF_ORDER"; + case TEMPORARY_FAILURE: + return "TEMPORARY_FAILURE"; + case SWITCHING_EQUIPMENT_CONGESTION: + return "SWITCHING_EQUIPMENT_CONGESTION"; + case ACCESS_INFORMATION_DISCARDED: + return "ACCESS_INFORMATION_DISCARDED"; + case REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE: + return "REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE"; + case RESOURCES_UNAVAILABLE_OR_UNSPECIFIED: + return "RESOURCES_UNAVAILABLE_OR_UNSPECIFIED"; + case QOS_UNAVAILABLE: + return "QOS_UNAVAILABLE"; + case REQUESTED_FACILITY_NOT_SUBSCRIBED: + return "REQUESTED_FACILITY_NOT_SUBSCRIBED"; + case INCOMING_CALLS_BARRED_WITHIN_CUG: + return "INCOMING_CALLS_BARRED_WITHIN_CUG"; + case BEARER_CAPABILITY_UNAVAILABLE: + return "BEARER_CAPABILITY_UNAVAILABLE"; + case SERVICE_OPTION_NOT_AVAILABLE: + return "SERVICE_OPTION_NOT_AVAILABLE"; + case BEARER_SERVICE_NOT_IMPLEMENTED: + return "BEARER_SERVICE_NOT_IMPLEMENTED"; + case REQUESTED_FACILITY_NOT_IMPLEMENTED: + return "REQUESTED_FACILITY_NOT_IMPLEMENTED"; + case ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE: + return "ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE"; + case SERVICE_OR_OPTION_NOT_IMPLEMENTED: + return "SERVICE_OR_OPTION_NOT_IMPLEMENTED"; + case INVALID_TRANSACTION_IDENTIFIER: + return "INVALID_TRANSACTION_IDENTIFIER"; + case USER_NOT_MEMBER_OF_CUG: + return "USER_NOT_MEMBER_OF_CUG"; + case INCOMPATIBLE_DESTINATION: + return "INCOMPATIBLE_DESTINATION"; + case INVALID_TRANSIT_NW_SELECTION: + return "INVALID_TRANSIT_NW_SELECTION"; + case SEMANTICALLY_INCORRECT_MESSAGE: + return "SEMANTICALLY_INCORRECT_MESSAGE"; + case INVALID_MANDATORY_INFORMATION: + return "INVALID_MANDATORY_INFORMATION"; + case MESSAGE_TYPE_NON_IMPLEMENTED: + return "MESSAGE_TYPE_NON_IMPLEMENTED"; + case MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + return "MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"; + case INFORMATION_ELEMENT_NON_EXISTENT: + return "INFORMATION_ELEMENT_NON_EXISTENT"; + case CONDITIONAL_IE_ERROR: + return "CONDITIONAL_IE_ERROR"; + case MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + return "MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"; + case RECOVERY_ON_TIMER_EXPIRED: + return "RECOVERY_ON_TIMER_EXPIRED"; + case PROTOCOL_ERROR_UNSPECIFIED: + return "PROTOCOL_ERROR_UNSPECIFIED"; + case INTERWORKING_UNSPECIFIED: + return "INTERWORKING_UNSPECIFIED"; + case LOCAL_LOW_BATTERY: + return "LOCAL_LOW_BATTERY"; + case LOW_BATTERY: + return "LOW_BATTERY"; + case EMERGENCY_TEMP_FAILURE: + return "EMERGENCY_TEMP_FAILURE"; + case EMERGENCY_PERM_FAILURE: + return "EMERGENCY_PERM_FAILURE"; + case CALL_BLACKLISTED: + return "CALL_BLACKLISTED"; default: return "INVALID: " + cause; } diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java index b430340..5ee1fb2 100644 --- a/telephony/java/android/telephony/PhoneNumberUtils.java +++ b/telephony/java/android/telephony/PhoneNumberUtils.java @@ -16,6 +16,7 @@ package android.telephony; +import android.util.SparseArray; import com.android.i18n.phonenumbers.NumberParseException; import com.android.i18n.phonenumbers.PhoneNumberUtil; import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat; @@ -25,6 +26,7 @@ import com.android.i18n.phonenumbers.ShortNumberUtil; import android.content.Context; import android.content.Intent; import android.database.Cursor; +import android.location.Country; import android.location.CountryDetector; import android.net.Uri; import android.os.SystemProperties; @@ -77,6 +79,7 @@ public class PhoneNumberUtils static final String LOG_TAG = "PhoneNumberUtils"; private static final boolean DBG = false; + private static Country sCountryDetector = null; /* * global-phone-number = ["+"] 1*( DIGIT / written-sep ) * written-sep = ("-"/".") @@ -139,6 +142,55 @@ public class PhoneNumberUtils return !isDialable(ch) && !(('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')); } + /** + * On some CDMA networks +COUNTRYCODE must be rewritten to 0 when making a local + * call from within the user's home network. We maintain a white list of + * (country code prefix) -> (rewrite rule) to perform this substitution. + * + * Since country codes are variable length it is easiest to compile a regex + */ + private static SparseArray<RewriteRule> sCdmaLocalRewriteWhitelist; + private static Pattern sCdmaLocalRewritePattern; + static { + sCdmaLocalRewriteWhitelist = new SparseArray<RewriteRule>(); + addRewriteRule(62, "ID", "0"); // indonesia + addRewriteRule(380, "UA", "0"); // ukraine + + StringBuffer regex = new StringBuffer(); + regex.append("[+]("); + for (int i=0; i < sCdmaLocalRewriteWhitelist.size(); ++i) { + int countryCode = sCdmaLocalRewriteWhitelist.keyAt(i); + if (i > 0) { + regex.append("|"); + } + regex.append(countryCode); + } + regex.append(")"); + sCdmaLocalRewritePattern = Pattern.compile(regex.toString()); + } + + private static class RewriteRule { + public int countryCodePrefix; + public String isoCountryCode; + public String replacement; + + public RewriteRule(int countryCodePrefix, String isoCountryCode, String replacement) { + this.countryCodePrefix = countryCodePrefix; + this.isoCountryCode = isoCountryCode; + this.replacement = replacement; + } + + public String apply(String dialStr) { + return dialStr.replaceFirst("[+]" + countryCodePrefix, replacement); + } + } + + private static void addRewriteRule(int countryCodePrefix, + String isoCountryCode, String replacement) { + sCdmaLocalRewriteWhitelist.put(countryCodePrefix, + new RewriteRule(countryCodePrefix, isoCountryCode, replacement)); + } + /** Extracts the phone number from an Intent. * * @param intent the intent to get the number of @@ -2057,12 +2109,9 @@ public class PhoneNumberUtils private static boolean isLocalEmergencyNumberInternal(int subId, String number, Context context, boolean useExactMatch) { - String countryIso; - CountryDetector detector = (CountryDetector) context.getSystemService( - Context.COUNTRY_DETECTOR); - if (detector != null && detector.detectCountry() != null) { - countryIso = detector.detectCountry().getCountryIso(); - } else { + String countryIso = getCountryIso(context); + Rlog.w(LOG_TAG, "isLocalEmergencyNumberInternal" + countryIso); + if (countryIso == null) { Locale locale = context.getResources().getConfiguration().locale; countryIso = locale.getCountry(); Rlog.w(LOG_TAG, "No CountryDetector; falling back to countryIso based on locale: " @@ -2071,6 +2120,28 @@ public class PhoneNumberUtils return isEmergencyNumberInternal(subId, number, countryIso, useExactMatch); } + private static String getCountryIso(Context context) { + Rlog.w(LOG_TAG, "getCountryIso " + sCountryDetector); + if (sCountryDetector == null) { + CountryDetector detector = (CountryDetector) context.getSystemService( + Context.COUNTRY_DETECTOR); + if (detector != null) { + sCountryDetector = detector.detectCountry(); + } + } + + if (sCountryDetector == null) { + return null; + } else { + return sCountryDetector.getCountryIso(); + } + } + + /** @hide */ + public static void resetCountryDetectorInfo() { + sCountryDetector = null; + } + /** * isVoiceMailNumber: checks a given number against the voicemail * number provided by the RIL and SIM card. The caller must have @@ -2560,6 +2631,29 @@ public class PhoneNumberUtils } /** + * Returns a rewrite rule for the country code prefix if the dial string matches the + * whitelist and the user is in their home network + * + * @param dialStr number being dialed + * @param currIso ISO code of currently attached network + * @param defaultIso ISO code of user's sim + * @return RewriteRule or null if conditions fail + */ + private static RewriteRule getCdmaLocalRewriteRule(String dialStr, + String currIso, String defaultIso) { + Matcher m = sCdmaLocalRewritePattern.matcher(dialStr); + if (m.find()) { + String dialPrefix = m.group(1); + RewriteRule rule = sCdmaLocalRewriteWhitelist.get(Integer.valueOf(dialPrefix)); + if (currIso.equalsIgnoreCase(defaultIso) && + currIso.equalsIgnoreCase(rule.isoCountryCode)) { + return rule; + } + } + return null; + } + + /** * Determines if the specified number is actually a URI * (i.e. a SIP address) rather than a regular PSTN phone number, * based on whether or not the number contains an "@" character. @@ -2622,8 +2716,16 @@ public class PhoneNumberUtils // Remove the leading plus sign retStr = newStr; } else { - // Replaces the plus sign with the default IDP - retStr = networkDialStr.replaceFirst("[+]", getCurrentIdp(useNanp)); + RewriteRule rewriteRule = + getCdmaLocalRewriteRule(networkDialStr, + TelephonyManager.getDefault().getNetworkCountryIso(), + TelephonyManager.getDefault().getSimCountryIso()); + if (rewriteRule != null) { + retStr = rewriteRule.apply(networkDialStr); + } else { + // Replaces the plus sign with the default IDP + retStr = networkDialStr.replaceFirst("[+]", getCurrentIdp(useNanp)); + } } } if (DBG) log("processPlusCode, retStr=" + retStr); diff --git a/telephony/java/android/telephony/RadioAccessFamily.java b/telephony/java/android/telephony/RadioAccessFamily.java index 2bfaf1b..2906a2d 100644..100755 --- a/telephony/java/android/telephony/RadioAccessFamily.java +++ b/telephony/java/android/telephony/RadioAccessFamily.java @@ -47,6 +47,7 @@ public class RadioAccessFamily implements Parcelable { public static final int RAF_HSPAP = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_HSPAP); public static final int RAF_GSM = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_GSM); public static final int RAF_TD_SCDMA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_TD_SCDMA); + public static final int RAF_LTE_CA = (1 << ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA); // Grouping of RAFs private static final int GSM = RAF_GSM | RAF_GPRS | RAF_EDGE; @@ -54,6 +55,7 @@ public class RadioAccessFamily implements Parcelable { private static final int CDMA = RAF_IS95A | RAF_IS95B | RAF_1xRTT; private static final int EVDO = RAF_EVDO_0 | RAF_EVDO_A | RAF_EVDO_B | RAF_EHRPD; private static final int WCDMA = HS | RAF_UMTS; + private static final int LTE = RAF_LTE | RAF_LTE_CA; /* Phone ID of phone */ private int mPhoneId; @@ -162,19 +164,19 @@ public class RadioAccessFamily implements Parcelable { raf = CDMA | EVDO; break; case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO: - raf = RAF_LTE | CDMA | EVDO; + raf = LTE | CDMA | EVDO; break; case RILConstants.NETWORK_MODE_LTE_GSM_WCDMA: - raf = RAF_LTE | GSM | WCDMA; + raf = LTE | GSM | WCDMA; break; case RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA: - raf = RAF_LTE | CDMA | EVDO | GSM | WCDMA; + raf = LTE | CDMA | EVDO | GSM | WCDMA; break; case RILConstants.NETWORK_MODE_LTE_ONLY: - raf = RAF_LTE; + raf = LTE; break; case RILConstants.NETWORK_MODE_LTE_WCDMA: - raf = RAF_LTE | WCDMA; + raf = LTE | WCDMA; break; case RILConstants.NETWORK_MODE_CDMA_NO_EVDO: raf = CDMA; @@ -232,6 +234,7 @@ public class RadioAccessFamily implements Parcelable { raf = ((WCDMA & raf) > 0) ? (WCDMA | raf) : raf; raf = ((CDMA & raf) > 0) ? (CDMA | raf) : raf; raf = ((EVDO & raf) > 0) ? (EVDO | raf) : raf; + raf = ((LTE & raf) > 0) ? (LTE | raf) : raf; return raf; } @@ -254,19 +257,19 @@ public class RadioAccessFamily implements Parcelable { case (CDMA | EVDO): type = RILConstants.NETWORK_MODE_CDMA; break; - case (RAF_LTE | CDMA | EVDO): + case (LTE | CDMA | EVDO): type = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO; break; - case (RAF_LTE | GSM | WCDMA): + case (LTE | GSM | WCDMA): type = RILConstants.NETWORK_MODE_LTE_GSM_WCDMA; break; - case (RAF_LTE | CDMA | EVDO | GSM | WCDMA): + case (LTE | CDMA | EVDO | GSM | WCDMA): type = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA; break; - case RAF_LTE: + case LTE: type = RILConstants.NETWORK_MODE_LTE_ONLY; break; - case (RAF_LTE | WCDMA): + case (LTE | WCDMA): type = RILConstants.NETWORK_MODE_LTE_WCDMA; break; case CDMA: @@ -339,6 +342,7 @@ public class RadioAccessFamily implements Parcelable { case "CDMA": return CDMA; case "EVDO": return EVDO; case "WCDMA": return WCDMA; + case "LTE_CA": return RAF_LTE_CA; default: return RAF_UNKNOWN; } } diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 1337487..d411376 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -154,6 +154,12 @@ public class ServiceState implements Parcelable { */ public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18; /** + * LTE_CA + * @hide + */ + public static final int RIL_RADIO_TECHNOLOGY_LTE_CA = 19; + + /** * Available registration states for GSM, UMTS and CDMA. */ /** @hide */ @@ -728,11 +734,14 @@ public class ServiceState implements Parcelable { case RIL_RADIO_TECHNOLOGY_GSM: rtString = "GSM"; break; + case RIL_RADIO_TECHNOLOGY_TD_SCDMA: + rtString = "TD-SCDMA"; + break; case RIL_RADIO_TECHNOLOGY_IWLAN: rtString = "IWLAN"; break; - case RIL_RADIO_TECHNOLOGY_TD_SCDMA: - rtString = "TD-SCDMA"; + case RIL_RADIO_TECHNOLOGY_LTE_CA: + rtString = "LTE_CA"; break; default: rtString = "Unexpected"; @@ -1075,6 +1084,8 @@ public class ServiceState implements Parcelable { return TelephonyManager.NETWORK_TYPE_TD_SCDMA; case ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN: return TelephonyManager.NETWORK_TYPE_IWLAN; + case ServiceState.RIL_RADIO_TECHNOLOGY_LTE_CA: + return TelephonyManager.NETWORK_TYPE_LTE_CA; default: return TelephonyManager.NETWORK_TYPE_UNKNOWN; } @@ -1126,7 +1137,9 @@ public class ServiceState implements Parcelable { || radioTechnology == RIL_RADIO_TECHNOLOGY_HSPAP || radioTechnology == RIL_RADIO_TECHNOLOGY_GSM || radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA - || radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN; + || radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN + || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA; + } /** @hide */ diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java index fced667..997b6ff 100644 --- a/telephony/java/android/telephony/SignalStrength.java +++ b/telephony/java/android/telephony/SignalStrength.java @@ -19,6 +19,7 @@ package android.telephony; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; +import android.os.SystemProperties; import android.telephony.Rlog; import android.content.res.Resources; @@ -52,6 +53,7 @@ public class SignalStrength implements Parcelable { public static final int INVALID = 0x7FFFFFFF; private static final int RSRP_THRESH_TYPE_STRICT = 0; + private static final int RSRP_THRESH_TYPE_CUSTOM = 2; private static final int[] RSRP_THRESH_STRICT = new int[] {-140, -115, -105, -95, -85, -44}; private static final int[] RSRP_THRESH_LENIENT = new int[] {-140, -128, -118, -108, -98, -44}; @@ -146,11 +148,10 @@ public class SignalStrength implements Parcelable { int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr, int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi, - int tdScdmaRscp, boolean gsmFlag) { + boolean gsmFlag) { initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio, evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp, lteRsrq, lteRssnr, lteCqi, gsmFlag); - mTdScdmaRscp = tdScdmaRscp; } /** @@ -162,10 +163,11 @@ public class SignalStrength implements Parcelable { int cdmaDbm, int cdmaEcio, int evdoDbm, int evdoEcio, int evdoSnr, int lteSignalStrength, int lteRsrp, int lteRsrq, int lteRssnr, int lteCqi, - boolean gsmFlag) { + int tdScdmaRscp, boolean gsmFlag) { initialize(gsmSignalStrength, gsmBitErrorRate, cdmaDbm, cdmaEcio, evdoDbm, evdoEcio, evdoSnr, lteSignalStrength, lteRsrp, lteRsrq, lteRssnr, lteCqi, gsmFlag); + mTdScdmaRscp = tdScdmaRscp; } /** @@ -398,11 +400,12 @@ public class SignalStrength implements Parcelable { mLteSignalStrength = (mLteSignalStrength >= 0) ? mLteSignalStrength : 99; mLteRsrp = ((mLteRsrp >= 44) && (mLteRsrp <= 140)) ? -mLteRsrp : SignalStrength.INVALID; mLteRsrq = ((mLteRsrq >= 3) && (mLteRsrq <= 20)) ? -mLteRsrq : SignalStrength.INVALID; - mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300)) ? mLteRssnr + mLteRssnr = ((mLteRssnr >= -200) && (mLteRssnr <= 300) && !(mLteRsrq == SignalStrength.INVALID && mLteRssnr == -1)) ? mLteRssnr : SignalStrength.INVALID; mTdScdmaRscp = ((mTdScdmaRscp >= 25) && (mTdScdmaRscp <= 120)) ? -mTdScdmaRscp : SignalStrength.INVALID; + // Cqi no change if (DBG) log("Signal after validate=" + this); } @@ -494,6 +497,16 @@ public class SignalStrength implements Parcelable { return mLteCqi; } + /** @hide */ + public boolean needsOldRilFeature(String feature) { + String[] features = SystemProperties.get("ro.telephony.ril.config", "").split(","); + for (String found: features) { + if (found.equals(feature)) + return true; + } + return false; + } + /** * Retrieve an abstract level value for the overall signal strength. * @@ -506,8 +519,9 @@ public class SignalStrength implements Parcelable { int level = 0; if (isGsm) { + boolean oldRil = needsOldRilFeature("signalstrength"); level = getLteLevel(); - if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { + if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { level = getTdScdmaLevel(); if (level == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { level = getGsmLevel(); @@ -539,7 +553,8 @@ public class SignalStrength implements Parcelable { public int getAsuLevel() { int asuLevel = 0; if (isGsm) { - if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { + boolean oldRil = needsOldRilFeature("signalstrength"); + if (getLteLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN || oldRil) { if (getTdScdmaLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { asuLevel = getGsmAsuLevel(); } else { @@ -575,8 +590,9 @@ public class SignalStrength implements Parcelable { int dBm = INVALID; if(isGsm()) { + boolean oldRil = needsOldRilFeature("signalstrength"); dBm = getLteDbm(); - if (dBm == INVALID) { + if (dBm == INVALID || oldRil) { if (getTdScdmaLevel() == SIGNAL_STRENGTH_NONE_OR_UNKNOWN) { dBm = getGsmDbm(); } else { @@ -796,6 +812,9 @@ public class SignalStrength implements Parcelable { int[] threshRsrp; if (rsrpThreshType == RSRP_THRESH_TYPE_STRICT) { threshRsrp = RSRP_THRESH_STRICT; + } else if (rsrpThreshType == RSRP_THRESH_TYPE_CUSTOM) { + threshRsrp = Resources.getSystem().getIntArray(com.android.internal.R.array. + config_LTE_RSRP_custom_levels); } else { threshRsrp = RSRP_THRESH_LENIENT; } @@ -933,7 +952,7 @@ public class SignalStrength implements Parcelable { return tdScdmaAsuLevel; } - /** + /** * @return hash code */ @Override diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java index d1d6e0d..5e5b70d 100644 --- a/telephony/java/android/telephony/SubscriptionInfo.java +++ b/telephony/java/android/telephony/SubscriptionInfo.java @@ -111,9 +111,14 @@ public class SubscriptionInfo implements Parcelable { /** * @hide */ + public int mUserNwMode; + + /** + * @hide + */ public SubscriptionInfo(int id, String iccId, int simSlotIndex, CharSequence displayName, CharSequence carrierName, int nameSource, int iconTint, String number, int roaming, - Bitmap icon, int mcc, int mnc, String countryIso) { + Bitmap icon, int mcc, int mnc, String countryIso, int userNwMode) { this.mId = id; this.mIccId = iccId; this.mSimSlotIndex = simSlotIndex; @@ -126,6 +131,7 @@ public class SubscriptionInfo implements Parcelable { this.mIconBitmap = icon; this.mMcc = mcc; this.mMnc = mnc; + this.mUserNwMode = userNwMode; this.mCountryIso = countryIso; } @@ -277,6 +283,14 @@ public class SubscriptionInfo implements Parcelable { } /** + * Returns the User set Network mode. + * @hide + */ + public int getUserNwMode() { + return this.mUserNwMode; + } + + /** * @return the ISO country code */ public String getCountryIso() { @@ -297,11 +311,12 @@ public class SubscriptionInfo implements Parcelable { int dataRoaming = source.readInt(); int mcc = source.readInt(); int mnc = source.readInt(); + int userNwMode = source.readInt(); String countryIso = source.readString(); Bitmap iconBitmap = Bitmap.CREATOR.createFromParcel(source); return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName, - nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso); + nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso, userNwMode); } @Override @@ -323,6 +338,7 @@ public class SubscriptionInfo implements Parcelable { dest.writeInt(mDataRoaming); dest.writeInt(mMcc); dest.writeInt(mMnc); + dest.writeInt(mUserNwMode); dest.writeString(mCountryIso); mIconBitmap.writeToParcel(dest, flags); } @@ -354,6 +370,6 @@ public class SubscriptionInfo implements Parcelable { + " displayName=" + mDisplayName + " carrierName=" + mCarrierName + " nameSource=" + mNameSource + " iconTint=" + mIconTint + " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc - + " mnc " + mMnc + "}"; + + " mnc " + mMnc + " mUserNwMode=" + mUserNwMode + "}"; } } diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index 32b7383..86021e0 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -121,6 +121,39 @@ public class SubscriptionManager { public static final int SIM_NOT_INSERTED = -1; /** + * The Network mode of SIM/sub. + * <P>Type: INTEGER (int)</P> + */ + /** @hide */ + public static final String NETWORK_MODE = "network_mode"; + + /** + * The user configured Network mode of SIM/sub. + * <P>Type: INTEGER (int)</P> + * {@hide} + */ + public static final String USER_NETWORK_MODE = "user_network_mode"; + + /** @hide */ + public static final int DEFAULT_NW_MODE = -1; + + /** + * The activation state of SIM/sub. + * <P>Type: INTEGER (int)</P> + */ + /** @hide */ + public static final String SUB_STATE = "sub_state"; + + /** @hide */ + public static final int INACTIVE = 0; + + /** @hide */ + public static final int ACTIVE = 1; + + /** @hide */ + public static final int SUB_CONFIGURATION_IN_PROGRESS = 2; + + /** * TelephonyProvider column name for user displayed name. * <P>Type: TEXT (String)</P> */ @@ -310,6 +343,14 @@ public class SubscriptionManager { */ public static final String CB_CHANNEL_50_ALERT = "enable_channel_50_alerts"; + + + /** + * TelephonyProvider column name for enable channel60 alert in CB settings + *@hide + */ + public static final String CB_CHANNEL_60_ALERT = "enable_channel_60_alerts"; + /** * TelephonyProvider column name for CMAS test alert in CB settings *@hide @@ -1118,6 +1159,53 @@ public class SubscriptionManager { } /** @hide */ + public static void activateSubId(int subId) { + logd("activateSubId sub id = " + subId); + try { + getISubInfo().activateSubId(subId); + } catch (RemoteException ex) { + return; + } + } + + /** @hide */ + public static void deactivateSubId(int subId) { + logd("deactivateSubId sub id = " + subId); + try { + getISubInfo().deactivateSubId(subId); + } catch (RemoteException ex) { + return; + } + } + + /** @hide */ + public static int getSubState(int subId) { + logd("getSubState sub id = " + subId); + try { + return getISubInfo().getSubState(subId); + } catch (RemoteException ex) { + return INACTIVE; + } + } + + /** @hide */ + public static int setSubState(int subId, int subState) { + logd("setSubState sub id = " + subId + " state = " + subState); + try { + return getISubInfo().setSubState(subId, subState); + } catch (RemoteException ex) { + return INACTIVE; + } + } + + /** + @hide + */ + private static ISub getISubInfo() { + return ISub.Stub.asInterface(ServiceManager.getService("isub")); + } + + /** @hide */ public static void putPhoneIdAndSubIdExtra(Intent intent, int phoneId) { int[] subIds = SubscriptionManager.getSubId(phoneId); if (subIds != null && subIds.length > 0) { diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7276980..7afaf7e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1,4 +1,7 @@ /* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,10 +21,12 @@ package android.telephony; import android.annotation.Nullable; import android.annotation.SystemApi; +import android.Manifest; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.app.ActivityThread; import android.content.ContentResolver; +import android.app.AppOpsManager; import android.content.Context; import android.content.Intent; import android.provider.Settings; @@ -31,6 +36,7 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemProperties; import android.telecom.PhoneAccount; +import android.text.TextUtils; import android.util.Log; import com.android.internal.telecom.ITelecomService; @@ -45,6 +51,7 @@ import com.android.internal.telephony.TelephonyProperties; import java.io.FileInputStream; import java.io.IOException; +import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -684,6 +691,11 @@ public class TelephonyManager { */ public static final String VVM_TYPE_CVVM = "vvm_type_cvvm"; + /** + * @hide + */ + public static final String EXTRA_IS_FORWARDED = "is_forwarded"; + // // // Device Info @@ -761,6 +773,7 @@ public class TelephonyManager { * @param slotId of which deviceID is returned */ public String getDeviceId(int slotId) { + android.util.SeempLog.record_str(8, ""+slotId); // FIXME this assumes phoneId == slotId try { IPhoneSubInfo info = getSubscriberInfo(); @@ -857,6 +870,7 @@ public class TelephonyManager { * {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION}. */ public CellLocation getCellLocation() { + android.util.SeempLog.record(49); try { ITelephony telephony = getITelephony(); if (telephony == null) { @@ -954,6 +968,7 @@ public class TelephonyManager { */ @Deprecated public List<NeighboringCellInfo> getNeighboringCellInfo() { + android.util.SeempLog.record(50); try { ITelephony telephony = getITelephony(); if (telephony == null) @@ -1204,6 +1219,15 @@ public class TelephonyManager { return retVal; } + /** + * Return if the current radio is LTE on GSM + * @hide + */ + public static int getLteOnGsmModeStatic() { + return SystemProperties.getInt(TelephonyProperties.PROPERTY_LTE_ON_GSM_DEVICE, + 0); + } + // // // Current Network @@ -1380,11 +1404,12 @@ public class TelephonyManager { public static final int NETWORK_TYPE_HSPAP = 15; /** Current network is GSM {@hide} */ public static final int NETWORK_TYPE_GSM = 16; - /** Current network is TD_SCDMA {@hide} */ + /** Current network is TD_SCDMA {@hide} */ public static final int NETWORK_TYPE_TD_SCDMA = 17; /** Current network is IWLAN {@hide} */ public static final int NETWORK_TYPE_IWLAN = 18; - + /** Current network is LTE_CA {@hide} */ + public static final int NETWORK_TYPE_LTE_CA = 19; /** * @return the NETWORK_TYPE_xxxx for current data connection. */ @@ -1429,10 +1454,12 @@ public class TelephonyManager { * @see #NETWORK_TYPE_LTE * @see #NETWORK_TYPE_EHRPD * @see #NETWORK_TYPE_HSPAP + * @see #NETWORK_TYPE_TD_SCDMA * * <p> * Requires Permission: * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} + * @hide */ /** {@hide} */ public int getNetworkType(int subId) { @@ -1552,6 +1579,21 @@ public class TelephonyManager { } } + /** + * Returns the icc operator numeric for a given subId + * + */ + /** {@hide} */ + public String getIccOperatorNumericForData(int subId) { + try{ + return getITelephony().getIccOperatorNumericForData(subId); + } catch (RemoteException ex) { + return null; + } catch (NullPointerException ex) { + return null; + } + } + /** Unknown network class. {@hide} */ public static final int NETWORK_CLASS_UNKNOWN = 0; /** Class of broadly defined "2G" networks. {@hide} */ @@ -1589,6 +1631,7 @@ public class TelephonyManager { return NETWORK_CLASS_3_G; case NETWORK_TYPE_LTE: case NETWORK_TYPE_IWLAN: + case NETWORK_TYPE_LTE_CA: return NETWORK_CLASS_4_G; default: return NETWORK_CLASS_UNKNOWN; @@ -1652,6 +1695,8 @@ public class TelephonyManager { return "TD_SCDMA"; case NETWORK_TYPE_IWLAN: return "IWLAN"; + case NETWORK_TYPE_LTE_CA: + return "LTE_CA"; default: return "UNKNOWN"; } @@ -1957,6 +2002,7 @@ public class TelephonyManager { */ /** {@hide} */ public String getSimSerialNumber(int subId) { + android.util.SeempLog.record_str(388, ""+subId); try { IPhoneSubInfo info = getSubscriberInfo(); if (info == null) @@ -2017,6 +2063,21 @@ public class TelephonyManager { } } + /** + * Return if the current radio is LTE on GSM + * @hide + */ + public int getLteOnGsmMode() { + try { + return getITelephony().getLteOnGsmMode(); + } catch (RemoteException ex) { + return 0; + } catch (NullPointerException ex) { + // This could happen before phone restarts due to crashing + return 0; + } + } + // // // Subscriber Info @@ -2046,6 +2107,7 @@ public class TelephonyManager { */ /** {@hide} */ public String getSubscriberId(int subId) { + android.util.SeempLog.record_str(389, ""+subId); try { IPhoneSubInfo info = getSubscriberInfo(); if (info == null) @@ -2134,6 +2196,7 @@ public class TelephonyManager { */ /** {@hide} */ public String getLine1NumberForSubscriber(int subId) { + android.util.SeempLog.record_str(9, ""+subId); String number = null; try { ITelephony telephony = getITelephony(); @@ -2931,6 +2994,40 @@ public class TelephonyManager { } /** + * Allows an application to add a protected sms address if the application has + * been granted the permission MODIFY_PROTECTED_SMS_LIST. + * @param address + * @hide + */ + public void addProtectedSmsAddress(String address) { + mContext.enforceCallingOrSelfPermission( + Manifest.permission.MODIFY_PROTECTED_SMS_LIST, null); + try { + getITelephony().addProtectedSmsAddress(address); + } catch (RemoteException ex) { + } catch (NullPointerException ex) { + } + } + + /** + * Allows an application to revoke/remove a protected sms address if the application has been + * granted the permission MODIFY_PROTECTED_SMS_LIST. + * @param address + * @return true if address is successfully removed + * @hide + */ + public boolean revokeProtectedSmsAddress(String address) { + mContext.enforceCallingOrSelfPermission( + Manifest.permission.MODIFY_PROTECTED_SMS_LIST, null); + try { + return getITelephony().revokeProtectedSmsAddress(address); + } catch (RemoteException ex) { + } catch (NullPointerException ex) { + } + return false; + } + + /** * Returns the MMS user agent. */ public String getMmsUserAgent() { @@ -3396,13 +3493,7 @@ public class TelephonyManager { /** @hide */ public int getSimCount() { - // FIXME Need to get it from Telephony Dev Controller when that gets implemented! - // and then this method shouldn't be used at all! - if(isMultiSimEnabled()) { - return 2; - } else { - return 1; - } + return getPhoneCount(); } /** @@ -4198,11 +4289,18 @@ public class TelephonyManager { public void setDataEnabled(int subId, boolean enable) { try { Log.d(TAG, "setDataEnabled: enabled=" + enable); + AppOpsManager appOps = (AppOpsManager)mContext.getSystemService(Context.APP_OPS_SERVICE); + if (enable) { + if (appOps.noteOp(AppOpsManager.OP_DATA_CONNECT_CHANGE) != AppOpsManager.MODE_ALLOWED) { + Log.w(TAG, "Permission denied by user."); + return; + } + } ITelephony telephony = getITelephony(); if (telephony != null) telephony.setDataEnabled(subId, enable); } catch (RemoteException e) { - Log.e(TAG, "Error calling ITelephony#setDataEnabled", e); + Log.e(TAG, "Error calling setDataEnabled", e); } } diff --git a/telephony/java/com/android/ims/ImsCallForwardInfo.java b/telephony/java/com/android/ims/ImsCallForwardInfo.java index 3f8fd19..97dcbd5 100644 --- a/telephony/java/com/android/ims/ImsCallForwardInfo.java +++ b/telephony/java/com/android/ims/ImsCallForwardInfo.java @@ -31,6 +31,8 @@ public class ImsCallForwardInfo implements Parcelable { public int mStatus; // 0x91: International, 0x81: Unknown public int mToA; + // Service class + public int mServiceClass; // Number (it will not include the "sip" or "tel" URI scheme) public String mNumber; // No reply timer for CF @@ -53,6 +55,7 @@ public class ImsCallForwardInfo implements Parcelable { out.writeInt(mCondition); out.writeInt(mStatus); out.writeInt(mToA); + out.writeInt(mServiceClass); out.writeString(mNumber); out.writeInt(mTimeSeconds); } @@ -62,6 +65,7 @@ public class ImsCallForwardInfo implements Parcelable { return super.toString() + ", Condition: " + mCondition + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled") + ", ToA: " + mToA + ", Number=" + mNumber + + ", Service Class: " + mServiceClass + ", Time (seconds): " + mTimeSeconds; } @@ -69,6 +73,7 @@ public class ImsCallForwardInfo implements Parcelable { mCondition = in.readInt(); mStatus = in.readInt(); mToA = in.readInt(); + mServiceClass = in.readInt(); mNumber = in.readString(); mTimeSeconds = in.readInt(); } diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java index 5f84e0c..50ee543 100644 --- a/telephony/java/com/android/ims/ImsCallProfile.java +++ b/telephony/java/com/android/ims/ImsCallProfile.java @@ -188,6 +188,7 @@ public class ImsCallProfile implements Parcelable { public static final String EXTRA_CODEC = "Codec"; public static final String EXTRA_DISPLAY_TEXT = "DisplayText"; public static final String EXTRA_ADDITIONAL_CALL_INFO = "AdditionalCallInfo"; + public static final String EXTRA_IS_CALL_PULL = "CallPull"; /** * Extra key which the RIL can use to indicate the radio technology used for a call. diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java index 2769a2b..85ec162 100644 --- a/telephony/java/com/android/ims/ImsReasonInfo.java +++ b/telephony/java/com/android/ims/ImsReasonInfo.java @@ -84,6 +84,8 @@ public class ImsReasonInfo implements Parcelable { public static final int CODE_LOCAL_CALL_VOLTE_RETRY_REQUIRED = 147; // IMS call is already terminated (in TERMINATED state) public static final int CODE_LOCAL_CALL_TERMINATED = 148; + // Handover not feasible + public static final int CODE_LOCAL_HO_NOT_FEASIBLE = 149; /** * TIMEOUT (IMS -> Telephony) @@ -153,6 +155,9 @@ public class ImsReasonInfo implements Parcelable { public static final int CODE_SIP_USER_REJECTED = 361; // Others public static final int CODE_SIP_GLOBAL_ERROR = 362; + // Emergency failure + public static final int CODE_EMERGENCY_TEMP_FAILURE = 363; + public static final int CODE_EMERGENCY_PERM_FAILURE = 364; /** * MEDIA (IMS -> Telephony) @@ -236,6 +241,24 @@ public class ImsReasonInfo implements Parcelable { public static final int CODE_ANSWERED_ELSEWHERE = 1014; /** + * For VICE - Call Pull request has failed + */ + public static final int CODE_CALL_PULL_OUT_OF_SYNC = 1015; + + /** + * For VICE - Call has been pulled from primary to secondary + */ + public static final int CODE_CALL_END_CAUSE_CALL_PULL = 1016; + + /** + * Supplementary services (HOLD/RESUME) failure error codes. + * Values for Supplemetary services failure - Failed, Cancelled and Re-Invite collision. + */ + public static final int CODE_SUPP_SVC_FAILED = 1201; + public static final int CODE_SUPP_SVC_CANCELLED = 1202; + public static final int CODE_SUPP_SVC_REINVITE_COLLISION = 1203; + + /** * Network string error messages. * mExtraMessage may have these values. */ diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/com/android/ims/ImsStreamMediaProfile.java index 359b270..216cef5 100644 --- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java +++ b/telephony/java/com/android/ims/ImsStreamMediaProfile.java @@ -51,6 +51,16 @@ public class ImsStreamMediaProfile implements Parcelable { public static final int AUDIO_QUALITY_GSM_EFR = 8; public static final int AUDIO_QUALITY_GSM_FR = 9; public static final int AUDIO_QUALITY_GSM_HR = 10; + public static final int AUDIO_QUALITY_G711U = 11; + public static final int AUDIO_QUALITY_G723 = 12; + public static final int AUDIO_QUALITY_G711A = 13; + public static final int AUDIO_QUALITY_G722 = 14; + public static final int AUDIO_QUALITY_G711AB = 15; + public static final int AUDIO_QUALITY_G729 = 16; + public static final int AUDIO_QUALITY_EVS_NB = 17; + public static final int AUDIO_QUALITY_EVS_WB = 18; + public static final int AUDIO_QUALITY_EVS_SWB = 19; + public static final int AUDIO_QUALITY_EVS_FB = 20; /** * Video information @@ -76,7 +86,7 @@ public class ImsStreamMediaProfile implements Parcelable { } public ImsStreamMediaProfile() { - mAudioQuality = AUDIO_QUALITY_AMR_WB; + mAudioQuality = AUDIO_QUALITY_NONE; mAudioDirection = DIRECTION_SEND_RECEIVE; mVideoQuality = VIDEO_QUALITY_NONE; mVideoDirection = DIRECTION_INVALID; diff --git a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl index 23a69d1..507a293 100644 --- a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl +++ b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl @@ -17,6 +17,7 @@ package com.android.ims.internal; import com.android.ims.ImsReasonInfo; + /** * A listener type for receiving notifications about the changes to * the IMS connection(registration). @@ -26,30 +27,36 @@ import com.android.ims.ImsReasonInfo; interface IImsRegistrationListener { /** * Notifies the application when the device is connected to the IMS network. + * + * @param imsRadioTech the radio access technology. Valid values are {@code + * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}. */ - void registrationConnected(); + void registrationConnected(int imsRadioTech) = 0; /** * Notifies the application when the device is trying to connect the IMS network. + * + * @param imsRadioTech the radio access technology. Valid values are {@code + * RIL_RADIO_TECHNOLOGY_*} defined in {@link ServiceState}. */ - void registrationProgressing(); + void registrationProgressing(int imsRadioTech) = 1; /** * Notifies the application when the device is disconnected from the IMS network. */ - void registrationDisconnected(in ImsReasonInfo imsReasonInfo); + void registrationDisconnected(in ImsReasonInfo imsReasonInfo) = 2; /** * Notifies the application when its suspended IMS connection is resumed, * meaning the connection now allows throughput. */ - void registrationResumed(); + void registrationResumed() = 3; /** * Notifies the application when its current IMS connection is suspended, * meaning there is no data throughput. */ - void registrationSuspended(); + void registrationSuspended() = 4; /** * Notifies the application when its current IMS connection is updated @@ -60,7 +67,7 @@ interface IImsRegistrationListener { * If {@code event} is 0, meaning the specified service is removed from the IMS connection. * Else ({@code event} is 1), meaning the specified service is added to the IMS connection. */ - void registrationServiceCapabilityChanged(int serviceClass, int event); + void registrationServiceCapabilityChanged(int serviceClass, int event) = 5; /** * Notifies the application when features on a particular service enabled or @@ -71,11 +78,17 @@ interface IImsRegistrationListener { * @param disabledFeatures features disabled as defined in com.android.ims.ImsConfig#FeatureConstants. */ void registrationFeatureCapabilityChanged(int serviceClass, - in int[] enabledFeatures, in int[] disabledFeatures); + in int[] enabledFeatures, in int[] disabledFeatures) = 6; /** * Updates the application with the waiting voice message count. * @param count The number of waiting voice messages. */ - void voiceMessageCountUpdate(int count); + void voiceMessageCountUpdate(int count) = 7; + + /** + * Compatibility with AOSP + */ + void registrationConnected() = 8; + void registrationProgressing() = 9; } diff --git a/telephony/java/com/android/ims/internal/IImsUt.aidl b/telephony/java/com/android/ims/internal/IImsUt.aidl index 4ab5ee3..2784653 100644 --- a/telephony/java/com/android/ims/internal/IImsUt.aidl +++ b/telephony/java/com/android/ims/internal/IImsUt.aidl @@ -111,4 +111,9 @@ interface IImsUt { * Sets the listener. */ void setListener(in IImsUtListener listener); + + /** + * Retrieves the configuration of the call forward for specified service class. + */ + int queryCFForServiceClass(int condition, String number, int serviceClass); } diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java index be7e702..6e1a004 100644 --- a/telephony/java/com/android/internal/telephony/CallerInfo.java +++ b/telephony/java/com/android/internal/telephony/CallerInfo.java @@ -165,6 +165,7 @@ public class CallerInfo { * number. The returned CallerInfo is null if no number is supplied. */ public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) { + android.util.SeempLog.record_uri(12, contactRef); CallerInfo info = new CallerInfo(); info.photoResource = 0; info.phoneLabel = null; @@ -325,6 +326,7 @@ public class CallerInfo { * with all relevant fields empty or null. */ public static CallerInfo getCallerInfo(Context context, String number, int subId) { + android.util.SeempLog.record_str(12, "number="+number+",subId="+subId); if (TextUtils.isEmpty(number)) { return null; diff --git a/telephony/java/com/android/internal/telephony/IExtTelephony.aidl b/telephony/java/com/android/internal/telephony/IExtTelephony.aidl new file mode 100644 index 0000000..f98a0d8 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/IExtTelephony.aidl @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +package com.android.internal.telephony; + + +/** + * Interface used to interact with the telephony framework for + * Telephony value adds. + * {@hide} + */ +interface IExtTelephony { + + /** + * Returns the current SIM Manual provision status. + * @param slotId user preferred slotId. + * @return Card provision status as integer, below are + * possible return values. + * '0' - returned if Uicc Card is not provisioned. + * '1' - returned if Uicc Card provisioned. + * '-1'- returned if there is an error @ below layers OR + * if framework does not received info from Modem yet. + * '-2' returned when SIM card is not present in slot. + * Requires Permission: android.Manifest.permission.READ_PHONE_STATE + */ + int getCurrentUiccCardProvisioningStatus(int slotId); + + /** + * Returns the user preferred Uicc card provision status. + * @param slotId user preferred slotId. + * @return User preference value as integer, below are + * possible return values. + * '0' - returned if Uicc Card is not provisioned. + * '1' - returned if Uicc Card provisioned. + * '-1'- returned if there is an error @ below layers OR + * if framework does not received info from Modem yet. + * '-2' returned when SIM card is not present in slot. + * Requires Permission: android.Manifest.permission.READ_PHONE_STATE + */ + int getUiccCardProvisioningUserPreference(int slotId); + + /** + * Activates the Uicc card. + * @param slotId user preferred slotId. + * @return Uicc card activation result as Integer, below are + * supported return values: + * '0' - Success + * '-1' -Generic Failure + * '-2' -Invalid input + * '-3 -Another request in progress + * Requires Permission: android.Manifest.permission.MODIFY_PHONE_STATE + */ + int activateUiccCard(int slotId); + + /** + * Deactivates UICC card. + * @param slotId user preferred slotId. + * @return Uicc card deactivation result as Integer, below are + * supported return values: + * '0' - Success + * '-1' -Generic Failure + * '-2' -Invalid input + * '-3 -Another request in progress + * Requires Permission: android.Manifest.permission.MODIFY_PHONE_STATE + */ + int deactivateUiccCard(int slotId); + + /** + * Check for Sms Prompt is Enabled or Not. + * @return + * true - Sms Prompt is Enabled + * false - Sms prompt is Disabled + * Requires Permission: android.Manifest.permission.READ_PHONE_STATE + */ + boolean isSMSPromptEnabled(); + + /** + * Enable/Disable Sms prompt option. + * @param - enabled + * true - to enable Sms prompt + * false - to disable Sms prompt + * Requires Permission: android.Manifest.permission.MODIFY_PHONE_STATE + */ + void setSMSPromptEnabled(boolean enabled); + + /** + * Get logical phone id for Emergency call. + * @param - void + * @return phone id + */ + int getPhoneIdForECall(); + + /** + * Check is FDN is enabled or not. + * @param - void + * @return true or false + */ + boolean isFdnEnabled(); +} diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl index 70a8653..c7e13aa 100644 --- a/telephony/java/com/android/internal/telephony/ISms.aidl +++ b/telephony/java/com/android/internal/telephony/ISms.aidl @@ -187,6 +187,53 @@ interface ISms { in PendingIntent deliveryIntent); /** + * Send an SMS with options using Subscription Id. + * + * @param subId the subId on which the SMS has to be sent. + * @param destAddr the address to send the message to + * @param scAddr the SMSC to send the message through, or NULL for the + * default SMSC + * @param text the body of the message to send + * @param sentIntent if not NULL this <code>PendingIntent</code> is + * broadcast when the message is sucessfully sent, or failed. + * The result code will be <code>Activity.RESULT_OK<code> for success, + * or one of these errors:<br> + * <code>RESULT_ERROR_GENERIC_FAILURE</code><br> + * <code>RESULT_ERROR_RADIO_OFF</code><br> + * <code>RESULT_ERROR_NULL_PDU</code><br> + * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include + * the extra "errorCode" containing a radio technology specific value, + * generally only useful for troubleshooting.<br> + * The per-application based SMS control checks sentIntent. If sentIntent + * is NULL the caller will be checked against all unknown applications, + * which cause smaller number of SMS to be sent in checking period. + * @param deliveryIntent if not NULL this <code>PendingIntent</code> is + * broadcast when the message is delivered to the recipient. The + * raw pdu of the status report is in the extended data ("pdu"). + * @param priority Priority level of the message + * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1 + * --------------------------------- + * PRIORITY | Level of Priority + * --------------------------------- + * '00' | Normal + * '01' | Interactive + * '10' | Urgent + * '11' | Emergency + * ---------------------------------- + * Any Other values included Negative considered as Invalid Priority Indicator of the message. + * @param isExpectMore is a boolean to indicate the sending message is multi segmented or not. + * @param validityPeriod Validity Period of the message in mins. + * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1. + * Validity Period(Minimum) -> 5 mins + * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks). + * Any Other values included Negative considered as Invalid Validity Period of the message. + */ + void sendTextForSubscriberWithOptions(in int subId, String callingPkg, in String destAddr, + in String scAddr, in String text, in PendingIntent sentIntent, + in PendingIntent deliveryIntent, in int priority, in boolean isExpectMore, + in int validityPeriod); + + /** * Inject an SMS PDU into the android platform. * * @param subId the subId on which the SMS has to be injected. @@ -234,6 +281,51 @@ interface ISms { in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp); /** + * Send a multi-part text based SMS with options using Subscription Id. + * + * @param subId the subId on which the SMS has to be sent. + * @param destinationAddress the address to send the message to + * @param scAddress is the service center address or null to use + * the current default SMSC + * @param parts an <code>ArrayList</code> of strings that, in order, + * comprise the original message + * @param sentIntents if not null, an <code>ArrayList</code> of + * <code>PendingIntent</code>s (one for each message part) that is + * broadcast when the corresponding message part has been sent. + * The result code will be <code>Activity.RESULT_OK<code> for success, + * or one of these errors: + * <code>RESULT_ERROR_GENERIC_FAILURE</code> + * <code>RESULT_ERROR_RADIO_OFF</code> + * <code>RESULT_ERROR_NULL_PDU</code>. + * @param deliveryIntents if not null, an <code>ArrayList</code> of + * <code>PendingIntent</code>s (one for each message part) that is + * broadcast when the corresponding message part has been delivered + * to the recipient. The raw pdu of the status report is in the + * extended data ("pdu"). + * @param priority Priority level of the message + * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1 + * --------------------------------- + * PRIORITY | Level of Priority + * --------------------------------- + * '00' | Normal + * '01' | Interactive + * '10' | Urgent + * '11' | Emergency + * ---------------------------------- + * Any Other values included Negative considered as Invalid Priority Indicator of the message. + * @param isExpectMore is a boolean to indicate the sending message is multi segmented or not. + * @param validityPeriod Validity Period of the message in mins. + * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1. + * Validity Period(Minimum) -> 5 mins + * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks). + * Any Other values included Negative considered as Invalid Validity Period of the message. + */ + void sendMultipartTextForSubscriberWithOptions(in int subId, String callingPkg, + in String destinationAddress, in String scAddress, in List<String> parts, + in List<PendingIntent> sentIntents, in List<PendingIntent> deliveryIntents, + in int priority, in boolean isExpectMore, in int validityPeriod); + + /** * Enable reception of cell broadcast (SMS-CB) messages with the given * message identifier and RAN type. The RAN type specify this message ID * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients @@ -375,13 +467,18 @@ interface ISms { */ String getImsSmsFormatForSubscriber(int subId); - /* + /** * Get SMS prompt property, enabled or not * @return true if enabled, false otherwise */ boolean isSMSPromptEnabled(); /** + * Set SMS prompt property, enabled or not + */ + void setSMSPromptEnabled(boolean bool); + + /** * Send a system stored text message. * * This is used for sending a previously sent, but failed-to-send, message or @@ -447,4 +544,12 @@ interface ISms { void sendStoredMultipartText(int subId, String callingPkg, in Uri messageUri, String scAddress, in List<PendingIntent> sentIntents, in List<PendingIntent> deliveryIntents); + + /** + * Get the capacity count of sms on Icc card. + * + * @param subId for subId which getSmsCapacityOnIcc is queried. + * @return capacity of ICC + */ + int getSmsCapacityOnIccForSubscriber(int subId); } diff --git a/telephony/java/com/android/internal/telephony/ISub.aidl b/telephony/java/com/android/internal/telephony/ISub.aidl index f6aef08..1323258 100755 --- a/telephony/java/com/android/internal/telephony/ISub.aidl +++ b/telephony/java/com/android/internal/telephony/ISub.aidl @@ -183,4 +183,12 @@ interface ISub { int getSimStateForSlotIdx(int slotIdx); boolean isActiveSubId(int subId); + + void activateSubId(int subId); + + void deactivateSubId(int subId); + + int setSubState(int subId, int subStatus); + + int getSubState(int subId); } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index dcece26..c3db8c2 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -488,6 +488,13 @@ interface ITelephony { int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage); /** + * Return icc operator numeric for given subId + * @param subId user preferred subId. + * Returns icc operator numeric + */ + String getIccOperatorNumericForData(int subId); + + /** * Return true if an ICC card is present */ boolean hasIccCard(); @@ -531,6 +538,22 @@ interface ITelephony { */ void setCellInfoListRate(int rateInMillis); + + /** + * Return if the current radio is LTE on GSM + */ + int getLteOnGsmMode(); + + /** + * Adds a protected sms address to the {@link Settings.Secure.PROTECTED_SMS_ADDRESSES} + */ + void addProtectedSmsAddress(String address); + + /** + * Revokes a protected sms address from {@link Settings.Secure.PROTECTED_SMS_ADDRESSES} + */ + boolean revokeProtectedSmsAddress(String address); + /** * get default sim * @return sim id @@ -547,6 +570,18 @@ interface ITelephony { */ IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID); + + /** + * Opens a logical channel to the ICC card for a particular subId. + * + * Input parameters equivalent to TS 27.007 AT+CCHO command. + * + * @param subId user preferred subId. + * @param AID Application id. See ETSI 102.221 and 101.220. + * @return an IccOpenLogicalChannelResponse object. + */ + IccOpenLogicalChannelResponse iccOpenLogicalChannelUsingSubId(int subId, String AID); + /** * Closes a previously opened logical channel to the ICC card. * @@ -559,6 +594,19 @@ interface ITelephony { boolean iccCloseLogicalChannel(int channel); /** + * Closes a previously opened logical channel to the ICC card for a + * particular subId. + * + * Input parameters equivalent to TS 27.007 AT+CCHC command. + * + * @param subId user preferred subId. + * @param channel is the channel id to be closed as retruned by a + * successful iccOpenLogicalChannel. + * @return true if the channel was closed successfully. + */ + boolean iccCloseLogicalChannelUsingSubId(int subId, int channel); + + /** * Transmit an APDU to the ICC card over a logical channel. * * Input parameters equivalent to TS 27.007 AT+CGLA command. @@ -579,6 +627,28 @@ interface ITelephony { int p1, int p2, int p3, String data); /** + * Transmit an APDU to the ICC card over a logical channel for a + * particular subId. + * + * Input parameters equivalent to TS 27.007 AT+CGLA command. + * + * @param subId user preferred subId. + * @param channel is the channel id to be closed as retruned by a + * successful iccOpenLogicalChannel. + * @param cla Class of the APDU command. + * @param instruction Instruction of the APDU command. + * @param p1 P1 value of the APDU command. + * @param p2 P2 value of the APDU command. + * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU + * is sent to the SIM. + * @param data Data to be sent with the APDU. + * @return The APDU response from the ICC card with the status appended at + * the end. + */ + String iccTransmitApduLogicalChannelUsingSubId(int subId, int channel, int cla, + int instruction, int p1, int p2, int p3, String data); + + /** * Transmit an APDU to the ICC card over the basic channel. * * Input parameters equivalent to TS 27.007 AT+CSIM command. @@ -597,6 +667,26 @@ interface ITelephony { int p1, int p2, int p3, String data); /** + * Transmit an APDU to the ICC card over the basic channel for a particular + * subId. + * + * Input parameters equivalent to TS 27.007 AT+CSIM command. + * + * @param subId user preferred subId. + * @param cla Class of the APDU command. + * @param instruction Instruction of the APDU command. + * @param p1 P1 value of the APDU command. + * @param p2 P2 value of the APDU command. + * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU + * is sent to the SIM. + * @param data Data to be sent with the APDU. + * @return The APDU response from the ICC card with the status appended at + * the end. + */ + String iccTransmitApduBasicChannelUsingSubId(int subId, int cla, int instruction, + int p1, int p2, int p3, String data); + + /** * Returns the response APDU for a command APDU sent through SIM_IO. * * @param fileID @@ -611,6 +701,22 @@ interface ITelephony { String filePath); /** + * Returns the response APDU for a command APDU sent through SIM_IO + * for a particular subId. + * + * @param subId user preferred subId. + * @param fileID + * @param command + * @param p1 P1 value of the APDU command. + * @param p2 P2 value of the APDU command. + * @param p3 P3 value of the APDU command. + * @param filePath + * @return The APDU response. + */ + byte[] iccExchangeSimIOUsingSubId(int subId, int fileID, int command, int p1, int p2, + int p3, String filePath); + + /** * Send ENVELOPE to the SIM and returns the response. * * @param contents String containing SAT/USAT response in hexadecimal @@ -1005,4 +1111,15 @@ interface ITelephony { * Return the modem activity info. */ ModemActivityInfo getModemActivityInfo(); + + /** + * Get ATR (Answer To Reset; as per ISO/IEC 7816-4) from SIM card + */ + byte[] getAtr(); + + /** + * Get ATR (Answer To Reset; as per ISO/IEC 7816-4) from SIM card + * for a particular subId. + */ + byte[] getAtrUsingSubId(int subId); } diff --git a/telephony/java/com/android/internal/telephony/OperatorInfo.java b/telephony/java/com/android/internal/telephony/OperatorInfo.java index a29d7c1..7db6600 100644 --- a/telephony/java/com/android/internal/telephony/OperatorInfo.java +++ b/telephony/java/com/android/internal/telephony/OperatorInfo.java @@ -33,6 +33,7 @@ public class OperatorInfo implements Parcelable { private String mOperatorAlphaLong; private String mOperatorAlphaShort; private String mOperatorNumeric; + private String mRadioTech; private State mState = State.UNKNOWN; @@ -57,6 +58,11 @@ public class OperatorInfo implements Parcelable { return mState; } + public String + getRadioTech() { + return mRadioTech; + } + OperatorInfo(String operatorAlphaLong, String operatorAlphaShort, String operatorNumeric, @@ -65,6 +71,14 @@ public class OperatorInfo implements Parcelable { mOperatorAlphaLong = operatorAlphaLong; mOperatorAlphaShort = operatorAlphaShort; mOperatorNumeric = operatorNumeric; + mRadioTech = ""; + /* operatorNumeric format: PLMN+RAT or PLMN */ + if (null != operatorNumeric) { + String values[] = operatorNumeric.split("\\+"); + mOperatorNumeric = values[0]; + if (values.length > 1) + mRadioTech = values[1]; + } mState = state; } @@ -108,6 +122,7 @@ public class OperatorInfo implements Parcelable { return "OperatorInfo " + mOperatorAlphaLong + "/" + mOperatorAlphaShort + "/" + mOperatorNumeric + + "/" + mRadioTech + "/" + mState; } @@ -132,7 +147,7 @@ public class OperatorInfo implements Parcelable { public void writeToParcel(Parcel dest, int flags) { dest.writeString(mOperatorAlphaLong); dest.writeString(mOperatorAlphaShort); - dest.writeString(mOperatorNumeric); + dest.writeString(mOperatorNumeric + "+" + mRadioTech); dest.writeSerializable(mState); } diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java index 8bc1402..e612be3 100644..100755 --- a/telephony/java/com/android/internal/telephony/PhoneConstants.java +++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java @@ -184,7 +184,8 @@ public class PhoneConstants { public enum CardUnavailableReason { REASON_CARD_REMOVED, REASON_RADIO_UNAVAILABLE, - REASON_SIM_REFRESH_RESET + REASON_SIM_REFRESH_RESET, + REASON_APM_SIM_POWER_DOWN }; // Initial MTU value. diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 7088be8..af79ff8 100644..100755 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -77,7 +77,7 @@ public interface RILConstants { int SIM_SAP_MSG_SIZE_TOO_SMALL = 34; int SIM_SAP_CONNECT_OK_CALL_ONGOING = 35; int LCE_NOT_SUPPORTED = 36; /* Link Capacity Estimation (LCE) not supported */ - + int INVALID_PARAMETER = 37; /* NETWORK_MODE_* See ril.h RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE */ int NETWORK_MODE_WCDMA_PREF = 0; /* GSM/WCDMA (WCDMA preferred) */ @@ -334,6 +334,7 @@ cat include/telephony/ril.h | \ int RIL_REQUEST_STOP_LCE = 133; int RIL_REQUEST_PULL_LCEDATA = 134; int RIL_REQUEST_GET_ACTIVITY_INFO = 135; + int RIL_REQUEST_SIM_GET_ATR = 136; int RIL_UNSOL_RESPONSE_BASE = 1000; int RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000; @@ -382,4 +383,6 @@ cat include/telephony/ril.h | \ int RIL_UNSOL_ON_SS = 1043; int RIL_UNSOL_STK_CC_ALPHA_NOTIFY = 1044; int RIL_UNSOL_LCEDATA_RECV = 1045; + + int RIL_UNSOL_STK_SEND_SMS_RESULT = 11002; /* Samsung STK */ } diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java index 645c3a1..73e778c 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java +++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java @@ -88,6 +88,11 @@ public interface TelephonyProperties */ static final String PROPERTY_LTE_ON_CDMA_DEVICE = "telephony.lteOnCdmaDevice"; + /** + * {@see BaseCommands#getLteOnGsmMode()} + */ + static final String PROPERTY_LTE_ON_GSM_DEVICE = "telephony.lteOnGsmDevice"; + static final String CURRENT_ACTIVE_PHONE = "gsm.current.phone-type"; //****** SIM Card @@ -217,4 +222,44 @@ public interface TelephonyProperties * or Earpiece, based on the default audio routing strategy. */ static final String PROPERTY_VIDEOCALL_AUDIO_OUTPUT = "persist.radio.call.audio.output"; + + /** + * Used when Presence app sends Dial intent with specific schema + * If true: skip schema parsing and use Tel schema + * If false: parse schema + */ + static final String EXTRA_SKIP_SCHEMA_PARSING = + "org.codeaurora.extra.SKIP_SCHEMA_PARSING"; + + /** + * For Group Conference Calling + * If true: isConferenceUri in Dial is set to true, + * which indicates that Dial is for Conference Calling + * If false: above is set to false + */ + static final String EXTRAS_IS_CONFERENCE_URI = "isConferenceUri"; + + /** + * For Group Conference Dialing Feature + * If true: Dial intent triggered from Group Conference Calling screen + * if false: normal dial + */ + static final String EXTRA_DIAL_CONFERENCE_URI = + "org.codeaurora.extra.DIAL_CONFERENCE_URI"; + + /** + * For Add Participant Feature + * If true: Dial intent triggered from Dialpad is for AddParticipant + * if false: normal dial + */ + static final String ADD_PARTICIPANT_KEY = "add_participant"; + + /** + * For VICE Feature + * If true: Dial intent is for call pull functionality + * if false: normal dial + */ + static final String EXTRA_IS_CALL_PULL = + "org.codeaurora.extra.IS_CALL_PULL"; + } |