patches/frameworks/base/0005-Restore-getSimStateForSlotIndex-in-SubscriptionManag.patch

40 lines
1.3 KiB
Diff

From f89ddfd215de9269559afdd6b23e4eca56da8eef Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Wed, 2 Aug 2023 20:59:53 +0800
Subject: [PATCH 05/12] Restore getSimStateForSlotIndex in SubscriptionManager
MTK IMS still needs it here
Change-Id: I41bac57c68055f369232359a464642daab94403b
---
.../android/telephony/SubscriptionManager.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 6faef7ecf..33e3b6a0d 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -2916,6 +2916,20 @@ public class SubscriptionManager {
return TelephonyManager.getDefault().isNetworkRoaming(subId);
}
+ /**
+ * Returns a constant indicating the state of sim for the slot index.
+ *
+ * @param slotIndex Logical SIM slot index.
+ *
+ * @see TelephonyManager.SimState
+ *
+ * @hide
+ */
+ @TelephonyManager.SimState
+ public static int getSimStateForSlotIndex(int slotIndex) {
+ return TelephonyManager.getSimStateForSlotIndex(slotIndex);
+ }
+
/**
* Set a field in the subscription database. Note not all fields are supported.
*
--
2.44.0