diff options
Diffstat (limited to 'telephony/java/com')
15 files changed, 492 insertions, 13 deletions
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"; + } |