Merge "Not cache empty config bundle." into nyc-mr2-dev
diff --git a/src/com/android/phone/CarrierConfigLoader.java b/src/com/android/phone/CarrierConfigLoader.java
index 5a40322..159d8bc 100644
--- a/src/com/android/phone/CarrierConfigLoader.java
+++ b/src/com/android/phone/CarrierConfigLoader.java
@@ -472,8 +472,13 @@
loge("Cannot save config with null packageName or iccid.");
return;
}
- if (config == null) {
- config = new PersistableBundle();
+ // b/32668103 Only save to file if config isn't empty.
+ // In case of failure, not caching an empty bundle will
+ // try loading config again on next power on or sim loaded.
+ // Downside is for genuinely empty bundle, will bind and load
+ // on every power on.
+ if (config == null || config.isEmpty()) {
+ return;
}
final String version = getPackageVersion(packageName);