Browse Source

Ensure that published items aren't null

master
anthony restaino 8 years ago
parent
commit
923e71d51f
  1. 2
      app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java
  2. 4
      app/src/main/java/acr/browser/lightning/utils/DrawableUtils.java

2
app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java

@ -42,6 +42,7 @@ import acr.browser.lightning.database.BookmarkManager; @@ -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 { @@ -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);
}
});

4
app/src/main/java/acr/browser/lightning/utils/DrawableUtils.java

@ -1,7 +1,5 @@ @@ -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; @@ -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…
Cancel
Save