Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AndroidUtilsLight {
|
||||
public static MessageDigest a(String str) {
|
||||
MessageDigest messageDigest;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
try {
|
||||
messageDigest = MessageDigest.getInstance(str);
|
||||
} catch (NoSuchAlgorithmException unused) {
|
||||
}
|
||||
if (messageDigest != null) {
|
||||
return messageDigest;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
128
sources/com/google/android/gms/common/util/ArrayUtils.java
Normal file
128
sources/com/google/android/gms/common/util/ArrayUtils.java
Normal file
@@ -0,0 +1,128 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ArrayUtils {
|
||||
public static <T> boolean a(T[] tArr, T t) {
|
||||
int length = tArr != null ? tArr.length : 0;
|
||||
int i = 0;
|
||||
while (true) {
|
||||
if (i >= length) {
|
||||
i = -1;
|
||||
break;
|
||||
}
|
||||
if (Objects.a(tArr[i], t)) {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return i >= 0;
|
||||
}
|
||||
|
||||
public static <T> void a(StringBuilder sb, T[] tArr) {
|
||||
int length = tArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(tArr[i].toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(StringBuilder sb, int[] iArr) {
|
||||
int length = iArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(Integer.toString(iArr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(StringBuilder sb, long[] jArr) {
|
||||
int length = jArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(Long.toString(jArr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(StringBuilder sb, float[] fArr) {
|
||||
int length = fArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(Float.toString(fArr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(StringBuilder sb, double[] dArr) {
|
||||
int length = dArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(Double.toString(dArr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(StringBuilder sb, boolean[] zArr) {
|
||||
int length = zArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append(Boolean.toString(zArr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
public static void a(StringBuilder sb, String[] strArr) {
|
||||
int length = strArr.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (i != 0) {
|
||||
sb.append(",");
|
||||
}
|
||||
sb.append("\"");
|
||||
sb.append(strArr[i]);
|
||||
sb.append("\"");
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T[] a(T[] tArr, T... tArr2) {
|
||||
int i;
|
||||
if (tArr == null) {
|
||||
return null;
|
||||
}
|
||||
if (tArr2 != null && tArr2.length != 0) {
|
||||
T[] tArr3 = (T[]) ((Object[]) Array.newInstance(tArr2.getClass().getComponentType(), tArr.length));
|
||||
if (tArr2.length == 1) {
|
||||
i = 0;
|
||||
for (T t : tArr) {
|
||||
if (!Objects.a(tArr2[0], t)) {
|
||||
tArr3[i] = t;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
i = 0;
|
||||
for (T t2 : tArr) {
|
||||
if (!a(tArr2, t2)) {
|
||||
tArr3[i] = t2;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tArr3 == null) {
|
||||
return null;
|
||||
}
|
||||
return i != tArr3.length ? (T[]) Arrays.copyOf(tArr3, i) : tArr3;
|
||||
}
|
||||
return (T[]) Arrays.copyOf(tArr, tArr.length);
|
||||
}
|
||||
}
|
20
sources/com/google/android/gms/common/util/Base64Utils.java
Normal file
20
sources/com/google/android/gms/common/util/Base64Utils.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.util.Base64;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class Base64Utils {
|
||||
public static String a(byte[] bArr) {
|
||||
if (bArr == null) {
|
||||
return null;
|
||||
}
|
||||
return Base64.encodeToString(bArr, 0);
|
||||
}
|
||||
|
||||
public static String b(byte[] bArr) {
|
||||
if (bArr == null) {
|
||||
return null;
|
||||
}
|
||||
return Base64.encodeToString(bArr, 10);
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ClientLibraryUtils {
|
||||
public static int a(Context context, String str) {
|
||||
ApplicationInfo applicationInfo;
|
||||
Bundle bundle;
|
||||
PackageInfo b = b(context, str);
|
||||
if (b == null || (applicationInfo = b.applicationInfo) == null || (bundle = applicationInfo.metaData) == null) {
|
||||
return -1;
|
||||
}
|
||||
return bundle.getInt("com.google.android.gms.version", -1);
|
||||
}
|
||||
|
||||
private static PackageInfo b(Context context, String str) {
|
||||
try {
|
||||
return Wrappers.a(context).b(str, PeripheralType.SERVO);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean c(Context context, String str) {
|
||||
"com.google.android.gms".equals(str);
|
||||
return (Wrappers.a(context).a(str, 0).flags & 2097152) != 0;
|
||||
}
|
||||
}
|
10
sources/com/google/android/gms/common/util/Clock.java
Normal file
10
sources/com/google/android/gms/common/util/Clock.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface Clock {
|
||||
long a();
|
||||
|
||||
long b();
|
||||
|
||||
long c();
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class CollectionUtils {
|
||||
@Deprecated
|
||||
public static <T> List<T> a() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static <T> List<T> a(T t) {
|
||||
return Collections.singletonList(t);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static <T> List<T> a(T... tArr) {
|
||||
int length = tArr.length;
|
||||
if (length == 0) {
|
||||
return a();
|
||||
}
|
||||
if (length != 1) {
|
||||
return Collections.unmodifiableList(Arrays.asList(tArr));
|
||||
}
|
||||
return a(tArr[0]);
|
||||
}
|
||||
}
|
27
sources/com/google/android/gms/common/util/CrashUtils.java
Normal file
27
sources/com/google/android/gms/common/util/CrashUtils.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class CrashUtils {
|
||||
static {
|
||||
new String[]{"android.", "com.android.", "dalvik.", "java.", "javax."};
|
||||
}
|
||||
|
||||
public static boolean a(Context context, Throwable th) {
|
||||
return a(context, th, 536870912);
|
||||
}
|
||||
|
||||
private static boolean a(Context context, Throwable th, int i) {
|
||||
try {
|
||||
Preconditions.a(context);
|
||||
Preconditions.a(th);
|
||||
return false;
|
||||
} catch (Exception e) {
|
||||
Log.e("CrashUtils", "Error adding exception to DropBox!", e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
30
sources/com/google/android/gms/common/util/DefaultClock.java
Normal file
30
sources/com/google/android/gms/common/util/DefaultClock.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class DefaultClock implements Clock {
|
||||
private static final DefaultClock a = new DefaultClock();
|
||||
|
||||
private DefaultClock() {
|
||||
}
|
||||
|
||||
public static Clock d() {
|
||||
return a;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.util.Clock
|
||||
public long a() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.util.Clock
|
||||
public long b() {
|
||||
return SystemClock.elapsedRealtime();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.util.Clock
|
||||
public long c() {
|
||||
return System.nanoTime();
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class DeviceProperties {
|
||||
private static Boolean a;
|
||||
private static Boolean b;
|
||||
private static Boolean c;
|
||||
|
||||
@TargetApi(21)
|
||||
public static boolean a(Context context) {
|
||||
if (b == null) {
|
||||
b = Boolean.valueOf(PlatformVersion.g() && context.getPackageManager().hasSystemFeature("cn.google"));
|
||||
}
|
||||
return b.booleanValue();
|
||||
}
|
||||
|
||||
@TargetApi(20)
|
||||
public static boolean b(Context context) {
|
||||
if (a == null) {
|
||||
a = Boolean.valueOf(PlatformVersion.f() && context.getPackageManager().hasSystemFeature("android.hardware.type.watch"));
|
||||
}
|
||||
return a.booleanValue();
|
||||
}
|
||||
|
||||
@TargetApi(26)
|
||||
public static boolean c(Context context) {
|
||||
if (!b(context)) {
|
||||
return false;
|
||||
}
|
||||
if (PlatformVersion.h()) {
|
||||
return a(context) && !PlatformVersion.i();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean d(Context context) {
|
||||
if (c == null) {
|
||||
c = Boolean.valueOf(context.getPackageManager().hasSystemFeature("android.hardware.type.iot") || context.getPackageManager().hasSystemFeature("android.hardware.type.embedded"));
|
||||
}
|
||||
return c.booleanValue();
|
||||
}
|
||||
|
||||
public static boolean a() {
|
||||
return "user".equals(Build.TYPE);
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE})
|
||||
/* loaded from: classes.dex */
|
||||
public @interface DynamiteApi {
|
||||
}
|
20
sources/com/google/android/gms/common/util/Hex.java
Normal file
20
sources/com/google/android/gms/common/util/Hex.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class Hex {
|
||||
private static final char[] a = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
||||
|
||||
public static String a(byte[] bArr) {
|
||||
char[] cArr = new char[bArr.length << 1];
|
||||
int i = 0;
|
||||
for (byte b : bArr) {
|
||||
int i2 = b & 255;
|
||||
int i3 = i + 1;
|
||||
char[] cArr2 = a;
|
||||
cArr[i] = cArr2[i2 >>> 4];
|
||||
i = i3 + 1;
|
||||
cArr[i3] = cArr2[i2 & 15];
|
||||
}
|
||||
return new String(cArr);
|
||||
}
|
||||
}
|
16
sources/com/google/android/gms/common/util/IOUtils.java
Normal file
16
sources/com/google/android/gms/common/util/IOUtils.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class IOUtils {
|
||||
public static void a(Closeable closeable) {
|
||||
if (closeable != null) {
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
57
sources/com/google/android/gms/common/util/JsonUtils.java
Normal file
57
sources/com/google/android/gms/common/util/JsonUtils.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class JsonUtils {
|
||||
private static final Pattern a;
|
||||
|
||||
static {
|
||||
Pattern.compile("\\\\.");
|
||||
a = Pattern.compile("[\\\\\"/\b\f\n\r\t]");
|
||||
}
|
||||
|
||||
public static String a(String str) {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
return str;
|
||||
}
|
||||
Matcher matcher = a.matcher(str);
|
||||
StringBuffer stringBuffer = null;
|
||||
while (matcher.find()) {
|
||||
if (stringBuffer == null) {
|
||||
stringBuffer = new StringBuffer();
|
||||
}
|
||||
char charAt = matcher.group().charAt(0);
|
||||
if (charAt == '\f') {
|
||||
matcher.appendReplacement(stringBuffer, "\\\\f");
|
||||
} else if (charAt == '\r') {
|
||||
matcher.appendReplacement(stringBuffer, "\\\\r");
|
||||
} else if (charAt == '\"') {
|
||||
matcher.appendReplacement(stringBuffer, "\\\\\\\"");
|
||||
} else if (charAt == '/') {
|
||||
matcher.appendReplacement(stringBuffer, "\\\\/");
|
||||
} else if (charAt != '\\') {
|
||||
switch (charAt) {
|
||||
case '\b':
|
||||
matcher.appendReplacement(stringBuffer, "\\\\b");
|
||||
break;
|
||||
case '\t':
|
||||
matcher.appendReplacement(stringBuffer, "\\\\t");
|
||||
break;
|
||||
case '\n':
|
||||
matcher.appendReplacement(stringBuffer, "\\\\n");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
matcher.appendReplacement(stringBuffer, "\\\\\\\\");
|
||||
}
|
||||
}
|
||||
if (stringBuffer == null) {
|
||||
return str;
|
||||
}
|
||||
matcher.appendTail(stringBuffer);
|
||||
return stringBuffer.toString();
|
||||
}
|
||||
}
|
30
sources/com/google/android/gms/common/util/MapUtils.java
Normal file
30
sources/com/google/android/gms/common/util/MapUtils.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class MapUtils {
|
||||
public static void a(StringBuilder sb, HashMap<String, String> hashMap) {
|
||||
sb.append("{");
|
||||
boolean z = true;
|
||||
for (String str : hashMap.keySet()) {
|
||||
if (z) {
|
||||
z = false;
|
||||
} else {
|
||||
sb.append(",");
|
||||
}
|
||||
String str2 = hashMap.get(str);
|
||||
sb.append("\"");
|
||||
sb.append(str);
|
||||
sb.append("\":");
|
||||
if (str2 == null) {
|
||||
sb.append("null");
|
||||
} else {
|
||||
sb.append("\"");
|
||||
sb.append(str2);
|
||||
sb.append("\"");
|
||||
}
|
||||
}
|
||||
sb.append("}");
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.os.Build;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class PlatformVersion {
|
||||
public static boolean a() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean b() {
|
||||
return Build.VERSION.SDK_INT >= 15;
|
||||
}
|
||||
|
||||
public static boolean c() {
|
||||
return Build.VERSION.SDK_INT >= 16;
|
||||
}
|
||||
|
||||
public static boolean d() {
|
||||
return Build.VERSION.SDK_INT >= 18;
|
||||
}
|
||||
|
||||
public static boolean e() {
|
||||
return Build.VERSION.SDK_INT >= 19;
|
||||
}
|
||||
|
||||
public static boolean f() {
|
||||
return Build.VERSION.SDK_INT >= 20;
|
||||
}
|
||||
|
||||
public static boolean g() {
|
||||
return Build.VERSION.SDK_INT >= 21;
|
||||
}
|
||||
|
||||
public static boolean h() {
|
||||
return Build.VERSION.SDK_INT >= 24;
|
||||
}
|
||||
|
||||
public static boolean i() {
|
||||
return Build.VERSION.SDK_INT >= 26;
|
||||
}
|
||||
}
|
65
sources/com/google/android/gms/common/util/ProcessUtils.java
Normal file
65
sources/com/google/android/gms/common/util/ProcessUtils.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.os.Process;
|
||||
import android.os.StrictMode;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ProcessUtils {
|
||||
private static String a;
|
||||
private static int b;
|
||||
|
||||
public static String a() {
|
||||
if (a == null) {
|
||||
if (b == 0) {
|
||||
b = Process.myPid();
|
||||
}
|
||||
a = a(b);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
private static String a(int i) {
|
||||
BufferedReader bufferedReader;
|
||||
BufferedReader bufferedReader2 = null;
|
||||
String str = null;
|
||||
if (i <= 0) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder(25);
|
||||
sb.append("/proc/");
|
||||
sb.append(i);
|
||||
sb.append("/cmdline");
|
||||
bufferedReader = a(sb.toString());
|
||||
try {
|
||||
str = bufferedReader.readLine().trim();
|
||||
IOUtils.a(bufferedReader);
|
||||
} catch (IOException unused) {
|
||||
IOUtils.a(bufferedReader);
|
||||
return str;
|
||||
} catch (Throwable th) {
|
||||
bufferedReader2 = bufferedReader;
|
||||
th = th;
|
||||
IOUtils.a(bufferedReader2);
|
||||
throw th;
|
||||
}
|
||||
} catch (IOException unused2) {
|
||||
bufferedReader = null;
|
||||
} catch (Throwable th2) {
|
||||
th = th2;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private static BufferedReader a(String str) throws IOException {
|
||||
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
|
||||
try {
|
||||
return new BufferedReader(new FileReader(str));
|
||||
} finally {
|
||||
StrictMode.setThreadPolicy(allowThreadDiskReads);
|
||||
}
|
||||
}
|
||||
}
|
14
sources/com/google/android/gms/common/util/Strings.java
Normal file
14
sources/com/google/android/gms/common/util/Strings.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class Strings {
|
||||
static {
|
||||
Pattern.compile("\\$\\{(.*?)\\}");
|
||||
}
|
||||
|
||||
public static boolean a(String str) {
|
||||
return str == null || str.trim().isEmpty();
|
||||
}
|
||||
}
|
30
sources/com/google/android/gms/common/util/UidVerifier.java
Normal file
30
sources/com/google/android/gms/common/util/UidVerifier.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.GoogleSignatureVerifier;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class UidVerifier {
|
||||
public static boolean a(Context context, int i) {
|
||||
if (!a(context, i, "com.google.android.gms")) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return GoogleSignatureVerifier.a(context).a(context.getPackageManager().getPackageInfo("com.google.android.gms", 64));
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
if (Log.isLoggable("UidVerifier", 3)) {
|
||||
Log.d("UidVerifier", "Package manager can't find google play services package, defaulting to false");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(19)
|
||||
public static boolean a(Context context, int i, String str) {
|
||||
return Wrappers.a(context).a(i, str);
|
||||
}
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
package com.google.android.gms.common.util.concurrent;
|
||||
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class NamedThreadFactory implements ThreadFactory {
|
||||
private final String a;
|
||||
private final ThreadFactory b;
|
||||
|
||||
public NamedThreadFactory(String str) {
|
||||
this(str, 0);
|
||||
}
|
||||
|
||||
@Override // java.util.concurrent.ThreadFactory
|
||||
public Thread newThread(Runnable runnable) {
|
||||
Thread newThread = this.b.newThread(new zza(runnable, 0));
|
||||
newThread.setName(this.a);
|
||||
return newThread;
|
||||
}
|
||||
|
||||
private NamedThreadFactory(String str, int i) {
|
||||
this.b = Executors.defaultThreadFactory();
|
||||
Preconditions.a(str, (Object) "Name must not be null");
|
||||
this.a = str;
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.util.concurrent;
|
||||
|
||||
import android.os.Process;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zza implements Runnable {
|
||||
private final Runnable a;
|
||||
private final int b;
|
||||
|
||||
public zza(Runnable runnable, int i) {
|
||||
this.a = runnable;
|
||||
this.b = i;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Process.setThreadPriority(this.b);
|
||||
this.a.run();
|
||||
}
|
||||
}
|
11
sources/com/google/android/gms/common/util/zzb.java
Normal file
11
sources/com/google/android/gms/common/util/zzb.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zzb {
|
||||
public static int a(int i) {
|
||||
if (i == -1) {
|
||||
return -1;
|
||||
}
|
||||
return i / 1000;
|
||||
}
|
||||
}
|
10
sources/com/google/android/gms/common/util/zzc.java
Normal file
10
sources/com/google/android/gms/common/util/zzc.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.util;
|
||||
|
||||
import android.os.Looper;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zzc {
|
||||
public static boolean a() {
|
||||
return Looper.getMainLooper() == Looper.myLooper();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user