[Telephony Mainline] Add SimInfo.CONTENT_URI instead SubscriptionManager.CONTENT_URI for mainline
Bug: 144972924
Test: make
Change-Id: I86c39f4a353412a66934b735957d5d06c478fe8e
Merged-In: I86c39f4a353412a66934b735957d5d06c478fe8e
diff --git a/api/system-current.txt b/api/system-current.txt
index d87a9b0..ec3b312 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6628,6 +6628,10 @@
field public static final String SUB_ID = "sub_id";
}
+ public static final class Telephony.SimInfo {
+ field @NonNull public static final android.net.Uri CONTENT_URI;
+ }
+
public static final class Telephony.Sms.Intents {
field public static final String ACTION_SMS_EMERGENCY_CB_RECEIVED = "android.provider.action.SMS_EMERGENCY_CB_RECEIVED";
}
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index ebdde0a..936f712 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -4811,4 +4811,23 @@
public static final Uri CONTENT_URI = Uri.parse("content://carrier_id/all");
}
}
+
+ /**
+ * Contains SIM Information
+ * @hide
+ */
+ @SystemApi
+ public static final class SimInfo {
+ /**
+ * Not instantiable.
+ * @hide
+ */
+ private SimInfo() {}
+
+ /**
+ * The {@code content://} style URI for this provider.
+ */
+ @NonNull
+ public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");
+ }
}
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index fbbc951..47d467e 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -55,6 +55,7 @@
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.provider.Telephony.SimInfo;
import android.telephony.euicc.EuiccManager;
import android.telephony.ims.ImsMmTelManager;
import android.util.DisplayMetrics;
@@ -130,7 +131,7 @@
/** @hide */
@UnsupportedAppUsage
- public static final Uri CONTENT_URI = Uri.parse("content://telephony/siminfo");
+ public static final Uri CONTENT_URI = SimInfo.CONTENT_URI;
/**
* Generates a content {@link Uri} used to receive updates on simInfo change