Snap for 11220357 from 6646316362082eebde42e4b69ee53e6e98017d9b to 24Q1-release

Change-Id: I0dd841ee6104e591ed87796c4d089a89010de78a
diff --git a/src/com/android/contacts/sdn/SdnRepository.kt b/src/com/android/contacts/sdn/SdnRepository.kt
index 082adeb..0759127 100644
--- a/src/com/android/contacts/sdn/SdnRepository.kt
+++ b/src/com/android/contacts/sdn/SdnRepository.kt
@@ -63,7 +63,7 @@
   @SuppressLint("MissingPermission")
   fun getSimCardInformation(): List<SimCard> {
     val subscriptionManager = context.getSystemService(SubscriptionManager::class.java)
-    return subscriptionManager.activeSubscriptionInfoList?.filterNotNull()?.mapNotNull {
+    return subscriptionManager?.activeSubscriptionInfoList?.filterNotNull()?.mapNotNull {
       if (it.subscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
         null
       } else {
@@ -77,7 +77,7 @@
   private fun fetchSdnFromCarrierConfig(simCard: SimCard): List<Sdn> {
     val carrierConfigManager = context.getSystemService(CarrierConfigManager::class.java)
     val carrierConfig =
-      carrierConfigManager.getConfigForSubId(simCard.subscriptionId) ?: return emptyList()
+      carrierConfigManager?.getConfigForSubId(simCard.subscriptionId) ?: return emptyList()
     val nameList: List<String> =
       carrierConfig
         .getStringArray(CarrierConfigManager.KEY_CARRIER_SERVICE_NAME_STRING_ARRAY)