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

Commit 11d03d7a authored by Mengjun Leng's avatar Mengjun Leng Committed by Mengjun Leng
Browse files

Handle pending update list after SIM is powered up

As SIM is powered down/up, the ADN capacity is invalid temporarily,
hence, at this moment, Telephony should avoid sending update request.

Bug: 221774363

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