diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2015-01-09 18:22:53 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-01-09 18:22:53 -0800 |
| commit | 10b38fe522a8e0398adbfe5202901e17c1731101 (patch) | |
| tree | 349c826916a93a99abeeed41555e29263a30ce31 | |
| parent | 966b35006b2865b50bb7cc880cc5eb9f26c27a36 (diff) | |
| parent | 16191fad86cc7e2e5a124b76b7dab2ec245029d2 (diff) | |
| download | android_frameworks_opt_chips-10b38fe522a8e0398adbfe5202901e17c1731101.tar.gz android_frameworks_opt_chips-10b38fe522a8e0398adbfe5202901e17c1731101.tar.bz2 android_frameworks_opt_chips-10b38fe522a8e0398adbfe5202901e17c1731101.zip | |
Merge "Mms: Fix FC when tapping recipient chip in mms."
| -rw-r--r-- | src/com/android/ex/chips/RecipientAlternatesAdapter.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/com/android/ex/chips/RecipientAlternatesAdapter.java b/src/com/android/ex/chips/RecipientAlternatesAdapter.java index 6569d36..9fce9a6 100644 --- a/src/com/android/ex/chips/RecipientAlternatesAdapter.java +++ b/src/com/android/ex/chips/RecipientAlternatesAdapter.java @@ -411,7 +411,7 @@ public class RecipientAlternatesAdapter extends CursorAdapter { selection.append(Queries.PHONE.getProjection()[Queries.Query.CONTACT_ID]); selection.append(" = ?"); - if (lookupKey == null) { + if (directoryId == null || lookupKey == null) { uri = Queries.PHONE.getContentUri(); desiredMimeType = null; } else { @@ -430,10 +430,14 @@ public class RecipientAlternatesAdapter extends CursorAdapter { }, null); } - final Cursor resultCursor = removeUndesiredDestinations(cursor, desiredMimeType, lookupKey); - cursor.close(); + if (cursor != null) { + final Cursor resultCursor = removeUndesiredDestinations(cursor, + desiredMimeType, lookupKey); + cursor.close(); + return resultCursor; + } - return resultCursor; + return cursor; } /** |
