package X6FRs_4.IMuAHx_6.Nm6q_10;

import android.os.Build;
import android.text.TextUtils;
import com.wang.avi.BuildConfig;
import java.util.Locale;
/* compiled from: TextUtilsCompat.java */
/* loaded from: classes.dex */
public final class IFxWkV_5 {
    public static final Locale KQgRr5e_0 = new Locale(BuildConfig.FLAVOR, BuildConfig.FLAVOR);

    public static int KQgRr5e_0(Locale locale) {
        byte directionality = Character.getDirectionality(locale.getDisplayName(locale).charAt(0));
        return (directionality == 1 || directionality == 2) ? 1 : 0;
    }

    public static int QxJ9d_1(Locale locale) {
        if (Build.VERSION.SDK_INT >= 17) {
            return TextUtils.getLayoutDirectionFromLocale(locale);
        }
        if (locale == null || locale.equals(KQgRr5e_0)) {
            return 0;
        }
        String QxJ9d_1 = QxJ9d_1.QxJ9d_1(locale);
        if (QxJ9d_1 == null) {
            return KQgRr5e_0(locale);
        }
        return (QxJ9d_1.equalsIgnoreCase("Arab") || QxJ9d_1.equalsIgnoreCase("Hebr")) ? 1 : 0;
    }
}
