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

Commit 0c659fea authored by Daniel Lehmann's avatar Daniel Lehmann Committed by Android (Google) Code Review
Browse files

Merge "Make the VCardEntry more robust against badly behaving resolvers....

Merge "Make the VCardEntry more robust against badly behaving resolvers. Additionally make the ImportTestResolver return the right result Bug:2521447"
parents 76ec68f4 7e25f5cb
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1290,8 +1290,11 @@ public class VCardEntry {
            ContentProviderResult[] results = resolver.applyBatch(
                        ContactsContract.AUTHORITY, operationList);
            // the first result is always the raw_contact. return it's uri so
            // that it can be found later
            return results[0].uri;
            // that it can be found later. do null checking for badly behaving
            // ContentResolvers
            return (results == null || results.length == 0 || results[0] == null)
                ? null
                : results[0].uri;
        } catch (RemoteException e) {
            Log.e(LOG_TAG, String.format("%s: %s", e.toString(), e.getMessage()));
            return null;
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ import java.util.Map.Entry;
                mTestCase.fail("Unexpected Uri has come: " + uri);
            }
        }  // for (int i = 0; i < size; i++) {
        return null;
        return fakeResultArray;
    }

    public void verify() {