Fix nullpointer in EncryptKeyCompletionView
This commit is contained in:
@@ -136,7 +136,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView
|
|||||||
where += " AND " + KeyRings.USER_ID + " LIKE ?";
|
where += " AND " + KeyRings.USER_ID + " LIKE ?";
|
||||||
|
|
||||||
return new CursorLoader(getContext(), baseUri, KeyAdapter.PROJECTION, where,
|
return new CursorLoader(getContext(), baseUri, KeyAdapter.PROJECTION, where,
|
||||||
new String[] { "%" + query + "%" }, null);
|
new String[]{"%" + query + "%"}, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
mAdapter.setSearchQuery(null);
|
mAdapter.setSearchQuery(null);
|
||||||
@@ -156,7 +156,7 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showDropDown() {
|
public void showDropDown() {
|
||||||
if (mAdapter.getCursor().isClosed()) {
|
if (mAdapter == null || mAdapter.getCursor().isClosed()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
super.showDropDown();
|
super.showDropDown();
|
||||||
|
|||||||
Reference in New Issue
Block a user