// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_DEFAULT = "navigation_mode";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_EMUI = "navigationbar_is_min";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_MIUI = "force_fsg_nav_bar";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_MIUI_HIDE = "hide_gesture_line";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_OPPO = "hide_navigationbar_enable";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG = "navigation_bar_gesture_while_hidden";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE = "navigation_bar_gesture_hint";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE_TYPE = "navigation_bar_gesture_detail_type";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_OLD = "navigationbar_hide_bar_enabled";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_VIVO = "navigation_gesture_on";


import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_DEFAULT;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_EMUI;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_MIUI;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_MIUI_HIDE;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_OPPO;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE_TYPE;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_OLD;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_VIVO;
import android.content.ContentResolver;
import android.content.Context;
import android.os.Build;
import android.provider.Settings;
package com.gyf.immersionbar;



/**
 * 手势utils
 *
 * @author: ifan
 * @date: 8/13/21
 */
class GestureUtils {

    /**
     * 获取全面屏相关信息
     *
     * @param context Context
     * @return FullScreenBean
     */
    public static GestureBean getGestureBean(Context context) {
        GestureBean gestureBean = new GestureBean();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && context != null && context.getContentResolver() != null) {
            ContentResolver contentResolver = context.getContentResolver();
            NavigationBarType navigationBarType = NavigationBarType.UNKNOWN;
            int type = -1;
            boolean isGesture = false;
            boolean checkNavigation = false;
            if (OSUtils.isHuaWei() || OSUtils.isEMUI()) {
                if (OSUtils.isEMUI3_x() || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
                    type = Settings.System.getInt(contentResolver, IMMERSION_NAVIGATION_BAR_MODE_EMUI, -1);
                } else {
                    type = Settings.Global.getInt(contentResolver, IMMERSION_NAVIGATION_BAR_MODE_EMUI, -1);
                }
                if (type == 0) {
                    navigationBarType = NavigationBarType.CLASSIC;
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_DEFAULT = "navigation_mode";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_EMUI = "navigationbar_is_min";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_MIUI = "force_fsg_nav_bar";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_MIUI_HIDE = "hide_gesture_line";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_OPPO = "hide_navigationbar_enable";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG = "navigation_bar_gesture_while_hidden";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE = "navigation_bar_gesture_hint";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE_TYPE = "navigation_bar_gesture_detail_type";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_OLD = "navigationbar_hide_bar_enabled";
// 
// Path: immersionbar/src/main/java/com/gyf/immersionbar/Constants.java
// static final String IMMERSION_NAVIGATION_BAR_MODE_VIVO = "navigation_gesture_on";


// Path: immersionbar/src/main/java/com/gyf/immersionbar/GestureUtils.java
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_DEFAULT;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_EMUI;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_MIUI;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_MIUI_HIDE;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_OPPO;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_GESTURE_TYPE;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_SAMSUNG_OLD;
import static com.gyf.immersionbar.Constants.IMMERSION_NAVIGATION_BAR_MODE_VIVO;
import android.content.ContentResolver;
import android.content.Context;
import android.os.Build;
import android.provider.Settings;

package com.gyf.immersionbar;



/**
 * 手势utils
 *
 * @author: ifan
 * @date: 8/13/21
 */
class GestureUtils {

    /**
     * 获取全面屏相关信息
     *
     * @param context Context
     * @return FullScreenBean
     */
    public static GestureBean getGestureBean(Context context) {
        GestureBean gestureBean = new GestureBean();
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && context != null && context.getContentResolver() != null) {
            ContentResolver contentResolver = context.getContentResolver();
            NavigationBarType navigationBarType = NavigationBarType.UNKNOWN;
            int type = -1;
            boolean isGesture = false;
            boolean checkNavigation = false;
            if (OSUtils.isHuaWei() || OSUtils.isEMUI()) {
                if (OSUtils.isEMUI3_x() || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
                    type = Settings.System.getInt(contentResolver, IMMERSION_NAVIGATION_BAR_MODE_EMUI, -1);
                } else {
                    type = Settings.Global.getInt(contentResolver, IMMERSION_NAVIGATION_BAR_MODE_EMUI, -1);
                }
                if (type == 0) {
                    navigationBarType = NavigationBarType.CLASSIC;
                    isGesture = false;