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.

52 lines
1.8 KiB

package p023h0;
import android.os.Build;
import android.util.Log;
import android.view.LayoutInflater;
import java.lang.reflect.Field;
/* renamed from: h0.t */
/* loaded from: classes.dex */
public final class C0952t {
/* renamed from: a */
public static Field f2498a;
/* renamed from: b */
public static boolean f2499b;
/* renamed from: a */
public static void m2487a(LayoutInflater layoutInflater, LayoutInflater.Factory2 factory2) {
if (!f2499b) {
try {
Field declaredField = LayoutInflater.class.getDeclaredField("mFactory2");
f2498a = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException e) {
Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", e);
}
f2499b = true;
}
Field field = f2498a;
if (field != null) {
try {
field.set(layoutInflater, factory2);
} catch (IllegalAccessException e2) {
Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + layoutInflater + "; inflation may have unexpected results.", e2);
}
}
}
/* renamed from: b */
public static void m2486b(LayoutInflater layoutInflater, LayoutInflater.Factory2 factory2) {
layoutInflater.setFactory2(factory2);
if (Build.VERSION.SDK_INT < 21) {
LayoutInflater.Factory factory = layoutInflater.getFactory();
if (factory instanceof LayoutInflater.Factory2) {
m2487a(layoutInflater, (LayoutInflater.Factory2) factory);
} else {
m2487a(layoutInflater, factory2);
}
}
}
}