Merge branch 'dev/13/fp3/qcom_telephony_stack' into int/13/fp3

* dev/13/fp3/qcom_telephony_stack:
  FP3: Revert various unsupported features.
  Drop CDMA SMS extensions
  Drop custom 'isEmergencyNumber*' interfaces
  FP3: Drop DSDA logic, not supported
  FP3: Drop primary card feature

Change-Id: I4ea7bc67ec350132c38a6f551730d94f8042e4df
diff --git a/extphone/src/com/qti/extphone/ExtPhoneCallbackBase.java b/extphone/src/com/qti/extphone/ExtPhoneCallbackBase.java
index 5154e0d..5458ba9 100644
--- a/extphone/src/com/qti/extphone/ExtPhoneCallbackBase.java
+++ b/extphone/src/com/qti/extphone/ExtPhoneCallbackBase.java
@@ -82,13 +82,6 @@
     }
 
     @Override
-    public void sendCdmaSmsResponse(int slotId, Token token, Status status, SmsResult sms) throws
-            RemoteException {
-        Log.d(TAG, "UNIMPLEMENTED: sendCdmaSmsResponse: slotId = " + slotId +
-                " token = " + token + " status = " + status + " SmsResult = " + sms);
-    }
-
-    @Override
     public void on5gStatus(int slotId, Token token, Status status, boolean enableStatus) throws
             RemoteException {
         Log.d(TAG, "UNIMPLEMENTED: on5gStatus: slotId = " + slotId + " token = " + token +
diff --git a/extphone/src/com/qti/extphone/ExtTelephonyManager.java b/extphone/src/com/qti/extphone/ExtTelephonyManager.java
index 1d6a030..38d99ba 100644
--- a/extphone/src/com/qti/extphone/ExtTelephonyManager.java
+++ b/extphone/src/com/qti/extphone/ExtTelephonyManager.java
@@ -322,84 +322,6 @@
     }
 
     /**
-    * Check if slotId has PrimaryCarrier SIM card present or not.
-    * @param - slotId
-    * @return true or false
-    */
-    public boolean isPrimaryCarrierSlotId(int slotId) {
-        boolean ret = false;
-        if (!isServiceConnected()) {
-            Log.e(LOG_TAG, "service not connected!");
-            return ret;
-        }
-        try {
-            ret = mExtTelephonyService.isPrimaryCarrierSlotId(slotId);
-        } catch(RemoteException e) {
-            Log.e(LOG_TAG, "isPrimaryCarrierSlotId, remote exception");
-            e.printStackTrace();
-        }
-        return ret;
-    }
-
-    /**
-    * Get current primary card slot Id.
-    * @param - void
-    * @return slot index
-    */
-    public int getCurrentPrimaryCardSlotId() {
-        int ret = INVALID;
-        if (!isServiceConnected()) {
-            Log.e(LOG_TAG, "service not connected!");
-            return ret;
-        }
-        try {
-            ret = mExtTelephonyService.getCurrentPrimaryCardSlotId();
-        } catch(RemoteException e) {
-            Log.e(LOG_TAG, "getCurrentPrimaryCardSlotId, remote exception");
-            e.printStackTrace();
-        }
-        return ret;
-    }
-
-    /**
-    * Returns ID of the slot in which PrimaryCarrier SIM card is present.
-    * If none of the slots contains PrimaryCarrier SIM, this would return '-1'
-    * Supported values: 0, 1, -1
-    */
-    public int getPrimaryCarrierSlotId() {
-        int ret = INVALID;
-        if (!isServiceConnected()) {
-            Log.e(LOG_TAG, "service not connected!");
-            return ret;
-        }
-        try {
-            ret = mExtTelephonyService.getPrimaryCarrierSlotId();
-        } catch(RemoteException e) {
-            Log.e(LOG_TAG, "getPrimaryCarrierSlotId, remote exception");
-            e.printStackTrace();
-        }
-        return ret;
-    }
-
-    /**
-    * Set Primary card on given slot.
-    * @param - slotId to be set as Primary Card.
-    * @return void
-    */
-    public void setPrimaryCardOnSlot(int slotId) {
-        if (!isServiceConnected()) {
-            Log.e(LOG_TAG, "service not connected!");
-            return;
-        }
-        try {
-            mExtTelephonyService.setPrimaryCardOnSlot(slotId);
-        } catch(RemoteException e) {
-            Log.e(LOG_TAG, "setPrimaryCardOnSlot, remote exception");
-            e.printStackTrace();
-        }
-    }
-
-    /**
     * Perform incremental scan using QCRIL hooks.
     * @param - slotId
     *          Range: 0 <= slotId < {@link TelephonyManager#getActiveModemCount()}
diff --git a/extphone/src/com/qti/extphone/IExtPhone.aidl b/extphone/src/com/qti/extphone/IExtPhone.aidl
index c4c2430..b2ad223 100644
--- a/extphone/src/com/qti/extphone/IExtPhone.aidl
+++ b/extphone/src/com/qti/extphone/IExtPhone.aidl
@@ -68,38 +68,6 @@
     String getPropertyValueString(String property, String def);
 
     /**
-    * Get current primary card slot Id.
-    * @param - void
-    * @return slot index
-    * Requires permission: android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
-    */
-    int getCurrentPrimaryCardSlotId();
-
-    /**
-    * Returns ID of the slot in which PrimaryCarrier SIM card is present.
-    * If none of the slots contains PrimaryCarrier SIM, this would return '-1'
-    * Supported values: 0, 1, -1
-    * Requires permission: android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
-    */
-    int getPrimaryCarrierSlotId();
-
-    /**
-    * Check if slotId has PrimaryCarrier SIM card present or not.
-    * @param - slotId
-    * @return true or false
-    * Requires permission: android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
-    */
-    boolean isPrimaryCarrierSlotId(int slotId);
-
-    /**
-    * Set Primary card on given slot.
-    * @param - slotId to be set as Primary Card.
-    * @return void
-    * Requires permission: android.Manifest.permission.MODIFY_PHONE_STATE
-    */
-    void setPrimaryCardOnSlot(int slotId);
-
-    /**
     * Perform incremental scan using QCRIL hooks.
     * @param - slotId
     *          Range: 0 <= slotId < {@link TelephonyManager#getActiveModemCount()}
diff --git a/extphone/src/com/qti/extphone/IExtPhoneCallback.aidl b/extphone/src/com/qti/extphone/IExtPhoneCallback.aidl
index 1b20d3e..69e2320 100644
--- a/extphone/src/com/qti/extphone/IExtPhoneCallback.aidl
+++ b/extphone/src/com/qti/extphone/IExtPhoneCallback.aidl
@@ -83,16 +83,6 @@
     void onNrConfigStatus(int slotId, in Token token, in Status status, in NrConfig nrConfig);
 
     /**
-    * Response to sendCdmaSms
-    * @param - slotId
-    * @param - token is the same token which is recived in sendCdmaSms
-    * @param - status SUCCESS/FAILURE based on the modem Result code
-    * @param sms Sms result struct as defined by SmsResult
-    *
-    */
-    void sendCdmaSmsResponse(int slotId, in Token token, in Status status, in SmsResult sms);
-
-    /**
     * Response to getQtiRadioCapability
     * @param - slotId
     * @param - token is the same token which is recived in getQtiRadioCapability
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
index f235e2f..76a11d3 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallConstants.java
@@ -68,6 +68,9 @@
     /* Call encryption status extra key. The value will be a boolean. */
     public static final String CALL_ENCRYPTION_EXTRA_KEY = "CallEncryption";
 
+    /* Call History Info extra key. The value will be a ArrayList of Strings. */
+    public static final String EXTRAS_CALL_HISTORY_INFO = "CallHistoryInfo";
+
     /* Call fail code extra key name */
     public static final String EXTRAS_KEY_CALL_FAIL_EXTRA_CODE  = "CallFailExtraCode";
 
@@ -329,23 +332,18 @@
     public static final int CALL_COMPOSER_MODE = 1004;
 
     /**
-     * Key values for the pre alerting call elements
+     * Key values for the Call Composer elements
      */
-    // Intent action broadcasted when pre alerting call elements are available for MT
-    public static final String ACTION_PRE_ALERTING_CALL_INFO =
-            "org.codeaurora.intent.action.PRE_ALERTING_CALL_INFO";
-    // Set for MT pre alerting call (unique ID to match each call)
+    // Intent action broadcasted when call composer elements are available for MT
+    public static final String ACTION_CALL_COMPOSER_INFO =
+            "org.codeaurora.intent.action.CALL_COMPOSER_INFO";
+    // set for MT call composer call (unique ID to match each call)
     // Type: int
-    public static String EXTRA_PRE_ALERTING_CALL_TOKEN = "pre_alerting_call_token";
-    public static final int INVALID_TOKEN = -1;
+    public static String EXTRA_CALL_COMPOSER_TOKEN = "call_composer_token";
 
-    // Set for MT pre alerting call (unique ID to match subscription)
-    // Type: int
-    public static final String EXTRA_PRE_ALERTING_CALL_PHONE_ID = " pre_alerting_call_phoneId";
-
-    // Set for MT pre alerting call (only set when the call has ended)
+    // set for MT call composer call (only set when the call has ended)
     // Type: boolean
-    public static String EXTRA_PRE_ALERTING_CALL_ENDED = "pre_alerting_call_ended";
+    public static String EXTRA_CALL_COMPOSER_CALL_ENDED = "call_composer_call_ended";
 
     // set for call composer call
     public static String EXTRA_CALL_COMPOSER_INFO = "call_composer_info";
@@ -379,25 +377,6 @@
     public static String EXTRA_CALL_COMPOSER_LOCATION_LONGITUDE =
             "call_composer_location_longitude";
 
-    // Set for eCnam info
-    public static String EXTRA_CALL_ECNAM = "call_ecnam";
-
-    // Set when ecnam display name is added
-    // Type: String
-    public static final String EXTRA_CALL_ECNAM_DISPLAY_NAME = "call_ecnam_display_name";
-
-    // Set when ecnam icon url is added
-    // Type: parcelable Uri
-    public static final String EXTRA_CALL_ECNAM_ICON = "call_ecnam_icon";
-
-    // Set when ecnam info url is added
-    // Type: parcelable Uri
-    public static final String EXTRA_CALL_ECNAM_INFO = "call_ecnam_info";
-
-    // Set when ecnam card url is added
-    // Type: parcelable Uri
-    public static final String EXTRA_CALL_ECNAM_CARD = "call_ecnam_card";
-
     /**
      * User setting to control whether dialing call composer calls are allowed
      * Type: int (0 for disable, 1 for enabled);
@@ -447,11 +426,6 @@
     public static final String EXTRAS_CALL_PROGRESS_REASON_CODE = "CallProgReasonCode";
     public static final String EXTRAS_CALL_PROGRESS_REASON_TEXT = "CallProgReasonText";
 
-    // Call audio quality constants.
-    public static final int CALL_AUDIO_QUALITY_NO_HD = 0;
-    public static final int CALL_AUDIO_QUALITY_HD = 1;
-    public static final int CALL_AUDIO_QUALITY_HD_PLUS = 2;
-
     /*Sms call back constants*/
     public static final int SCBM_STATUS_EXIT = 0;
     public static final int SCBM_STATUS_ENTER = 1;
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallExtras.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallExtras.java
deleted file mode 100644
index f8661db..0000000
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiCallExtras.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2015, 2019-2021 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 org.codeaurora.ims;
-
-/**
- * The class contains definitions for Qti specific call extras related to value added features.
- */
-/**
- * @hide
- */
-public class QtiCallExtras {
-
-    /* Call History Info extra key. The value will be a ArrayList of Strings. */
-    public static final String EXTRAS_CALL_HISTORY_INFO = "CallHistoryInfo";
-
-    /* Call Diversion Info extra key. The value will be a ArrayList of Strings. */
-    public static final String EXTRAS_CALL_DIVERSION_INFO = "CallDiversionInfo";
-
-    /* MT DTMF Info extra key. The value will be a String. */
-    public static final String EXTRAS_INCOMING_DTMF_INFO = "IncomingDtmfInfo";
-
-    /* Call audio quality extra key. The value will be an Integer.
-     * {@link QtiCallConstants#CALL_AUDIO_QUALITY_*}
-     */
-    public static final String EXTRAS_CALL_AUDIO_QUALITY = "CallAudioQuality";
-}
diff --git a/internal/src/org/codeaurora/internal/IDsda.aidl b/internal/src/org/codeaurora/internal/IDsda.aidl
deleted file mode 100644
index f688d89..0000000
--- a/internal/src/org/codeaurora/internal/IDsda.aidl
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * 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 org.codeaurora.internal;
-
-/**
- * Interface for DSDA API, to be called from telephony-fwk and they will
- * be handled in service/telecom.
- *
- * {@hide}
- */
-interface IDsda{
-    void switchToActiveSub(int subId);
-    int getActiveSubscription();
-}
diff --git a/internal/src/org/codeaurora/internal/IExtTelephony.aidl b/internal/src/org/codeaurora/internal/IExtTelephony.aidl
index 2c05c6e..8ccef51 100644
--- a/internal/src/org/codeaurora/internal/IExtTelephony.aidl
+++ b/internal/src/org/codeaurora/internal/IExtTelephony.aidl
@@ -31,7 +31,6 @@
 package org.codeaurora.internal;
 
 import org.codeaurora.internal.IDepersoResCallback;
-import org.codeaurora.internal.IDsda;
 
 import org.codeaurora.internal.SignalStrength;
 import org.codeaurora.internal.Status;
@@ -129,13 +128,6 @@
     int getPhoneIdForECall();
 
     /**
-    * Set Primary card on given slot.
-    * @param - slotId to be set as Primary Card.
-    * @return void
-    */
-    void setPrimaryCardOnSlot(int slotId);
-
-    /**
     * Check is FDN is enabled or not.
     * @param - void
     * @return true or false
@@ -174,41 +166,6 @@
     boolean writeEfToIcc(int slotId, int family, int efId, in byte[] efData);
 
     /**
-    * Get primary stack phone id.
-    * @param - void
-    * @return phone id
-    */
-    int getPrimaryStackPhoneId();
-
-    /**
-    * Check if number is emergency number or not.
-    * @param - number
-    * @return true or false
-    */
-    boolean isEmergencyNumber(String number);
-
-    /**
-    * Check if number is local emergency number or not.
-    * @param - number
-    * @return true or false
-    */
-    boolean isLocalEmergencyNumber(String number);
-
-    /**
-    * Check if number is potential emergency number or not.
-    * @param - number
-    * @return true or false
-    */
-    boolean isPotentialEmergencyNumber(String number);
-
-    /**
-    * Check if number is potential Local emergency number or not.
-    * @param - number
-    * @return true or false
-    */
-    boolean isPotentialLocalEmergencyNumber(String number);
-
-    /**
     * Check if device in single stanby.
     * @param - void
     * @return true or false
@@ -225,34 +182,6 @@
     boolean setLocalCallHold(int subId, boolean enable);
 
     /**
-    * Send switch to other subscription.
-    * @param subId, send request on this subscription
-    * @return void
-    */
-    void switchToActiveSub(int subId);
-
-    /**
-    * set adapter, so that IExtTelephony would have interface to send requests to service/telecom
-    * @param dsdaAdapter, this adapter used by IExtTelephony as interface for requests in IDsda.
-    * @return void
-    */
-    void setDsdaAdapter(in IDsda dsdaAdapter);
-
-    /**
-    * get active subscription.
-    * @param void
-    * @return subId of active subscription.
-    */
-    int getActiveSubscription();
-
-    /**
-    * returns device is in DSDA configuration or not.
-    * @param void
-    * @return true or false
-    */
-    boolean isDsdaEnabled();
-
-    /**
     * supply pin to unlock sim locked on network.
     * @param - netpin - network pin to unlock the sim.
     * @param - type - PersoSubState for which the sim is locked onto.
@@ -264,21 +193,6 @@
             int phoneId);
 
     /**
-    * Returns ID of the slot in which PrimaryCarrier SIM card is present.
-    * If none of the slots contains PrimaryCarrier SIM, this would return '-1'
-    * Supported values: 0, 1, -1
-    */
-    int getPrimaryCarrierSlotId();
-
-    /**
-    * Check if slotId has PrimaryCarrier SIM card present or not.
-    * @param - slotId
-    * @return true or false
-    * Requires permission: android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE
-    */
-    boolean isPrimaryCarrierSlotId(int slotId);
-
-    /**
     * Change SMSC address based on slotId.
     * @param - slotId
     * @param - SMSC address
@@ -320,13 +234,6 @@
     boolean isVendorApkAvailable(String packageName);
 
     /**
-    * Get current primary card slot Id.
-    * @param - void
-    * @return slot index
-    */
-    int getCurrentPrimaryCardSlotId();
-
-    /**
     * Async api
     * @deprecated
     */