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

Commit caecb9fb authored by Aishwarya Mallampati's avatar Aishwarya Mallampati Committed by Gerrit Code Review
Browse files

Merge "Handle pending update list after SIM is powered up"

parents c90b06da 11d03d7a
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();
            }
            }