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

Commit f16c95f5 authored by Alex Yakavenka's avatar Alex Yakavenka Committed by Wink Saville
Browse files

Merge commit '903be2fc' into fix-merge-conflict

* commit '903be2fc':
  Telephony: Null check for adncache before search/update.

Change-Id: I1e498b4783e6c3381c14309019420142f3b8b15d
parents f8768537 903be2fc
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -183,8 +183,12 @@ public abstract class IccPhoneBookInterfaceManager extends IIccPhoneBook.Stub {
            Message response = mBaseHandler.obtainMessage(EVENT_UPDATE_DONE, status);
            AdnRecord oldAdn = new AdnRecord(oldTag, oldPhoneNumber);
            AdnRecord newAdn = new AdnRecord(newTag, newPhoneNumber);
            if (mAdnCache != null) {
                mAdnCache.updateAdnBySearch(efid, oldAdn, newAdn, pin2, response);
                waitForResult(status);
            } else {
                loge("Failure while trying to update by search due to uninitialised adncache");
            }
        }
        return mSuccess;
    }
@@ -227,8 +231,12 @@ public abstract class IccPhoneBookInterfaceManager extends IIccPhoneBook.Stub {
            AtomicBoolean status = new AtomicBoolean(false);
            Message response = mBaseHandler.obtainMessage(EVENT_UPDATE_DONE, status);
            AdnRecord newAdn = new AdnRecord(newTag, newPhoneNumber);
            if (mAdnCache != null) {
                mAdnCache.updateAdnByIndex(efid, newAdn, index, pin2, response);
                waitForResult(status);
            } else {
                loge("Failure while trying to update by index due to uninitialised adncache");
            }
        }
        return mSuccess;
    }
@@ -271,8 +279,12 @@ public abstract class IccPhoneBookInterfaceManager extends IIccPhoneBook.Stub {
            checkThread();
            AtomicBoolean status = new AtomicBoolean(false);
            Message response = mBaseHandler.obtainMessage(EVENT_LOAD_DONE, status);
            if (mAdnCache != null) {
                mAdnCache.requestLoadAllAdnLike(efid, mAdnCache.extensionEfForEf(efid), response);
                waitForResult(status);
            } else {
                loge("Failure while trying to load from SIM due to uninitialised adncache");
            }
        }
        return mRecords;
    }