Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0827f9b8 authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Automerger Merge Worker
Browse files

Merge "Handle pending update list after SIM is powered up" am: caecb9fb

parents e935a2f7 caecb9fb
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -442,17 +442,20 @@ public class SimPhonebookRecordCache extends Handler {
            if (!newCapacity.isSimEmpty()){
            if (!newCapacity.isSimEmpty()){
                mIsCacheInvalidated.set(true);
                mIsCacheInvalidated.set(true);
                fillCacheWithoutWaiting();
                fillCacheWithoutWaiting();
            } else {
            } else if (newCapacity.isSimValid()) {
                notifyAdnLoadingWaiters();
                notifyAdnLoadingWaiters();
                tryFireUpdatePendingList();
            } else {
                logd("ADN capacity is invalid");
            }
            }
            mIsInitialized.set(true); // Let's say the whole process is ready
            mIsInitialized.set(true); // Let's say the whole process is ready
        } else {
        } else {
            // There is nothing from PB, so notify waiters directly if any
            // There is nothing from PB, so notify waiters directly if any
            if (newCapacity.isSimEmpty()
            if (newCapacity.isSimValid() && newCapacity.isSimEmpty()) {
                    || !newCapacity.isSimValid()) {
                mIsCacheInvalidated.set(false);
                mIsCacheInvalidated.set(false);
                notifyAdnLoadingWaiters();
                notifyAdnLoadingWaiters();
            } else if (!mIsUpdateDone) {
                tryFireUpdatePendingList();
            } else if (!mIsUpdateDone && !newCapacity.isSimEmpty()) {
                invalidateSimPbCache();
                invalidateSimPbCache();
                fillCacheWithoutWaiting();
                fillCacheWithoutWaiting();
            }
            }