You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.8 KiB

package p022h;
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;
import p007c.C0485a;
import p007c.C0486b;
import p007c.C0488d;
import p007c.C0494j;
/* renamed from: h.a */
/* loaded from: classes.dex */
public class C0742a {
/* renamed from: a */
public Context f2329a;
public C0742a(Context context) {
this.f2329a = context;
}
/* renamed from: b */
public static C0742a m3026b(Context context) {
return new C0742a(context);
}
/* renamed from: a */
public boolean m3027a() {
return this.f2329a.getApplicationInfo().targetSdkVersion < 14;
}
/* renamed from: c */
public int m3025c() {
return this.f2329a.getResources().getDisplayMetrics().widthPixels / 2;
}
/* renamed from: d */
public int m3024d() {
Configuration configuration = this.f2329a.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;
}
/* renamed from: e */
public int m3023e() {
return this.f2329a.getResources().getDimensionPixelSize(C0488d.abc_action_bar_stacked_tab_max_width);
}
/* renamed from: f */
public int m3022f() {
TypedArray obtainStyledAttributes = this.f2329a.obtainStyledAttributes(null, C0494j.f1801a, C0485a.actionBarStyle, 0);
int layoutDimension = obtainStyledAttributes.getLayoutDimension(C0494j.f1846j, 0);
Resources resources = this.f2329a.getResources();
if (!m3021g()) {
layoutDimension = Math.min(layoutDimension, resources.getDimensionPixelSize(C0488d.abc_action_bar_stacked_max_height));
}
obtainStyledAttributes.recycle();
return layoutDimension;
}
/* renamed from: g */
public boolean m3021g() {
return this.f2329a.getResources().getBoolean(C0486b.abc_action_bar_embed_tabs);
}
/* renamed from: h */
public boolean m3020h() {
if (Build.VERSION.SDK_INT >= 19) {
return true;
}
return !ViewConfiguration.get(this.f2329a).hasPermanentMenuKey();
}
}