package com.facetec.sdk; import android.app.Activity; import android.content.res.Resources; import android.util.Base64; import android.widget.TextView; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; /* loaded from: classes.dex */ final class cx { private static Resources a = null; private static HashMap b = null; private static byte c = 0; private static int d = 0; private static int e = 1; cx() { } /* JADX INFO: Access modifiers changed from: package-private */ public static void c(Activity activity) { if (a == null) { a = activity.getApplicationContext().getResources(); } } private static void f(String str, Object[] objArr) { byte[] decode = Base64.decode(str, 0); byte[] bArr = new byte[decode.length]; for (int i = 0; i < decode.length; i++) { bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ c); } objArr[0] = new String(bArr, StandardCharsets.UTF_8); } /* JADX INFO: Access modifiers changed from: package-private */ public static String d(int i) { int i2 = 2 % 2; int i3 = d; int i4 = i3 + 33; e = i4 % 128; int i5 = i4 % 2; if (i == 0) { int i6 = i3 + 65; e = i6 % 128; if (i6 % 2 != 0) { return ""; } throw null; } HashMap hashMap = b; String str = hashMap != null ? hashMap.get(Integer.valueOf(i)) : null; if (str != null) { int i7 = d + 29; e = i7 % 128; int i8 = i7 % 2; return str; } String string = a.getString(i); if (!string.startsWith(",*,)")) { return string; } Object[] objArr = new Object[1]; f(string.substring(4), objArr); return ((String) objArr[0]).intern(); } /* JADX INFO: Access modifiers changed from: package-private */ public static void e(TextView textView, int i) { if (textView == null) { return; } textView.setText(d(i)); } /* JADX INFO: Access modifiers changed from: package-private */ public static void d(Map map) { synchronized (cx.class) { b = new HashMap<>(map); } } static void e() { c = (byte) 6; } static { e(); } }