Hide specific SIMs from calling
Do not create phone account for the specific type of SIMs, like
satellite, bootstrap.
Bug: 335009707
Test: manual
Change-Id: Idc7839cf5647798ea1b179ca7c2f7a17537c46d4
(cherry picked from commit 51c902bbc61f8074dd7f3398590be2bee5492d27)
Merged-In: Idc7839cf5647798ea1b179ca7c2f7a17537c46d4
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index a246a1c..fe65ce2 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -1686,6 +1686,21 @@
continue;
}
+ // Skip the sim for bootstrap
+ if (info.getProfileClass() == SubscriptionManager
+ .PROFILE_CLASS_PROVISIONING) {
+ Log.d(this, "setupAccounts: skipping bootstrap sub id "
+ + subscriptionId);
+ continue;
+ }
+
+ // Skip the sim for satellite as it does not support call for now
+ if (Flags.oemEnabledSatelliteFlag() && info.isOnlyNonTerrestrialNetwork()) {
+ Log.d(this, "setupAccounts: skipping satellite sub id "
+ + subscriptionId);
+ continue;
+ }
+
mAccounts.add(new AccountEntry(phone, false /* emergency */,
false /* isTest */));
}