Browse Source

Fix nullable problem in ThemeUtils

master
Anthony Restaino 9 years ago
parent
commit
b82d304d7f
  1. 4
      app/src/main/java/acr/browser/lightning/utils/ThemeUtils.java

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

@ -83,11 +83,9 @@ public class ThemeUtils { @@ -83,11 +83,9 @@ public class ThemeUtils {
return drawable;
}
@Nullable
@NonNull
public static Drawable getLightThemedDrawable(@NonNull Context context, @DrawableRes int res) {
final Drawable drawable = ContextCompat.getDrawable(context, res);
if (drawable == null)
return null;
drawable.mutate();
drawable.setColorFilter(getIconLightThemeColor(context), PorterDuff.Mode.SRC_IN);
return drawable;

Loading…
Cancel
Save