Merge "Notify waiters even if mMaxAdnCapacity of SIM is 0." am: 9e80acc9b9 am: 043f4b9fcb am: 99a574c16a

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/2596633

Change-Id: I70d1294d44bdf2657201285b3e281aecda467507
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/java/com/android/internal/telephony/uicc/SimPhonebookRecordCache.java b/src/java/com/android/internal/telephony/uicc/SimPhonebookRecordCache.java
index 149e605..b1fc473 100644
--- a/src/java/com/android/internal/telephony/uicc/SimPhonebookRecordCache.java
+++ b/src/java/com/android/internal/telephony/uicc/SimPhonebookRecordCache.java
@@ -446,6 +446,7 @@
                 notifyAdnLoadingWaiters();
                 tryFireUpdatePendingList();
             } else {
+                notifyAdnLoadingWaiters();
                 logd("ADN capacity is invalid");
             }
             mIsInitialized.set(true); // Let's say the whole process is ready
@@ -455,6 +456,9 @@
                 mIsCacheInvalidated.set(false);
                 notifyAdnLoadingWaiters();
                 tryFireUpdatePendingList();
+            } else if (!newCapacity.isSimValid()) {
+                mIsCacheInvalidated.set(false);
+                notifyAdnLoadingWaiters();
             } else if (!mIsUpdateDone && !newCapacity.isSimEmpty()) {
                 invalidateSimPbCache();
                 fillCacheWithoutWaiting();