package com.igaworks.ssp.common.o; import android.R; import android.app.Activity; import android.content.Context; import android.content.res.Configuration; import android.graphics.Point; import android.util.TypedValue; import android.view.Display; import android.view.ViewConfiguration; import android.view.WindowManager; import com.unity3d.services.core.request.metrics.MetricCommonTags; /* loaded from: classes2.dex */ public class e { /* renamed from: a, reason: collision with root package name */ private static double f6813a = 1.0d; /* renamed from: b, reason: collision with root package name */ private static double f6814b = 1.0d; /* renamed from: c, reason: collision with root package name */ private static double f6815c = 720.0d; /* renamed from: d, reason: collision with root package name */ private static double f6816d = 1280.0d; /* renamed from: e, reason: collision with root package name */ private static int f6817e; /* renamed from: f, reason: collision with root package name */ private static int f6818f; public static float a(Context context, Float f10) { return TypedValue.applyDimension(1, f10.floatValue(), context.getResources().getDisplayMetrics()); } public static float b(Context context, Float f10) { return TypedValue.applyDimension(1, f10.floatValue(), context.getResources().getDisplayMetrics()); } public static int c(Context context) { try { Display defaultDisplay = ((WindowManager) context.getSystemService("window")).getDefaultDisplay(); Point point = new Point(); defaultDisplay.getSize(point); return point.x; } catch (Exception e10) { com.igaworks.ssp.common.o.m.a.a(Thread.currentThread(), e10); return 0; } } public static int d(Context context) { try { boolean hasPermanentMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey(); int identifier = context.getResources().getIdentifier("navigation_bar_height", "dimen", MetricCommonTags.METRIC_COMMON_TAG_PLATFORM_ANDROID); if (identifier > 0 && !hasPermanentMenuKey) { return context.getResources().getDimensionPixelSize(identifier); } } catch (Exception unused) { } return 0; } public static int e(Context context) { try { int identifier = context.getResources().getIdentifier("status_bar_height", "dimen", MetricCommonTags.METRIC_COMMON_TAG_PLATFORM_ANDROID); if (identifier > 0) { return context.getResources().getDimensionPixelSize(identifier); } } catch (Exception unused) { } return 0; } public static void f(Context context) { double d10; double d11; try { Display defaultDisplay = ((WindowManager) context.getSystemService("window")).getDefaultDisplay(); Point point = new Point(); defaultDisplay.getSize(point); f6817e = point.x; f6818f = point.y; try { Configuration configuration = context.getResources().getConfiguration(); if (configuration == null || configuration.orientation != 1) { f6813a = f6817e / f6816d; d10 = f6818f; d11 = f6815c; } else { f6813a = f6817e / f6815c; d10 = f6818f; d11 = f6816d; } f6814b = d10 / d11; } catch (Exception unused) { f6813a = f6817e / f6815c; f6814b = f6818f / f6816d; } } catch (Exception e10) { com.igaworks.ssp.common.o.m.a.a(Thread.currentThread(), e10); } } public static int a(Context context) { return (((Activity) context).getWindow().getAttributes().flags & 1024) == 1024 ? R.style.Theme.Translucent.NoTitleBar.Fullscreen : R.style.Theme.Translucent.NoTitleBar; } public static int b(Context context) { try { Display defaultDisplay = ((WindowManager) context.getSystemService("window")).getDefaultDisplay(); Point point = new Point(); defaultDisplay.getSize(point); return point.y; } catch (Exception e10) { com.igaworks.ssp.common.o.m.a.a(Thread.currentThread(), e10); return 0; } } public static int a(Context context, int i10) { return (int) TypedValue.applyDimension(1, i10, context.getResources().getDisplayMetrics()); } public static void a(int i10) { } }