62 lines
2.0 KiB
Java
62 lines
2.0 KiB
Java
|
package com.google.android.gms.common.internal;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.content.res.Resources;
|
||
|
import android.util.Base64;
|
||
|
import com.google.android.gms.common.R;
|
||
|
import java.nio.charset.StandardCharsets;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public class StringResourceValueReader {
|
||
|
private static int a = 0;
|
||
|
private static byte d = 6;
|
||
|
private static int e = 1;
|
||
|
private final Resources zza;
|
||
|
private final String zzb;
|
||
|
|
||
|
public StringResourceValueReader(Context context) {
|
||
|
Preconditions.checkNotNull(context);
|
||
|
Resources resources = context.getResources();
|
||
|
this.zza = resources;
|
||
|
this.zzb = resources.getResourcePackageName(R.string.common_google_play_services_unknown_issue);
|
||
|
}
|
||
|
|
||
|
public String getString(String str) {
|
||
|
int i = 2 % 2;
|
||
|
int i2 = e + 73;
|
||
|
a = i2 % 128;
|
||
|
Object obj = null;
|
||
|
if (i2 % 2 == 0) {
|
||
|
int identifier = this.zza.getIdentifier(str, "string", this.zzb);
|
||
|
if (identifier == 0) {
|
||
|
int i3 = a + 29;
|
||
|
e = i3 % 128;
|
||
|
int i4 = i3 % 2;
|
||
|
return null;
|
||
|
}
|
||
|
String string = this.zza.getString(identifier);
|
||
|
if (!string.startsWith(",*,)")) {
|
||
|
return string;
|
||
|
}
|
||
|
int i5 = a + 105;
|
||
|
e = i5 % 128;
|
||
|
int i6 = i5 % 2;
|
||
|
Object[] objArr = new Object[1];
|
||
|
b(string.substring(4), objArr);
|
||
|
return ((String) objArr[0]).intern();
|
||
|
}
|
||
|
this.zza.getIdentifier(str, "string", this.zzb);
|
||
|
obj.hashCode();
|
||
|
throw null;
|
||
|
}
|
||
|
|
||
|
private void b(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] ^ d);
|
||
|
}
|
||
|
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
|
||
|
}
|
||
|
}
|