package ῲ.ᨨ.ᨨ;

import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;
import android.util.TypedValue;
import android.view.ViewConfiguration;
import com.facebook.LegacyTokenHelper;
import java.lang.reflect.Method;

/* renamed from: ῲ.ᨨ.ᨨ.ᓆ  reason: contains not printable characters */
/* compiled from: ViewConfigurationCompat */
public final class C1739 {

    /* renamed from: K  reason: contains not printable characters */
    public static Method f6061;

    static {
        if (Build.VERSION.SDK_INT == 25) {
            try {
                f6061 = ViewConfiguration.class.getDeclaredMethod("getScaledScrollFactor", new Class[0]);
            } catch (Exception unused) {
                Log.i("ViewConfigCompat", "Could not find method getScaledScrollFactor() on ViewConfiguration");
            }
        }
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public static boolean m4536(ViewConfiguration viewConfiguration, Context context) {
        if (Build.VERSION.SDK_INT >= 28) {
            return viewConfiguration.shouldShowMenuShortcutsWhenKeyboardPresent();
        }
        Resources resources = context.getResources();
        int identifier = resources.getIdentifier("config_showMenuShortcutsWhenKeyboardPresent", LegacyTokenHelper.TYPE_BOOLEAN, "android");
        return identifier != 0 && resources.getBoolean(identifier);
    }

    /* renamed from: ῲ  reason: contains not printable characters */
    public static float m4537(ViewConfiguration viewConfiguration, Context context) {
        if (Build.VERSION.SDK_INT >= 26) {
            return viewConfiguration.getScaledHorizontalScrollFactor();
        }
        return m4538(viewConfiguration, context);
    }

    /* renamed from: K  reason: contains not printable characters */
    public static float m4538(ViewConfiguration viewConfiguration, Context context) {
        Method method;
        if (Build.VERSION.SDK_INT >= 25 && (method = f6061) != null) {
            try {
                return (float) ((Integer) method.invoke(viewConfiguration, new Object[0])).intValue();
            } catch (Exception unused) {
                Log.i("ViewConfigCompat", "Could not find method getScaledScrollFactor() on ViewConfiguration");
            }
        }
        TypedValue typedValue = new TypedValue();
        if (context.getTheme().resolveAttribute(16842829, typedValue, true)) {
            return typedValue.getDimension(context.getResources().getDisplayMetrics());
        }
        return 0.0f;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static int m4539(ViewConfiguration viewConfiguration) {
        if (Build.VERSION.SDK_INT >= 28) {
            return viewConfiguration.getScaledHoverSlop();
        }
        return viewConfiguration.getScaledTouchSlop() / 2;
    }
}
