what-the-bank/sources/com/google/android/libraries/places/internal/zzgu.java

94 lines
3.2 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.libraries.places.internal;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.util.Base64;
import com.google.android.gms.common.api.Status;
import com.google.android.libraries.places.api.Places;
import com.google.android.libraries.places.api.model.Place;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
/* loaded from: classes2.dex */
public final class zzgu {
private static int a = 1;
private static int b = 0;
private static byte c = 6;
public static Status zza(Intent intent) {
try {
zzig.zzc(intent, "Intent must not be null.");
Status status = (Status) intent.getParcelableExtra("places/status");
zzig.zzc(status, "Intent expected to contain a Status, but doesn't.");
return status;
} catch (Error | RuntimeException e) {
zzgb.zzb(e);
throw e;
}
}
public static Place zzb(Intent intent) {
try {
zzig.zzc(intent, "Intent must not be null.");
Place place = (Place) intent.getParcelableExtra("places/selected_place");
zzig.zzc(place, "Intent expected to contain a Place, but doesn't.");
return place;
} catch (Error | RuntimeException e) {
zzgb.zzb(e);
throw e;
}
}
public static String zzc(Context context, int i) {
Locale locale;
int i2 = 2 % 2;
Locale locale2 = context.getResources().getConfiguration().getLocales().get(0);
if (Places.isInitialized()) {
int i3 = a + 71;
b = i3 % 128;
if (i3 % 2 != 0) {
Places.zzc().zzb();
Object obj = null;
obj.hashCode();
throw null;
}
locale = Places.zzc().zzb();
} else {
locale = locale2;
}
if (!locale.equals(locale2)) {
Configuration configuration = new Configuration(context.getResources().getConfiguration());
configuration.setLocale(locale);
String string = context.createConfigurationContext(configuration).getResources().getString(i);
if (!string.startsWith(",*,)")) {
return string;
}
Object[] objArr = new Object[1];
e(string.substring(4), objArr);
return ((String) objArr[0]).intern();
}
String string2 = context.getResources().getString(i);
if (string2.startsWith(",*,)")) {
Object[] objArr2 = new Object[1];
e(string2.substring(4), objArr2);
string2 = ((String) objArr2[0]).intern();
int i4 = a + 125;
b = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 2 / 3;
}
}
return string2;
}
private static void e(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);
}
}