Ensure that published items aren't null

This commit is contained in:
anthony restaino 2017-04-29 17:22:49 -04:00
parent 4649d4b0b4
commit 923e71d51f
2 changed files with 2 additions and 4 deletions

View File

@ -42,6 +42,7 @@ import acr.browser.lightning.database.BookmarkManager;
import acr.browser.lightning.database.HistoryItem;
import acr.browser.lightning.database.HistoryModel;
import acr.browser.lightning.preference.PreferenceManager;
import acr.browser.lightning.utils.Preconditions;
import acr.browser.lightning.utils.ThemeUtils;
public class SuggestionsAdapter extends BaseAdapter implements Filterable {
@ -264,6 +265,7 @@ public class SuggestionsAdapter extends BaseAdapter implements Filterable {
.subscribe(new SingleOnSubscribe<List<HistoryItem>>() {
@Override
public void onItem(@Nullable List<HistoryItem> item) {
Preconditions.checkNonNull(item);
publishResults(item);
}
});

View File

@ -1,7 +1,5 @@
package acr.browser.lightning.utils;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
@ -11,10 +9,8 @@ import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.AttrRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.TypedValue;
import android.view.View;
public class DrawableUtils {