// Path: app/src/main/java/com/bedrock/padder/model/preferences/Preferences.java
// public static final String APPLICATION_ID = "com.bedrock.padder";


import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.bedrock.padder.R;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static android.content.Context.MODE_PRIVATE;
import static com.bedrock.padder.model.preferences.Preferences.APPLICATION_ID;
package com.bedrock.padder.helper;





public class WindowHelper {

    public void setNavigationBar(int colorId, Activity activity) {
        if (Build.VERSION.SDK_INT >= 16) {
            if (colorId == R.color.transparent) {
                activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                    Window w = activity.getWindow();
                    w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
                }
                Log.i("WindowHelper", "Transparent navigation bar color applied.");
            } else {
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    activity.getWindow().setNavigationBarColor(activity.getResources().getColor(colorId));
                    Log.i("WindowHelper", "Navigation bar color applied.");
                }
            }
        } else {
            Log.i("WindowHelper", "API doesn't match requirement. (API >= 16)");
        }
    }

    public int getNavigationBar(final int id, final Activity activity) {
        /* Must be a parent view */

// Path: app/src/main/java/com/bedrock/padder/model/preferences/Preferences.java
// public static final String APPLICATION_ID = "com.bedrock.padder";


// Path: app/src/main/java/com/bedrock/padder/helper/WindowHelper.java
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.content.ContextCompat;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.bedrock.padder.R;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static android.content.Context.MODE_PRIVATE;
import static com.bedrock.padder.model.preferences.Preferences.APPLICATION_ID;

package com.bedrock.padder.helper;





public class WindowHelper {

    public void setNavigationBar(int colorId, Activity activity) {
        if (Build.VERSION.SDK_INT >= 16) {
            if (colorId == R.color.transparent) {
                activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                    Window w = activity.getWindow();
                    w.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
                }
                Log.i("WindowHelper", "Transparent navigation bar color applied.");
            } else {
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                    activity.getWindow().setNavigationBarColor(activity.getResources().getColor(colorId));
                    Log.i("WindowHelper", "Navigation bar color applied.");
                }
            }
        } else {
            Log.i("WindowHelper", "API doesn't match requirement. (API >= 16)");
        }
    }

    public int getNavigationBar(final int id, final Activity activity) {
        /* Must be a parent view */

        final SharedPreferences prefs = activity.getSharedPreferences(APPLICATION_ID, MODE_PRIVATE);