diff options
Diffstat (limited to 'telephony/java')
24 files changed, 735 insertions, 10 deletions
diff --git a/telephony/java/android/service/carrier/CarrierIdentifier.java b/telephony/java/android/service/carrier/CarrierIdentifier.java index bc0f909e1331..c6b9ea200382 100644 --- a/telephony/java/android/service/carrier/CarrierIdentifier.java +++ b/telephony/java/android/service/carrier/CarrierIdentifier.java @@ -55,12 +55,13 @@ public class CarrierIdentifier implements Parcelable { private @Nullable String mImsi; private @Nullable String mGid1; private @Nullable String mGid2; + private @Nullable String mIccid; private int mCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID; private int mSpecificCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID; public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, @Nullable String imsi, @Nullable String gid1, @Nullable String gid2) { - this(mcc, mnc, spn, imsi, gid1, gid2, TelephonyManager.UNKNOWN_CARRIER_ID, + this(mcc, mnc, spn, imsi, gid1, gid2, null, TelephonyManager.UNKNOWN_CARRIER_ID, TelephonyManager.UNKNOWN_CARRIER_ID); } @@ -79,16 +80,31 @@ public class CarrierIdentifier implements Parcelable { public CarrierIdentifier(@NonNull String mcc, @NonNull String mnc, @Nullable String spn, @Nullable String imsi, @Nullable String gid1, @Nullable String gid2, int carrierid, int specificCarrierId) { + this(mcc, mnc, spn, imsi, gid1, gid2, null, carrierid, specificCarrierId); + } + + /** @hide */ + public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, + @Nullable String imsi, @Nullable String gid1, @Nullable String gid2, + @Nullable String iccid, int carrierid, int specificCarrierId) { mMcc = mcc; mMnc = mnc; mSpn = spn; mImsi = imsi; mGid1 = gid1; mGid2 = gid2; + mIccid = iccid; mCarrierId = carrierid; mSpecificCarrierId = specificCarrierId; } + /** @hide */ + public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, @Nullable String imsi, + @Nullable String gid1, @Nullable String gid2I, @Nullable String iccid) { + this(mcc, mnc, spn, imsi, gid1, gid2I); + mIccid = iccid; + } + /** * Creates a carrier identifier instance. * @@ -113,6 +129,7 @@ public class CarrierIdentifier implements Parcelable { mGid2 = gid2; mSpn = null; mImsi = null; + mIccid = null; } /** @hide */ @@ -154,6 +171,13 @@ public class CarrierIdentifier implements Parcelable { return mGid2; } + /** Get the ICCID. + * @hide */ + @Nullable + public String getIccid() { + return mIccid; + } + /** * Returns the carrier id. * @see TelephonyManager#getSimCarrierId() @@ -192,13 +216,14 @@ public class CarrierIdentifier implements Parcelable { && Objects.equals(mImsi, that.mImsi) && Objects.equals(mGid1, that.mGid1) && Objects.equals(mGid2, that.mGid2) + && Objects.equals(mIccid, that.mIccid) && Objects.equals(mCarrierId, that.mCarrierId) && Objects.equals(mSpecificCarrierId, that.mSpecificCarrierId); } @Override public int hashCode(){ - return Objects.hash(mMcc, mMnc, mSpn, mImsi, mGid1, mGid2, mCarrierId, mSpecificCarrierId); + return Objects.hash(mMcc, mMnc, mSpn, mImsi, mGid1, mGid2, mIccid, mCarrierId, mSpecificCarrierId); } @Override @@ -214,6 +239,7 @@ public class CarrierIdentifier implements Parcelable { out.writeString(mImsi); out.writeString(mGid1); out.writeString(mGid2); + out.writeString(mIccid); out.writeInt(mCarrierId); out.writeInt(mSpecificCarrierId); } @@ -227,6 +253,7 @@ public class CarrierIdentifier implements Parcelable { + ",imsi=" + Rlog.pii(false, mImsi) + ",gid1=" + mGid1 + ",gid2=" + mGid2 + + ",iccid=" + mIccid + ",carrierid=" + mCarrierId + ",specificCarrierId=" + mSpecificCarrierId + "}"; @@ -240,6 +267,7 @@ public class CarrierIdentifier implements Parcelable { mImsi = in.readString(); mGid1 = in.readString(); mGid2 = in.readString(); + mIccid = in.readString(); mCarrierId = in.readInt(); mSpecificCarrierId = in.readInt(); } @@ -251,5 +279,6 @@ public class CarrierIdentifier implements Parcelable { int IMSI_PREFIX = 2; int GID1 = 3; int GID2 = 4; + int ICCID = 5; } } diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java index f6d18fcd9ab3..83b71ff747dc 100644 --- a/telephony/java/android/telephony/AccessNetworkConstants.java +++ b/telephony/java/android/telephony/AccessNetworkConstants.java @@ -19,6 +19,7 @@ package android.telephony; import android.annotation.IntDef; import android.annotation.SystemApi; import android.hardware.radio.V1_5.AccessNetwork; +import android.hardware.radio.V1_5.RadioAccessNetworks; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -107,6 +108,28 @@ public final class AccessNetworkConstants { default: return Integer.toString(type); } } + + /** + * Converts from RadioAccessNetworks in HAL to AccessNetworkType in frameworks. + * @hide + */ + public static int convertRanToAnt(int ran) { + switch (ran) { + case RadioAccessNetworks.GERAN: + return AccessNetworkType.GERAN; + case RadioAccessNetworks.UTRAN: + return AccessNetworkType.UTRAN; + case RadioAccessNetworks.EUTRAN: + return AccessNetworkType.EUTRAN; + case RadioAccessNetworks.NGRAN: + return AccessNetworkType.NGRAN; + case RadioAccessNetworks.CDMA2000: + return AccessNetworkType.CDMA2000; + case RadioAccessNetworks.UNKNOWN: + default: + return AccessNetworkType.UNKNOWN; + } + } } /** diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index b52f49190679..ece7c94efe2f 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -768,6 +768,14 @@ public class CarrierConfigManager { public static final String KEY_VILTE_DATA_IS_METERED_BOOL = "vilte_data_is_metered_bool"; /** + * Flag indicating whether we should reset UT capability or not for IMS deregistration + * and for IMS feature state not ready + * @hide + */ + public static final String KEY_IGNORE_RESET_UT_CAPABILITY_BOOL = + "ignore_reset_ut_capability_bool"; + + /** * Flag specifying whether WFC over IMS should be available for carrier: independent of * carrier provisioning. If false: hard disabled. If true: then depends on carrier * provisioning, availability etc. @@ -803,6 +811,18 @@ public class CarrierConfigManager { "carrier_wfc_supports_wifi_only_bool"; /** + * Flag specifying whether WFC over IMS supports the "ims preferred" option. If false, the wifi + * calling settings will not include an option for "ims preferred". If true, the wifi calling + * settings will include an option for "ims preferred" + * <p> + * By default, it is assumed that WFC does not support "ims preferred". + * @hide + */ + public static final String KEY_CARRIER_WFC_SUPPORTS_IMS_PREFERRED_BOOL = + "carrier_wfc_supports_ims_preferred_bool"; + + + /** * Default mode for WFC over IMS on home network: * <ul> * <li>0: Wi-Fi only @@ -932,6 +952,13 @@ public class CarrierConfigManager { public static final String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL = "carrier_volte_tty_supported_bool"; + /** + * Flag indicating whether VT tty is supported + * @hide + */ + public static final String KEY_CARRIER_VT_TTY_SUPPORT_BOOL = + "carrier_vt_tty_support_bool"; + /** * Flag specifying whether IMS service can be turned off. If false then the service will not be * turned-off completely, but individual features can be disabled. @@ -1399,6 +1426,15 @@ public class CarrierConfigManager { public static final String KEY_HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool"; /** + * Determines whether the Enabled 5G toggle will be shown in the settings. When this + * option is {@code true}, the toggle will be hidden regardless of whether the device and + * carrier supports 5G or not. + * + * @hide + */ + public static final String KEY_HIDE_ENABLED_5G_BOOL = "hide_enabled_5g_bool"; + + /** * Sets the default state for the "Enhanced 4G LTE" or "Advanced Calling" mode toggle set by the * user. When this is {@code true}, this mode by default is on, otherwise if {@code false}, * this mode by default is off. @@ -1849,6 +1885,7 @@ public class CarrierConfigManager { public static final String KEY_SHOW_PRECISE_FAILED_CAUSE_BOOL = "show_precise_failed_cause_bool"; + /** * Bit-field integer to determine whether the carrier enable the non-standalone (NSA) mode of * 5G NR, standalone (SA) mode of 5G NR @@ -1869,6 +1906,12 @@ public class CarrierConfigManager { public static final String KEY_CARRIER_NR_AVAILABILITY_INT = "carrier_nr_availability_int"; /** + * Flag specifying whether CDMA call waiting and call forwarding are enabled + * @hide + */ + public static final String KEY_CDMA_CW_CF_ENABLED_BOOL = "cdma_cw_cf_enabled_bool"; + + /** * Boolean to decide whether LTE is enabled. */ public static final String KEY_LTE_ENABLED_BOOL = "lte_enabled_bool"; @@ -1895,8 +1938,8 @@ public class CarrierConfigManager { public static final String KEY_CARRIER_SETTINGS_ACTIVITY_COMPONENT_NAME_STRING = "carrier_settings_activity_component_name_string"; - // These variables are used by the MMS service and exposed through another API, - // SmsManager. The variable names and string values are copied from there. + // These variables are used by the MMS service and exposed through another API, {@link + // SmsManager}. The variable names and string values are copied from there. public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled"; public static final String KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL = "allowAttachAudio"; public static final String KEY_MMS_APPEND_TRANSACTION_ID_BOOL = "enabledTransID"; @@ -4825,6 +4868,45 @@ public class CarrierConfigManager { public static final String KEY_ALLOWED_INITIAL_ATTACH_APN_TYPES_STRING_ARRAY = "allowed_initial_attach_apn_types_string_array"; + /** + * Flag indicating whether carrier supports multianchor conference. + * In multianchor conference, a participant of a conference can add + * other participants to the call using merge button thereby resulting + * in a conference with multi anchors. + * @hide + */ + public static final String KEY_CARRIER_SUPPORTS_MULTIANCHOR_CONFERENCE = + "carrier_supports_multianchor_conference"; + + /** + * String array of APN configurations of same MVNO type GID. + * The entries should be of form "GID data:all supported apn types:devicecapability:apnname". + * example: 52FF:default,mms:SA:nrphone + * + * @hide + */ + public static final String KEY_MULTI_APN_ARRAY_FOR_SAME_GID = "multi_apn_array_for_same_gid"; + + /** + * Flag indicating if APN filtering required. + * + * @hide + */ + public static final String KEY_REQUIRE_APN_FILTERING_WITH_RADIO_CAPABILITY = + "require_apn_filtering_with_radio_capability_bool"; + + /** + * Determines whether carrier supports Sms Callback Mode. + * When {@code true}, modem can enter/exit SMS callback mode (SCBM) after sending e911 SMS. + * When user tries to make a following e911 call and modem is in SCBM, the same sub will be + * selected to place the e911 call over IMS. + * When {@code false}, follows the current slot selection logic to place the e911 call. + * + * @hide + */ + public static final String KEY_USE_SMS_CALLBACK_MODE_BOOL = + "use_sms_callback_mode_bool"; + /** The default value for every variable. */ private final static PersistableBundle sDefaults; @@ -4858,9 +4940,11 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL, false); sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, true); sDefaults.putBoolean(KEY_VILTE_DATA_IS_METERED_BOOL, true); + sDefaults.putBoolean(KEY_IGNORE_RESET_UT_CAPABILITY_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false); + sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_IMS_PREFERRED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL, false); @@ -4873,6 +4957,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, true); + sDefaults.putBoolean(KEY_CARRIER_VT_TTY_SUPPORT_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL, true); sDefaults.putBoolean(KEY_CARRIER_IMS_GBA_REQUIRED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_INSTANT_LETTERING_AVAILABLE_BOOL, false); @@ -4898,7 +4983,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONED_BOOL, false); - sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, false); + sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, true); sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_PASSWORD_CHANGE_BOOL, true); sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_DEACTIVATE_ALL_BOOL, true); sDefaults.putInt(KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT, SERVICE_CLASS_VOICE); @@ -4975,6 +5060,7 @@ public class CarrierConfigManager { new String[]{"default", "mms", "dun", "supl"}); sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS, new String[]{"default", "mms", "dun", "supl"}); + sDefaults.putBoolean(KEY_CDMA_CW_CF_ENABLED_BOOL, false); sDefaults.putStringArray(KEY_CARRIER_WWAN_DISALLOWED_APN_TYPES_STRING_ARRAY, new String[]{""}); sDefaults.putStringArray(KEY_CARRIER_WLAN_DISALLOWED_APN_TYPES_STRING_ARRAY, @@ -5017,6 +5103,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true); sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true); sDefaults.putBoolean(KEY_HIDE_ENHANCED_4G_LTE_BOOL, false); + sDefaults.putBoolean(KEY_HIDE_ENABLED_5G_BOOL, true); sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL, true); sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false); sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false); @@ -5385,6 +5472,27 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_HIDE_ENABLE_2G, false); sDefaults.putStringArray(KEY_ALLOWED_INITIAL_ATTACH_APN_TYPES_STRING_ARRAY, new String[]{"ia", "default", "ims", "mms", "dun", "emergency"}); + sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_MULTIANCHOR_CONFERENCE, false); + sDefaults.putStringArray(KEY_MULTI_APN_ARRAY_FOR_SAME_GID, new String[] { + "52FF:mms,supl,hipri,default,fota:SA:nrphone", + "52FF:mms,supl,hipri,default,fota:NSA:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:LTE:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:TD_SCDMA:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:UMTS:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:GSM:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:HDR:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:1xRTT:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:SA:enhancedphone", + "53FF:mms,supl,hipri,default,fota:NSA:enhancedphone", + "53FF:mms,supl,hipri,default,fota:LTE:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:TD_SCDMA:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:UMTS:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:GSM:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:HDR:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:1xRTT:nxtgenphone", + }); + sDefaults.putBoolean(KEY_REQUIRE_APN_FILTERING_WITH_RADIO_CAPABILITY, false); + sDefaults.putBoolean(KEY_USE_SMS_CALLBACK_MODE_BOOL, false); } /** diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java index 2704418935d9..4a65d0010076 100644 --- a/telephony/java/android/telephony/DisconnectCause.java +++ b/telephony/java/android/telephony/DisconnectCause.java @@ -361,12 +361,124 @@ public final class DisconnectCause { public static final int INCOMING_AUTO_REJECTED = 81; + /** @hide */ + public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 82; + /** @hide */ + public static final int BEARER_CAPABILITY_UNAVAILABLE = 83; + /** @hide */ + public static final int SERVICE_OPTION_NOT_AVAILABLE = 84; + /** @hide */ + public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 85; + /** @hide */ + public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 86; + /** @hide */ + public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 87; + /** @hide */ + public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 88; + /** @hide */ + public static final int INVALID_TRANSACTION_IDENTIFIER = 89; + /** @hide */ + public static final int USER_NOT_MEMBER_OF_CUG = 90; + /** @hide */ + public static final int INCOMPATIBLE_DESTINATION = 91; + /** @hide */ + public static final int INVALID_TRANSIT_NW_SELECTION = 92; + /** @hide */ + public static final int SEMANTICALLY_INCORRECT_MESSAGE = 93; + /** @hide */ + public static final int INVALID_MANDATORY_INFORMATION = 94; + /** @hide */ + public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 95; + /** @hide */ + public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 96; + /** @hide */ + public static final int INFORMATION_ELEMENT_NON_EXISTENT = 97; + /** @hide */ + public static final int CONDITIONAL_IE_ERROR = 98; + /** @hide */ + public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 99; + /** @hide */ + public static final int RECOVERY_ON_TIMER_EXPIRED = 100; + /** @hide */ + public static final int PROTOCOL_ERROR_UNSPECIFIED = 101; + /** @hide */ + public static final int INTERWORKING_UNSPECIFIED = 102; + /** @hide */ + public static final int LOCAL_LOW_BATTERY = 103; + /** @hide */ + public static final int NO_CIRCUIT_AVAIL = 104; + /** @hide */ + public static final int NO_ROUTE_TO_DESTINATION = 105; + /** @hide */ + public static final int OPERATOR_DETERMINED_BARRING = 106; + /** @hide */ + public static final int CALL_FAIL_NO_USER_RESPONDING = 107; + /** @hide */ + public static final int CALL_FAIL_NO_ANSWER_FROM_USER = 108; + /** @hide */ + public static final int CALL_FAIL_DESTINATION_OUT_OF_ORDER = 109; + /** @hide */ + public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 110; + /** @hide */ + public static final int CHANNEL_UNACCEPTABLE = 111; + /** @hide */ + public static final int CALL_REJECTED = 112; + /** @hide */ + public static final int NUMBER_CHANGED = 113; + /** @hide */ + public static final int PREEMPTION = 114; + /** @hide */ + public static final int FACILITY_REJECTED = 115; + /** @hide */ + public static final int RESP_TO_STATUS_ENQUIRY = 116; + /** @hide */ + public static final int NETWORK_OUT_OF_ORDER = 117; + /** @hide */ + public static final int TEMPORARY_FAILURE = 118; + /** @hide */ + public static final int SWITCHING_EQUIPMENT_CONGESTION = 119; + /** @hide */ + public static final int ACCESS_INFORMATION_DISCARDED = 120; + /** @hide */ + public static final int REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 121; + /** @hide */ + public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 122; + /** @hide */ + public static final int QOS_UNAVAILABLE = 123; + /** @hide */ + public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 124; + + /** + * call failed due to LTE to 3G/2G handover not feasible + * @hide + */ + public static final int HO_NOT_FEASIBLE = 125; + /** @hide */ + public static final int NON_SELECTED_USER_CLEARING = 126; + //********************************************************************************************* // When adding a disconnect type: - // 1) Update toString() with the newly added disconnect type. - // 2) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause. + // 1) Please assign the new type the next id value below. + // 2) Increment the next id value below to a new value. + // 3) Update MAXIMUM_VALID_VALUE to the new disconnect type. + // 4) Update toString() with the newly added disconnect type. + // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause. + // + // NextId: 123 //********************************************************************************************* + /** + * Smallest valid value for call disconnect codes. + * @hide + */ + public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED; + + /** + * Largest valid value for call disconnect codes. + * @hide + */ + public static final int MAXIMUM_VALID_VALUE = NON_SELECTED_USER_CLEARING; + /** Private constructor to avoid class instantiation. */ private DisconnectCause() { // Do nothing. @@ -515,6 +627,32 @@ public final class DisconnectCause { return "EMERGENCY_TEMP_FAILURE"; case EMERGENCY_PERM_FAILURE: return "EMERGENCY_PERM_FAILURE"; + case NO_CIRCUIT_AVAIL: + return "NO_CIRCUIT_AVAIL"; + case NO_ROUTE_TO_DESTINATION: + return "NO_ROUTE_TO_DESTINATION"; + 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 IMS_SIP_ALTERNATE_EMERGENCY_CALL: @@ -539,6 +677,70 @@ public final class DisconnectCause { return "OUTGOING_EMERGENCY_CALL_PLACED"; case INCOMING_AUTO_REJECTED: return "INCOMING_AUTO_REJECTED"; + 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 HO_NOT_FEASIBLE: + return "HO_NOT_FEASIBLE"; + case NON_SELECTED_USER_CLEARING: + return "NON_SELECTED_USER_CLEARING"; default: return "INVALID: " + cause; } diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index f110daecd952..c229ccc17c7a 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -1757,6 +1757,13 @@ public class ServiceState implements Parcelable { } /** @hide */ + public static boolean isPsTech(int radioTechnology) { + return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE || + radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA || + radioTechnology == RIL_RADIO_TECHNOLOGY_NR; + } + + /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static boolean bearerBitmapHasCdma(int networkTypeBitmask) { return (RIL_RADIO_CDMA_TECHNOLOGY_BITMASK diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 4926687f6724..439fe8635208 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -463,6 +463,7 @@ public final class SmsManager { public void sendTextMessage( String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent) { + android.util.SeempLog.record_str(75, destinationAddress); sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent, true /* persistMessage*/, getOpPackageName(), getAttributionTag(), 0L /* messageId */); @@ -1441,6 +1442,7 @@ public final class SmsManager { public void sendDataMessage( String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) { + android.util.SeempLog.record_str(73, destinationAddress); if (TextUtils.isEmpty(destinationAddress)) { throw new IllegalArgumentException("Invalid destinationAddress"); } @@ -1771,6 +1773,7 @@ public final class SmsManager { @RequiresPermission(Manifest.permission.ACCESS_MESSAGES_ON_ICC) public boolean copyMessageToIcc( @Nullable byte[] smsc, @NonNull byte[] pdu, @StatusOnIcc int status) { + android.util.SeempLog.record(79); boolean success = false; if (pdu == null) { @@ -1814,6 +1817,7 @@ public final class SmsManager { @UnsupportedAppUsage @RequiresPermission(Manifest.permission.ACCESS_MESSAGES_ON_ICC) public boolean deleteMessageFromIcc(int messageIndex) { + android.util.SeempLog.record(80); boolean success = false; try { @@ -1857,6 +1861,7 @@ public final class SmsManager { @UnsupportedAppUsage @RequiresPermission(Manifest.permission.ACCESS_MESSAGES_ON_ICC) public boolean updateMessageOnIcc(int messageIndex, int newStatus, byte[] pdu) { + android.util.SeempLog.record(81); boolean success = false; try { diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index c48bd211fac2..f49ab5b90154 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -2000,6 +2000,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDeviceId(int slotIndex) { // FIXME this assumes phoneId == slotIndex + android.util.SeempLog.record_str(8, ""+slotIndex); try { IPhoneSubInfo info = getSubscriberInfoService(); if (info == null) @@ -2341,6 +2342,7 @@ public class TelephonyManager { @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public CellLocation getCellLocation() { + android.util.SeempLog.record(49); try { ITelephony telephony = getITelephony(); if (telephony == null) { @@ -2376,6 +2378,7 @@ public class TelephonyManager { @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) public List<NeighboringCellInfo> getNeighboringCellInfo() { + android.util.SeempLog.record(50); try { ITelephony telephony = getITelephony(); if (telephony == null) @@ -3823,6 +3826,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage public String getSimSerialNumber(int subId) { + android.util.SeempLog.record_str(388, ""+subId); try { IPhoneSubInfo info = getSubscriberInfoService(); if (info == null) @@ -4093,6 +4097,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public String getSubscriberId(int subId) { + android.util.SeempLog.record_str(389, ""+subId); try { IPhoneSubInfo info = getSubscriberInfoService(); if (info == null) @@ -4706,6 +4711,7 @@ public class TelephonyManager { }) @UnsupportedAppUsage public String getLine1Number(int subId) { + android.util.SeempLog.record_str(9, ""+subId); String number = null; try { ITelephony telephony = getITelephony(); diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java index b503733f8de9..af2e22401de2 100644 --- a/telephony/java/android/telephony/data/ApnSetting.java +++ b/telephony/java/android/telephony/data/ApnSetting.java @@ -1410,8 +1410,8 @@ public class ApnSetting implements Parcelable { && !typeSameAny(this, other) && xorEqualsString(this.mProxyAddress, other.mProxyAddress) && xorEqualsInt(this.mProxyPort, other.mProxyPort) - && xorEquals(this.mProtocol, other.mProtocol) - && xorEquals(this.mRoamingProtocol, other.mRoamingProtocol) + && xorEqualsInt(this.mProtocol, other.mProtocol) + && xorEqualsInt(this.mRoamingProtocol, other.mRoamingProtocol) && Objects.equals(this.mCarrierEnabled, other.mCarrierEnabled) && Objects.equals(this.mProfileId, other.mProfileId) && Objects.equals(this.mMvnoType, other.mMvnoType) diff --git a/telephony/java/android/telephony/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java index 9bb4db8edf79..bcc15b8bca1f 100644 --- a/telephony/java/android/telephony/ims/ImsCallProfile.java +++ b/telephony/java/android/telephony/ims/ImsCallProfile.java @@ -120,6 +120,11 @@ public final class ImsCallProfile implements Parcelable { * VideoShare (video RX one way) */ public static final int CALL_TYPE_VS_RX = 10; + /** + * Unknown (audio / video inactive) + * @hide + */ + public static final int CALL_TYPE_UNKNOWN = (-1); /** * Extra properties for IMS call. diff --git a/telephony/java/android/telephony/ims/ImsCallSession.java b/telephony/java/android/telephony/ims/ImsCallSession.java index 0aff99709a52..32a65660121f 100755..100644 --- a/telephony/java/android/telephony/ims/ImsCallSession.java +++ b/telephony/java/android/telephony/ims/ImsCallSession.java @@ -1307,7 +1307,9 @@ public class ImsCallSession { if (mListener != null) { if (newSession != null) { // New session created after conference - mListener.callSessionMergeComplete(new ImsCallSession(newSession)); + ImsCallSession confSession = new ImsCallSession(newSession); + confSession.mListener = mListener; + mListener.callSessionMergeComplete(confSession); } else { // Session already exists. Hence no need to pass mListener.callSessionMergeComplete(null); diff --git a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java index eb3e8ed5a8e4..7694f5ee9981 100644 --- a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java +++ b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java @@ -19,6 +19,7 @@ package android.telephony.ims.stub; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.os.Bundle; import android.os.RemoteException; @@ -139,6 +140,12 @@ public class ImsUtImplBase { } @Override + public int queryCFForServiceClass(int condition, String number, int serviceClass) throws + RemoteException { + return ImsUtImplBase.this.queryCFForServiceClass(condition, number, serviceClass); + } + + @Override public int queryCallWaiting() throws RemoteException { return ImsUtImplBase.this.queryCallWaiting(); } @@ -286,6 +293,15 @@ public class ImsUtImplBase { } /** + * Retrieves the configuration of the call forward for specified service class. + */ + @SuppressLint("AcronymName") + public int queryCFForServiceClass(int condition, String number, + int serviceClass) { + return -1; + } + + /** * Retrieves the configuration of the call waiting. */ public int queryCallWaiting() { diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java index 487786045b8e..314ea6a6f44c 100644 --- a/telephony/java/com/android/ims/ImsConfig.java +++ b/telephony/java/com/android/ims/ImsConfig.java @@ -783,6 +783,7 @@ public class ImsConfig { public static final int WIFI_ONLY = 0; public static final int CELLULAR_PREFERRED = 1; public static final int WIFI_PREFERRED = 2; + public static final int IMS_PREFERRED = 10; } public ImsConfig(IImsConfig iconfig) { diff --git a/telephony/java/com/android/ims/ImsUtInterface.java b/telephony/java/com/android/ims/ImsUtInterface.java index 5dfbce3dd65f..417f18788e94 100644 --- a/telephony/java/com/android/ims/ImsUtInterface.java +++ b/telephony/java/com/android/ims/ImsUtInterface.java @@ -129,6 +129,12 @@ public interface ImsUtInterface { public void queryCallForward(int condition, String number, Message result); /** + * Retrieves the configuration of the call forward for the specified service class. + * The return value of ((AsyncResult)result.obj) is an array of {@link ImsCallForwardInfo}. + */ + public void queryCallForward(int condition, String number, + int serviceClass, Message result); + /** * Retrieves the configuration of the call waiting. * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}. */ diff --git a/telephony/java/com/android/ims/internal/IImsUt.aidl b/telephony/java/com/android/ims/internal/IImsUt.aidl index 302be65070f7..51729b78b0b8 100644 --- a/telephony/java/com/android/ims/internal/IImsUt.aidl +++ b/telephony/java/com/android/ims/internal/IImsUt.aidl @@ -128,4 +128,12 @@ interface IImsUt { */ int updateCallBarringWithPassword(int cbType, int action, in String[] barrList, int serviceClass, String password); + + /** + * Retrieves the configuration of the call forward for specified service class. + * Returns an integer value to indicate the requestId of the UT request. + * -1 is returned if the "condition" is invalid for the queryCallForward, + * otherwise, integer greater than -1 will be returned. + */ + int queryCFForServiceClass(int condition, String number, int serviceClass); } diff --git a/telephony/java/com/android/internal/telephony/DctConstants.java b/telephony/java/com/android/internal/telephony/DctConstants.java index 541292a1e230..1d97894f1436 100644 --- a/telephony/java/com/android/internal/telephony/DctConstants.java +++ b/telephony/java/com/android/internal/telephony/DctConstants.java @@ -115,6 +115,7 @@ public class DctConstants { public static final int EVENT_SIM_STATE_UPDATED = BASE + 55; public static final int EVENT_APN_UNTHROTTLED = BASE + 56; public static final int EVENT_AIRPLANE_MODE_CHANGED = BASE + 57; + public static final int EVENT_GET_ENHANCED_RADIO_CAPABILITY = BASE + 58; /***** Constants *****/ diff --git a/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl b/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl new file mode 100644 index 000000000000..3b525292cb2d --- /dev/null +++ b/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2016, 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; + +import com.android.internal.telephony.SmsAuthorizationRequest; + +/** + * ISmsSecurityAgent enhances the security of outgoing SMS messages by allowing trusted system + * components to inspect and authorize or reject outgoing SMS messages. + * + * @hide + **/ +interface ISmsSecurityAgent { + /** + * Called when a SMS message is queued for dispatch allowing a registered + * agent to decide on whether to accept/reject the request to send an SMS message. + * <b>Unless the agent rejects the request within the OEM specific timeout, the SMS + * will be sent.</b> + * @param request the object containing information regarding the message and + * through which the agent can accept/reject the request. + */ + void onAuthorize(in SmsAuthorizationRequest request); + +} diff --git a/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl b/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl new file mode 100644 index 000000000000..e479f0c1f678 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016, 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; + +import com.android.internal.telephony.ISmsSecurityAgent; +import com.android.internal.telephony.SmsAuthorizationRequest; + +/** + * ISmsSecurityService exposes a service that monitors the dispatch of outgoing SMS messages + * and notifies a registered ISmsSecurityAgent in order to authorize or reject the dispatch + * of each outgoing SMS message. + * + * @hide + */ +interface ISmsSecurityService { + /** + * Registers an agent in order to receive requests for outgoing SMS messages on which + * it can accept or reject the request for the dispatch of each SMS message. + * <b>Only one agent can be registered at one time.</b> + * @param agent the agent to be registered. + * @return true if the registration succeeds, false otherwise. + */ + boolean register(in ISmsSecurityAgent agent); + + /** + * Unregisters the previously registered agent and causes the security + * service to no longer rely on the agent for a decision regarding + * successive SMS messages being dispatched allowing all successive messages to be dispatched. + * + * @param agent the agent to be unregistered. + * @return true if the unregistration succeeds, false otherwise. + */ + boolean unregister(in ISmsSecurityAgent agent); + + /** + * Allows the registered ISmsSecurityAgent implementation to asynchronously send a response + * on whether it will accept/reject the dispatch of the SMS message. + * <b>If the agent responds after the OEM defined timeout it may not be able to + * interfere on whether the SMS was sent or not.</b> + * @param request the request related to an outgoing SMS message to accept/reject. + * @param accepted true to accept, false to reject. + * return true if the response took effect, false if a response has already been sent for this + * request or an OEM specific timeout already happened. + */ + boolean sendResponse(in SmsAuthorizationRequest request, boolean authorized); +} diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 3eda7482117f..30ea4b83e477 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -525,6 +525,9 @@ public interface RILConstants { int RIL_REQUEST_SET_ALLOWED_NETWORK_TYPES_BITMAP = 222; int RIL_REQUEST_GET_ALLOWED_NETWORK_TYPES_BITMAP = 223; + /* RIL Request to get newly supported radio + capabilities include 5G SA*/ + int RIL_REQUEST_GET_ENHANCED_RADIO_CAPABILITY = 600; /* Responses begin */ int RIL_RESPONSE_ACKNOWLEDGEMENT = 800; diff --git a/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl new file mode 100644 index 000000000000..a2f7020f9b90 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2016, 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; + +/** @hide */ +parcelable SmsAuthorizationRequest; diff --git a/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java new file mode 100644 index 000000000000..bc64fa802903 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2016, 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; + +import android.os.IBinder; +import android.os.Parcel; +import android.os.Parcelable; +import android.os.RemoteException; + +/** + * This class represents a request from the {@link ISmsSecurityService} to trusted parties + * in order to allow third party components to participate in the decision process to accept + * or reject a request to send an SMS message. + * + * @hide + */ +public class SmsAuthorizationRequest implements Parcelable { + + private final ISmsSecurityService service; + + private final IBinder token; + + public final String packageName; + + public final String destinationAddress; + + public final String message; + + public SmsAuthorizationRequest(final Parcel source) { + this.service = ISmsSecurityService.Stub.asInterface(source.readStrongBinder()); + this.token = source.readStrongBinder(); + this.packageName = source.readString(); + this.destinationAddress = source.readString(); + this.message = source.readString(); + } + + public SmsAuthorizationRequest(final ISmsSecurityService service, + final IBinder binderToken, + final String packageName, + final String destinationAddress, + final String message) { + this.service = service; + this.token = binderToken; + this.packageName = packageName; + this.destinationAddress = destinationAddress; + this.message = message; + } + + @Override + public void writeToParcel(final Parcel dest, final int flags) { + dest.writeStrongBinder(service.asBinder()); + dest.writeStrongBinder(token); + dest.writeString(packageName); + dest.writeString(destinationAddress); + dest.writeString(message); + } + + @Override + public int describeContents() { + return 0; + } + + public static Parcelable.Creator<SmsAuthorizationRequest> CREATOR = + new Creator<SmsAuthorizationRequest>() { + @Override + public SmsAuthorizationRequest[] newArray(final int size) { + return new SmsAuthorizationRequest[size]; + } + + @Override + public SmsAuthorizationRequest createFromParcel(final Parcel source) { + return new SmsAuthorizationRequest(source); + } + }; + + public void accept() throws RemoteException{ + service.sendResponse(this, true); + } + + public void reject() throws RemoteException { + service.sendResponse(this, false); + } + + public IBinder getToken() { + return token; + } + + @Override + public String toString() { + return String.format("[%s] (%s) # %s", + this.packageName, + this.destinationAddress, + this.message); + } +} diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index b905212a9100..c90b06338d21 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -323,6 +323,26 @@ public class TelephonyIntents { "android.intent.action.USER_ACTIVITY_NOTIFICATION"; /** + * <p>Broadcast sent to show Emergency notification due to Voice Over Wifi availability + * + * <p class="note"> + * You can <em>not</em> receive this through components declared + * in manifests, only by explicitly registering for it with + * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver, + * android.content.IntentFilter) Context.registerReceiver()}. + * + * <p class="note"> + * Requires no permission. + * + * <p class="note">This is a protected intent that can only be sent + * by the system. + * + * @hide + */ + public static final String ACTION_VOWIFI_ENABLED + = "org.codeaurora.telephony.VOWIFI_ENABLED"; + + /** * Kept for backwards compatibility. * @deprecated @see TelephonyManager#ACTION_CARRIER_SIGNAL_REDIRECTED */ diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java index f636276f11b8..f636276f11b8 100644..100755 --- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java +++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java b/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java index 9e2d29cd12e9..c6db36c45d87 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java @@ -38,6 +38,7 @@ public final class SmsEnvelope { static public final int TELESERVICE_WAP = 0x1004; static public final int TELESERVICE_WEMT = 0x1005; static public final int TELESERVICE_SCPT = 0x1006; + static public final int TELESERVICE_CT_WAP = 0xFDEA; /** Carriers specific Teleservice IDs. */ public static final int TELESERVICE_FDEA_WAP = 0xFDEA; // 65002 diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java index ec1204042260..c27c42667187 100644 --- a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java +++ b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java @@ -25,10 +25,12 @@ import android.graphics.Color; import android.os.Build; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.EncodeException; import com.android.internal.telephony.GsmAlphabet; import com.android.telephony.Rlog; import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.List; @@ -962,5 +964,6 @@ public class IccUtils { serializedFplmns[offset++] = (byte) 0xff; } return serializedFplmns; + } } |