package X6FRs_4.KQgRr5e_0.YghfZG_14;

import X6FRs_4.KQgRr5e_0.XnFJ5_9;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Build;
import android.view.ViewConfiguration;
/* compiled from: ActionBarPolicy.java */
/* loaded from: classes.dex */
public class KQgRr5e_0 {
    public Context KQgRr5e_0;

    public KQgRr5e_0(Context context) {
        this.KQgRr5e_0 = context;
    }

    public static KQgRr5e_0 KQgRr5e_0(Context context) {
        return new KQgRr5e_0(context);
    }

    public int Mqv2r_3() {
        TypedArray obtainStyledAttributes = this.KQgRr5e_0.obtainStyledAttributes(null, XnFJ5_9.ActionBar, X6FRs_4.KQgRr5e_0.KQgRr5e_0.actionBarStyle, 0);
        int layoutDimension = obtainStyledAttributes.getLayoutDimension(XnFJ5_9.ActionBar_height, 0);
        Resources resources = this.KQgRr5e_0.getResources();
        if (!m462QxJ9d_1()) {
            layoutDimension = Math.min(layoutDimension, resources.getDimensionPixelSize(X6FRs_4.KQgRr5e_0.Mqv2r_3.abc_action_bar_stacked_max_height));
        }
        obtainStyledAttributes.recycle();
        return layoutDimension;
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public boolean m461PGPF6hQ_2() {
        if (Build.VERSION.SDK_INT >= 19) {
            return true;
        }
        return !ViewConfiguration.get(this.KQgRr5e_0).hasPermanentMenuKey();
    }

    public int QxJ9d_1() {
        Configuration configuration = this.KQgRr5e_0.getResources().getConfiguration();
        int i = configuration.screenWidthDp;
        int i2 = configuration.screenHeightDp;
        if (configuration.smallestScreenWidthDp > 600 || i > 600) {
            return 5;
        }
        if (i <= 960 || i2 <= 720) {
            if (i <= 720 || i2 <= 960) {
                if (i < 500) {
                    if (i <= 640 || i2 <= 480) {
                        if (i <= 480 || i2 <= 640) {
                            return i >= 360 ? 3 : 2;
                        }
                        return 4;
                    }
                    return 4;
                }
                return 4;
            }
            return 5;
        }
        return 5;
    }

    public int KQgRr5e_0() {
        return this.KQgRr5e_0.getResources().getDisplayMetrics().widthPixels / 2;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public boolean m460KQgRr5e_0() {
        return this.KQgRr5e_0.getApplicationInfo().targetSdkVersion < 14;
    }

    public int PGPF6hQ_2() {
        return this.KQgRr5e_0.getResources().getDimensionPixelSize(X6FRs_4.KQgRr5e_0.Mqv2r_3.abc_action_bar_stacked_tab_max_width);
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public boolean m462QxJ9d_1() {
        return this.KQgRr5e_0.getResources().getBoolean(X6FRs_4.KQgRr5e_0.QxJ9d_1.abc_action_bar_embed_tabs);
    }
}
