47 lines
1.3 KiB
Java
47 lines
1.3 KiB
Java
package com.google.android.gms.common.internal;
|
|
|
|
import android.content.Context;
|
|
import android.content.pm.PackageManager;
|
|
import android.os.Bundle;
|
|
import android.util.Log;
|
|
import com.google.android.gms.common.wrappers.Wrappers;
|
|
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class zzp {
|
|
private static Object a = new Object();
|
|
private static boolean b;
|
|
private static String c;
|
|
private static int d;
|
|
|
|
public static String a(Context context) {
|
|
c(context);
|
|
return c;
|
|
}
|
|
|
|
public static int b(Context context) {
|
|
c(context);
|
|
return d;
|
|
}
|
|
|
|
private static void c(Context context) {
|
|
Bundle bundle;
|
|
synchronized (a) {
|
|
if (b) {
|
|
return;
|
|
}
|
|
b = true;
|
|
try {
|
|
bundle = Wrappers.a(context).a(context.getPackageName(), PeripheralType.SERVO).metaData;
|
|
} catch (PackageManager.NameNotFoundException e) {
|
|
Log.wtf("MetadataValueReader", "This should never happen.", e);
|
|
}
|
|
if (bundle == null) {
|
|
return;
|
|
}
|
|
c = bundle.getString("com.google.app.id");
|
|
d = bundle.getInt("com.google.android.gms.version");
|
|
}
|
|
}
|
|
}
|