AndyScherzinger 6 лет назад
Родитель
Сommit
4ac524e244
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      src/main/java/com/owncloud/android/utils/ThemeUtils.java

+ 4 - 3
src/main/java/com/owncloud/android/utils/ThemeUtils.java

@@ -236,7 +236,7 @@ public class ThemeUtils {
      * Adjust lightness of given color
      *
      * @param lightnessDelta values -1..+1
-     * @param color
+     * @param color original color
      * @param threshold      0..1 as maximum value, -1 to disable
      * @return color adjusted by lightness
      */
@@ -374,15 +374,16 @@ public class ThemeUtils {
         return tintDrawable(drawable, color);
     }
 
+    @Nullable
     public static Drawable tintDrawable(Drawable drawable, int color) {
         if (drawable != null) {
             Drawable wrap = DrawableCompat.wrap(drawable);
             wrap.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
 
             return wrap;
-        } else {
-            return drawable;
         }
+
+        return null;
     }
 
     public static String colorToHexString(int color) {