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

Commit e5a94179 authored by Ajay Nambi's avatar Ajay Nambi
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.

Fix issue with deletion of contacts with "=".

Fix issue for deletion of contacts with "=" in name,
as it would return 3 strings instead of 2 as expected.
Use overloaded split method to return 2 strings instead
to resolve the issue.

Bug:35026607
Change-Id: Ia20a646cb10bd15136de900df7177ca0bac4e465
parent 005d0cc7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -301,7 +301,7 @@ public class IccProvider extends ContentProvider {
            String param = tokens[n];
            if (DBG) log("parsing '" + param + "'");

            String[] pair = param.split("=");
            String[] pair = param.split("=", 2);

            if (pair.length != 2) {
                Rlog.e(TAG, "resolve: bad whereClause parameter: " + param);
+6 −2
Original line number Diff line number Diff line
@@ -359,8 +359,12 @@ public 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;
        }
    }