Not cache empty config bundle.

In case of failure, caching empty bundle will not recover until clear phone data.
This change will retry loading on next sim loaded if bundle is empty.

Bug: b/32668103
Change-Id: Ieb210db88a640be8c44c11ab543064cbf4b10ed3
(cherry picked from commit 0259650d985a6279de7a0a8ce4ec823011dd7a4b)
(cherry picked from commit c8d0b18e7a346968b54c85c0a8753365ffbf42a0)
diff --git a/src/com/android/phone/ b/src/com/android/phone/
index 5a40322..159d8bc 100644
--- a/src/com/android/phone/
+++ b/src/com/android/phone/
@@ -472,8 +472,13 @@
             loge("Cannot save config with null packageName or iccid.");
-        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);