Ensure that published items aren't null
This commit is contained in:
parent
4649d4b0b4
commit
923e71d51f
@ -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);
|
||||
}
|
||||
});
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user