Selaa lähdekoodia

Update ThemeUtils.java

Fix Codacy
xXSTrikeXx 7 vuotta sitten
vanhempi
commit
e9f524f218
1 muutettua tiedostoa jossa 3 lisäystä ja 5 poistoa
  1. 3 5
      src/main/java/com/owncloud/android/utils/ThemeUtils.java

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

@@ -314,10 +314,8 @@ public class ThemeUtils {
      * @param color            the color
      */
     public static void colorStatusBar(FragmentActivity fragmentActivity, @ColorInt int color) {
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
-            if (fragmentActivity.getWindow() != null) {
-                fragmentActivity.getWindow().setStatusBarColor(color);
-            }
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && fragmentActivity.getWindow() != null) {
+                fragmentActivity.getWindow().setStatusBarColor(color);    
         }
     }
 
@@ -416,4 +414,4 @@ public class ThemeUtils {
             return new OCCapability();
         }
     }
-}
+}