Fix potential NPE during initialization

1) Guard TelephonyRcsService from null PersistableBundles
from CarrierConfigManager in the scenarios where we are receving
non-INVALID subIds during initialization.
2) Ensure that CarrierConfigLoader is initialized before
TelephonyRcsService needs to use it.

Bug: 266581853
Test: flash on device, ensure calls/sms/UCE works properly
Change-Id: Ia34ead1bcddedf75613a05b81c2b77861201e7b2
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 78a734a..200dc75 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -527,6 +527,8 @@
 
             imsRcsController = ImsRcsController.init(this);
 
+            configLoader = CarrierConfigLoader.init(this);
+
             if (getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY_IMS)) {
                 mImsStateCallbackController =
                         ImsStateCallbackController.make(this, PhoneFactory.getPhones().length);
@@ -538,8 +540,6 @@
                         ImsProvisioningController.make(this, PhoneFactory.getPhones().length);
             }
 
-            configLoader = CarrierConfigLoader.init(this);
-
             // Create the CallNotifier singleton, which handles
             // asynchronous events from the telephony layer (like
             // launching the incoming-call UI when an incoming call comes