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

Commit 99305584 authored by Yujing Gu's avatar Yujing Gu
Browse files

Add query operation when updated sim contact.

Without enabled sim contact auto sync feature, sim contact can not
be inserted before executing query.
Add query operation when updated sim contact to uncached ADN.

CRs-Fixed: 1071600
Change-Id: I59b1a524540484dcbb54062c8605ea95ae649297
parent 48b6b029
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -195,6 +195,18 @@ public final class SimPhoneBookAdnRecordCache extends Handler {
    public void updateSimPbAdnBySearch(AdnRecord oldAdn, AdnRecord newAdn, Message response) {
        ArrayList<AdnRecord> oldAdnList = mSimPbRecords;

        synchronized (mLock) {
            if (!mSimPbRecords.isEmpty()) {
                log("ADN cache has already filled in");
                if (mRefreshAdnCache) {
                    mRefreshAdnCache = false;
                    refreshAdnCache();
                }
            } else {
                queryAdnRecord();
            }
        }

        if (oldAdnList == null) {
            sendErrorResponse(response, "Sim PhoneBook Adn list not exist");
            return;