- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
45 lines
1.4 KiB
Java
45 lines
1.4 KiB
Java
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 androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import com.google.android.gms.common.annotation.KeepForSdk;
|
|
import com.google.android.gms.common.wrappers.Wrappers;
|
|
|
|
@KeepForSdk
|
|
/* loaded from: classes2.dex */
|
|
public class ClientLibraryUtils {
|
|
private ClientLibraryUtils() {
|
|
}
|
|
|
|
@KeepForSdk
|
|
public static int getClientVersion(@NonNull Context context, @NonNull String str) {
|
|
ApplicationInfo applicationInfo;
|
|
Bundle bundle;
|
|
PackageInfo packageInfo = getPackageInfo(context, str);
|
|
if (packageInfo == null || (applicationInfo = packageInfo.applicationInfo) == null || (bundle = applicationInfo.metaData) == null) {
|
|
return -1;
|
|
}
|
|
return bundle.getInt("com.google.android.gms.version", -1);
|
|
}
|
|
|
|
@Nullable
|
|
@KeepForSdk
|
|
public static PackageInfo getPackageInfo(@NonNull Context context, @NonNull String str) {
|
|
try {
|
|
return Wrappers.packageManager(context).getPackageInfo(str, 128);
|
|
} catch (PackageManager.NameNotFoundException unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@KeepForSdk
|
|
public static boolean isPackageSide() {
|
|
return false;
|
|
}
|
|
}
|