Merge tag 'LA.QSSI.14.0.r1-11200-qssi.0' of https://git.codelinaro.org/clo/la/platform/vendor/codeaurora/telephony into lineage-21.0

"LA.QSSI.14.0.r1-11200-qssi.0"

* tag 'LA.QSSI.14.0.r1-11200-qssi.0' of https://git.codelinaro.org/clo/la/platform/vendor/codeaurora/telephony:
  Add support for CIWLAN data usage

 Conflicts:
	ims/ims-ext-common/src/org/codeaurora/ims/QtiVideoCallDataUsage.java

Change-Id: I9c066d1273a69c6191eef9fe38b287449ed59cea
diff --git a/ims/ims-ext-common/src/org/codeaurora/ims/QtiVideoCallDataUsage.java b/ims/ims-ext-common/src/org/codeaurora/ims/QtiVideoCallDataUsage.java
index 170e418..70054c1 100644
--- a/ims/ims-ext-common/src/org/codeaurora/ims/QtiVideoCallDataUsage.java
+++ b/ims/ims-ext-common/src/org/codeaurora/ims/QtiVideoCallDataUsage.java
@@ -25,6 +25,10 @@
  * 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.
+ *
+ * Changes from Qualcomm Innovation Center are provided under the following license:
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * SPDX-License_Identifier: BSD-3-Clause-Clear
  */
 
 package org.codeaurora.ims;
@@ -41,10 +45,12 @@
 public class QtiVideoCallDataUsage implements Parcelable {
 
     private long[] mDataUsage;
-    public static final int DATA_USAGE_LTE = 0;
+    public static final int DATA_USAGE_WWAN = 0;
     public static final int DATA_USAGE_WLAN = 1;
+    public static final int DATA_USAGE_C_IWLAN = 2;
     public static final int DATA_USAGE_INVALID_VALUE = -1;
-    private static final String[] TEXT = {"LteDataUsage = "," WlanDataUsage = "};
+    private static final String[] TEXT =
+            {"WwanDataUsage = "," WlanDataUsage = ", " CIWlanDataUsage = "};
 
     // Motorola specific
     public static final int DATA_USAGE_LTE_TX = 0;
@@ -71,20 +77,8 @@
     }
 
     /*
-     * This method returns LTE Data Usage
+     * These methods return LTE_{TX/RX} Data Usage (Motorola specific)
      */
-    public long getLteDataUsage() {
-        if (mUseMotoExt) {
-            return mDataUsage.length > DATA_USAGE_LTE_RX
-                    ? mDataUsage[DATA_USAGE_LTE_TX] + mDataUsage[DATA_USAGE_LTE_RX]
-                    : DATA_USAGE_INVALID_VALUE;
-        } else {
-            return mDataUsage.length > DATA_USAGE_LTE
-                    ? mDataUsage[DATA_USAGE_LTE]
-                    : DATA_USAGE_INVALID_VALUE;
-        }
-    }
-
     public long getLteTxDataUsage() {
         return (mUseMotoExt && mDataUsage.length > DATA_USAGE_LTE_TX)
                 ? mDataUsage[DATA_USAGE_LTE_TX]
@@ -98,6 +92,14 @@
     }
 
     /*
+     * This method returns WWAN Data Usage
+     */
+    public long getWwanDataUsage() {
+        return mDataUsage.length > DATA_USAGE_WWAN ? mDataUsage[DATA_USAGE_WWAN] :
+                DATA_USAGE_INVALID_VALUE;
+    }
+
+    /*
      * This method returns WLAN Data Usage
      */
     public long getWlanDataUsage() {
@@ -124,6 +126,14 @@
                 : DATA_USAGE_INVALID_VALUE;
     }
 
+    /*
+     * This method returns C_IWLAN Data Usage
+     */
+    public long getCiwlanDataUsage() {
+        return mDataUsage.length > DATA_USAGE_C_IWLAN ? mDataUsage[DATA_USAGE_C_IWLAN] :
+                DATA_USAGE_INVALID_VALUE;
+    }
+
     @Override
     public void writeToParcel(Parcel dest, int flag) {
         dest.writeLongArray(mDataUsage);