package com.kickstarter.libs.utils;

import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.kickstarter.libs.ApiCapabilities;
import com.kickstarter.libs.BaseActivity;

public final class StatusBarUtils {
  private StatusBarUtils() {}

  public static void apply(@NonNull final BaseActivity activity, final @ColorInt int color) {
    if (!ApiCapabilities.canSetStatusBarColor()) {
      return;
    }

    final Window window = activity.getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    window.setStatusBarColor(color);
  }

  public static void apply(@NonNull final BaseActivity activity, final @ColorInt int color,
    final boolean overlayShouldBeLight) {
    apply(activity, color);
    setIconOverlay(activity, overlayShouldBeLight);
  }

  public static void setDarkStatusBarIcons(@NonNull final BaseActivity activity) {
    setIconOverlay(activity, true);
  }

  public static void setLightStatusBarIcons(@NonNull final BaseActivity activity) {
    setIconOverlay(activity, false);
  }

  private static void setIconOverlay(final @NonNull BaseActivity activity, final boolean light) {
    if (!ApiCapabilities.canSetDarkStatusBarIcons()) {
      return;
    }

    final int uiFlag = light ?
      View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR :
      View.SYSTEM_UI_FLAG_VISIBLE;
    final Window window = activity.getWindow();
    window.getDecorView().setSystemUiVisibility(uiFlag);
  }
}

@@ -381,32 +381,38 @@
 atic void apply(
+final 
 @NonNull final B
@@ -396,38 +396,32 @@
 (final @NonNull 
-final 
 BaseActivity act
@@ -728,16 +728,22 @@
 d apply(
+final 
 @NonNull
@@ -735,38 +735,32 @@
 (final @NonNull 
-final 
 BaseActivity act
@@ -955,32 +955,38 @@
 kStatusBarIcons(
+final 
 @NonNull final B
@@ -970,38 +970,32 @@
 (final @NonNull 
-final 
 BaseActivity act
@@ -1088,16 +1088,22 @@
 arIcons(
+final 
 @NonNull
@@ -1103,22 +1103,16 @@
 NonNull 
-final 
 BaseActi

Fix order of final/nonnull