diff options
| -rw-r--r-- | api/current.txt | 5 | ||||
| -rw-r--r-- | core/res/AndroidManifest.xml | 8 | ||||
| -rw-r--r-- | core/res/res/values/strings.xml | 5 | ||||
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 210 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 109 |
5 files changed, 1 insertions, 336 deletions
diff --git a/api/current.txt b/api/current.txt index 771610e..4231a9f 100644 --- a/api/current.txt +++ b/api/current.txt @@ -132,7 +132,6 @@ package android { field public static final java.lang.String SET_WALLPAPER = "android.permission.SET_WALLPAPER"; field public static final java.lang.String SET_WALLPAPER_HINTS = "android.permission.SET_WALLPAPER_HINTS"; field public static final java.lang.String SIGNAL_PERSISTENT_PROCESSES = "android.permission.SIGNAL_PERSISTENT_PROCESSES"; - field public static final java.lang.String SIM_COMMUNICATION = "android.permission.SIM_COMMUNICATION"; field public static final java.lang.String STATUS_BAR = "android.permission.STATUS_BAR"; field public static final java.lang.String SUBSCRIBED_FEEDS_READ = "android.permission.SUBSCRIBED_FEEDS_READ"; field public static final java.lang.String SUBSCRIBED_FEEDS_WRITE = "android.permission.SUBSCRIBED_FEEDS_WRITE"; @@ -27860,12 +27859,8 @@ package android.telephony { method public java.lang.String getVoiceMailAlphaTag(); method public java.lang.String getVoiceMailNumber(); method public boolean hasIccCard(); - method public boolean iccCloseLogicalChannel(int); - method public int iccOpenLogicalChannel(java.lang.String); - method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); method public boolean isNetworkRoaming(); method public void listen(android.telephony.PhoneStateListener, int); - method public java.lang.String sendEnvelopeWithStatus(java.lang.String); field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE"; field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE"; field public static final int CALL_STATE_IDLE = 0; // 0x0 diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 14141d7..91f4609 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1006,14 +1006,6 @@ android:permissionGroup="android.permission-group.SYSTEM_TOOLS" android:protectionLevel="signature" /> - <!-- Allows an application to communicate with a SIM card using logical - channels. --> - <permission android:name="android.permission.SIM_COMMUNICATION" - android:permissionGroup="android.permission-group.SYSTEM_TOOLS" - android:label="@string/permlab_sim_communication" - android:description="@string/permdesc_sim_communication" - android:protectionLevel="dangerous" /> - <!-- Allows TvInputService to access underlying TV input hardware such as built-in tuners and HDMI-in's. @hide This should only be used by OEM's TvInputService's. diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 8286ef9..183c267 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -1581,11 +1581,6 @@ without your confirmation.</string> <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> - <string name="permlab_sim_communication">sim communication</string> - <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> - <string name="permdesc_sim_communication">Allows the app to send commands to the SIM. This is very dangerous.</string> - - <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_camera">take pictures and videos</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permdesc_camera">Allows the app to take pictures and videos diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 4aed1fe..e069a99 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1743,216 +1743,6 @@ public class TelephonyManager { } /** - * Opens a logical channel to the ICC card. - * - * Input parameters equivalent to TS 27.007 AT+CCHO command. - * - * <p>Requires Permission: - * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION} - * - * @param AID Application id. See ETSI 102.221 and 101.220. - * @return The logical channel id which is negative on error. - */ - public int iccOpenLogicalChannel(String AID) { - try { - return getITelephony().iccOpenLogicalChannel(AID); - } catch (RemoteException ex) { - } catch (NullPointerException ex) { - } - return -1; - } - - /** - * Closes a previously opened logical channel to the ICC card. - * - * Input parameters equivalent to TS 27.007 AT+CCHC command. - * - * <p>Requires Permission: - * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION} - * - * @param channel is the channel id to be closed as retruned by a successful - * iccOpenLogicalChannel. - * @return true if the channel was closed successfully. - */ - public boolean iccCloseLogicalChannel(int channel) { - try { - return getITelephony().iccCloseLogicalChannel(channel); - } catch (RemoteException ex) { - } catch (NullPointerException ex) { - } - return false; - } - - /** - * Transmit an APDU to the ICC card over a logical channel. - * - * Input parameters equivalent to TS 27.007 AT+CGLA command. - * - * <p>Requires Permission: - * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION} - * - * @param channel is the channel id to be closed as returned 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. If an error occurs, an empty string is returned. - */ - public String iccTransmitApduLogicalChannel(int channel, int cla, - int instruction, int p1, int p2, int p3, String data) { - try { - return getITelephony().iccTransmitApduLogicalChannel(channel, cla, - instruction, p1, p2, p3, data); - } catch (RemoteException ex) { - } catch (NullPointerException ex) { - } - return ""; - } - - /** - * Send ENVELOPE to the SIM and return the response. - * - * <p>Requires Permission: - * {@link android.Manifest.permission#SIM_COMMUNICATION SIM_COMMUNICATION} - * - * @param content String containing SAT/USAT response in hexadecimal - * format starting with command tag. See TS 102 223 for - * details. - * @return The APDU response from the ICC card, with the last 4 bytes - * being the status word. If the command fails, returns an empty - * string. - */ - public String sendEnvelopeWithStatus(String content) { - try { - return getITelephony().sendEnvelopeWithStatus(content); - } catch (RemoteException ex) { - } catch (NullPointerException ex) { - } - return ""; - } - - /** - * Read one of the NV items defined in {@link com.android.internal.telephony.RadioNVItems}. - * Used for device configuration by some CDMA operators. - * - * @param itemID the ID of the item to read. - * @return the NV item as a String, or null on any failure. - * @hide - */ - public String nvReadItem(int itemID) { - try { - return getITelephony().nvReadItem(itemID); - } catch (RemoteException ex) { - Rlog.e(TAG, "nvReadItem RemoteException", ex); - } catch (NullPointerException ex) { - Rlog.e(TAG, "nvReadItem NPE", ex); - } - return ""; - } - - - /** - * Write one of the NV items defined in {@link com.android.internal.telephony.RadioNVItems}. - * Used for device configuration by some CDMA operators. - * - * @param itemID the ID of the item to read. - * @param itemValue the value to write, as a String. - * @return true on success; false on any failure. - * @hide - */ - public boolean nvWriteItem(int itemID, String itemValue) { - try { - return getITelephony().nvWriteItem(itemID, itemValue); - } catch (RemoteException ex) { - Rlog.e(TAG, "nvWriteItem RemoteException", ex); - } catch (NullPointerException ex) { - Rlog.e(TAG, "nvWriteItem NPE", ex); - } - return false; - } - - /** - * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. - * Used for device configuration by some CDMA operators. - * - * @param preferredRoamingList byte array containing the new PRL. - * @return true on success; false on any failure. - * @hide - */ - public boolean nvWriteCdmaPrl(byte[] preferredRoamingList) { - try { - return getITelephony().nvWriteCdmaPrl(preferredRoamingList); - } catch (RemoteException ex) { - Rlog.e(TAG, "nvWriteCdmaPrl RemoteException", ex); - } catch (NullPointerException ex) { - Rlog.e(TAG, "nvWriteCdmaPrl NPE", ex); - } - return false; - } - - /** - * Perform the specified type of NV config reset. The radio will be taken offline - * and the device must be rebooted after the operation. Used for device - * configuration by some CDMA operators. - * - * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset - * @return true on success; false on any failure. - * @hide - */ - public boolean nvResetConfig(int resetType) { - try { - return getITelephony().nvResetConfig(resetType); - } catch (RemoteException ex) { - Rlog.e(TAG, "nvResetConfig RemoteException", ex); - } catch (NullPointerException ex) { - Rlog.e(TAG, "nvResetConfig NPE", ex); - } - return false; - } - - /** - * Get the preferred network type. - * Used for device configuration by some CDMA operators. - * - * @return the preferred network type, defined in RILConstants.java. - * @hide - */ - public int getPreferredNetworkType() { - try { - return getITelephony().getPreferredNetworkType(); - } catch (RemoteException ex) { - Rlog.e(TAG, "getPreferredNetworkType RemoteException", ex); - } catch (NullPointerException ex) { - Rlog.e(TAG, "getPreferredNetworkType NPE", ex); - } - return -1; - } - - /** - * Set the preferred network type. - * Used for device configuration by some CDMA operators. - * - * @param networkType the preferred network type, defined in RILConstants.java. - * @return true on success; false on any failure. - * @hide - */ - public boolean setPreferredNetworkType(int networkType) { - try { - return getITelephony().setPreferredNetworkType(networkType); - } catch (RemoteException ex) { - Rlog.e(TAG, "setPreferredNetworkType RemoteException", ex); - } catch (NullPointerException ex) { - Rlog.e(TAG, "setPreferredNetworkType NPE", ex); - } - return false; - } - - /** * Expose the rest of ITelephony to @PrivateApi */ diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 6d7f158..b0cf715 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -330,114 +330,6 @@ interface ITelephony { void setCellInfoListRate(int rateInMillis); /** - * Opens a logical channel to the ICC card. - * - * Input parameters equivalent to TS 27.007 AT+CCHO command. - * - * @param AID Application id. See ETSI 102.221 and 101.220. - * @return The logical channel id which is set to -1 on error. - */ - int iccOpenLogicalChannel(String AID); - - /** - * Closes a previously opened logical channel to the ICC card. - * - * Input parameters equivalent to TS 27.007 AT+CCHC command. - * - * @param channel is the channel id to be closed as retruned by a - * successful iccOpenLogicalChannel. - * @return true if the channel was closed successfully. - */ - boolean iccCloseLogicalChannel(int channel); - - /** - * Transmit an APDU to the ICC card over a logical channel. - * - * Input parameters equivalent to TS 27.007 AT+CGLA command. - * - * @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. If an error occurs, an empty string is returned. - */ - String iccTransmitApduLogicalChannel(int channel, int cla, int instruction, - int p1, int p2, int p3, String data); - - /** - * Send ENVELOPE to the SIM and returns the response. - * - * @param contents String containing SAT/USAT response in hexadecimal - * format starting with command tag. See TS 102 223 for - * details. - * @return The APDU response from the ICC card, with the last 4 bytes - * being the status word. If the command fails, returns an empty - * string. - */ - String sendEnvelopeWithStatus(String content); - - /** - * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. - * Used for device configuration by some CDMA operators. - * - * @param itemID the ID of the item to read. - * @return the NV item as a String, or null on any failure. - */ - String nvReadItem(int itemID); - - /** - * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. - * Used for device configuration by some CDMA operators. - * - * @param itemID the ID of the item to read. - * @param itemValue the value to write, as a String. - * @return true on success; false on any failure. - */ - boolean nvWriteItem(int itemID, String itemValue); - - /** - * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. - * Used for device configuration by some CDMA operators. - * - * @param preferredRoamingList byte array containing the new PRL. - * @return true on success; false on any failure. - */ - boolean nvWriteCdmaPrl(in byte[] preferredRoamingList); - - /** - * Perform the specified type of NV config reset. The radio will be taken offline - * and the device must be rebooted after the operation. Used for device - * configuration by some CDMA operators. - * - * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset). - * @return true on success; false on any failure. - */ - boolean nvResetConfig(int resetType); - - /* - * Get the preferred network type. - * Used for device configuration by some CDMA operators. - * - * @return the preferred network type, defined in RILConstants.java. - */ - int getPreferredNetworkType(); - - /** - * Set the preferred network type. - * Used for device configuration by some CDMA operators. - * - * @param networkType the preferred network type, defined in RILConstants.java. - * @return true on success; false on any failure. - */ - boolean setPreferredNetworkType(int networkType); - - /** * User enable/disable Mobile Data. * * @param enable true to turn on, else false @@ -451,3 +343,4 @@ interface ITelephony { */ boolean getDataEnabled(); } + |
