Fix more crashes during partial telephony stack boot
Bug: 331855229
Bug: 344261877
Flag: EXEMPT bugfix
Test: boot cf_x86_64_auto-trunk_staging-userdebug
Test: atest SatelliteEntitlementControllerTest
Change-Id: Ice5839c0834ea4c893140163f4056da314d13ea6
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index d4822ad..7f720c2 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -1344,7 +1344,10 @@
return new PersistableBundle();
}
- enforceTelephonyFeatureWithException(callingPackage, "getConfigForSubIdWithFeature");
+ if (!mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_force_phone_globals_creation)) {
+ enforceTelephonyFeatureWithException(callingPackage, "getConfigForSubIdWithFeature");
+ }
int phoneId = SubscriptionManager.getPhoneId(subscriptionId);
PersistableBundle retConfig = CarrierConfigManager.getDefaultConfig();