package X6FRs_4.KQgRr5e_0.LGe8pk_15;

import android.graphics.Rect;
import android.os.Build;
import android.util.Log;
import android.view.View;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* compiled from: ViewUtils.java */
/* loaded from: classes.dex */
public class R6WQ_35 {
    public static Method KQgRr5e_0;

    static {
        if (Build.VERSION.SDK_INT >= 18) {
            try {
                Method declaredMethod = View.class.getDeclaredMethod("computeFitSystemWindows", Rect.class, Rect.class);
                KQgRr5e_0 = declaredMethod;
                if (declaredMethod.isAccessible()) {
                    return;
                }
                KQgRr5e_0.setAccessible(true);
            } catch (NoSuchMethodException unused) {
                Log.d("ViewUtils", "Could not find method computeFitSystemWindows. Oh well.");
            }
        }
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static boolean m429KQgRr5e_0(View view) {
        return X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.Mqv2r_3(view) == 1;
    }

    public static void KQgRr5e_0(View view, Rect rect, Rect rect2) {
        Method method = KQgRr5e_0;
        if (method != null) {
            try {
                method.invoke(view, rect, rect2);
            } catch (Exception e) {
                Log.d("ViewUtils", "Could not invoke computeFitSystemWindows", e);
            }
        }
    }

    public static void KQgRr5e_0(View view) {
        if (Build.VERSION.SDK_INT >= 16) {
            try {
                Method method = view.getClass().getMethod("makeOptionalFitsSystemWindows", new Class[0]);
                if (!method.isAccessible()) {
                    method.setAccessible(true);
                }
                method.invoke(view, new Object[0]);
            } catch (IllegalAccessException e) {
                Log.d("ViewUtils", "Could not invoke makeOptionalFitsSystemWindows", e);
            } catch (NoSuchMethodException unused) {
                Log.d("ViewUtils", "Could not find method makeOptionalFitsSystemWindows. Oh well...");
            } catch (InvocationTargetException e2) {
                Log.d("ViewUtils", "Could not invoke makeOptionalFitsSystemWindows", e2);
            }
        }
    }
}
