Set KEY_CARRIER_CONFIG_APPLIED_BOOL to true after loading is done

The key KEY_CARRIER_CONFIG_APPLIED_BOOL should be set to true only if
1. There is no carrier app and the default app is done loading
2. There is a carrier app and the carrier app is done loading

(cherry picked from commit 0e3c3dcf079da69bb49bf8ae5b82232cd2804eff)

Bug: 137795539
Test: Telephony Sanity Test
Merged-in: I9077e691f4d498ac7afaa7128d79c3095641d116
Change-Id: I9077e691f4d498ac7afaa7128d79c3095641d116
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 288b9b0..0d5860a 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -975,7 +975,10 @@
             PersistableBundle config = mConfigFromDefaultApp[phoneId];
             if (config != null) {
                 retConfig.putAll(config);
-                retConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_CONFIG_APPLIED_BOOL, true);
+                if (getCarrierPackageForPhoneId(phoneId) == null) {
+                    retConfig.putBoolean(
+                            CarrierConfigManager.KEY_CARRIER_CONFIG_APPLIED_BOOL, true);
+                }
             }
             config = mConfigFromCarrierApp[phoneId];
             if (config != null) {
@@ -990,7 +993,6 @@
             config = mOverrideConfigs[phoneId];
             if (config != null) {
                 retConfig.putAll(config);
-                retConfig.putBoolean(CarrierConfigManager.KEY_CARRIER_CONFIG_APPLIED_BOOL, true);
             }
         }
         return retConfig;