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

Commit 6de38fdd authored by Qiang Chen's avatar Qiang Chen
Browse files

Uicc: Fix NullPointerException issue after turn on airplane mode

Response may be cleared when SimRecord is reset,so check if it is
null before using response.

CRs-Fixed: 521604

Change-Id: Ia2f36ab7421644de27f31e342c242f007a0d4912
parent 726b437c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -353,8 +353,12 @@ public final class AdnRecordCache extends Handler implements IccConstants {
                Message response = mUserWriteResponse.get(efid);
                mUserWriteResponse.delete(efid);

                // response may be cleared when simrecord is reset,
                // so we should check if it is null.
                if (response != null) {
                    AsyncResult.forMessage(response, null, ar.exception);
                    response.sendToTarget();
                }
                break;
        }