alexandroid/decompiled/jadx/sources/com/google/android/gms/common/GoogleApiAvailabilityLight.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

190 lines
6.7 KiB
Java

package com.google.android.gms.common;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.PendingIntentCompat;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.HideFirstParty;
import com.google.android.gms.common.internal.ShowFirstParty;
import com.google.android.gms.common.util.DeviceProperties;
import com.google.android.gms.common.wrappers.Wrappers;
import org.jetbrains.kotlin.library.KotlinLibraryKt;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@ShowFirstParty
@KeepForSdk
/* loaded from: classes7.dex */
public class GoogleApiAvailabilityLight {
@NonNull
@KeepForSdk
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
@NonNull
@KeepForSdk
public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending";
@KeepForSdk
static final String TRACKING_SOURCE_DIALOG = "d";
@KeepForSdk
static final String TRACKING_SOURCE_NOTIFICATION = "n";
@KeepForSdk
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
private static final GoogleApiAvailabilityLight zza = new GoogleApiAvailabilityLight();
@KeepForSdk
public GoogleApiAvailabilityLight() {
}
@NonNull
@ShowFirstParty
@KeepForSdk
public static GoogleApiAvailabilityLight getInstance() {
return zza;
}
@KeepForSdk
public void cancelAvailabilityErrorNotifications(@NonNull Context context) {
GooglePlayServicesUtilLight.cancelAvailabilityErrorNotifications(context);
}
@ShowFirstParty
@KeepForSdk
public int getApkVersion(@NonNull Context context) {
return GooglePlayServicesUtilLight.getApkVersion(context);
}
@ShowFirstParty
@KeepForSdk
public int getClientVersion(@NonNull Context context) {
return GooglePlayServicesUtilLight.getClientVersion(context);
}
@Nullable
@ShowFirstParty
@KeepForSdk
public Intent getErrorResolutionIntent(@Nullable Context context, int i, @Nullable String str) {
if (i != 1 && i != 2) {
if (i != 3) {
return null;
}
Uri fromParts = Uri.fromParts(KotlinLibraryKt.KLIB_PROPERTY_PACKAGE, "com.google.android.gms", null);
Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
intent.setData(fromParts);
return intent;
}
if (context != null && DeviceProperties.isWearableWithoutPlayStore(context)) {
Intent intent2 = new Intent("com.google.android.clockwork.home.UPDATE_ANDROID_WEAR_ACTION");
intent2.setPackage("com.google.android.wearable.app");
return intent2;
}
StringBuilder sb = new StringBuilder("gcore_");
sb.append(GOOGLE_PLAY_SERVICES_VERSION_CODE);
sb.append("-");
if (!TextUtils.isEmpty(str)) {
sb.append(str);
}
sb.append("-");
if (context != null) {
sb.append(context.getPackageName());
}
sb.append("-");
if (context != null) {
try {
sb.append(Wrappers.packageManager(context).getPackageInfo(context.getPackageName(), 0).versionCode);
} catch (PackageManager.NameNotFoundException unused) {
}
}
String sb2 = sb.toString();
Intent intent3 = new Intent("android.intent.action.VIEW");
Uri.Builder appendQueryParameter = Uri.parse("market://details").buildUpon().appendQueryParameter("id", "com.google.android.gms");
if (!TextUtils.isEmpty(sb2)) {
appendQueryParameter.appendQueryParameter("pcampaignid", sb2);
}
intent3.setData(appendQueryParameter.build());
intent3.setPackage("com.android.vending");
intent3.addFlags(524288);
return intent3;
}
@Nullable
@ShowFirstParty
@KeepForSdk
public PendingIntent getErrorResolutionPendingIntent(@NonNull Context context, int i, int i2, @Nullable String str) {
Intent errorResolutionIntent = getErrorResolutionIntent(context, i, str);
if (errorResolutionIntent == null) {
return null;
}
return PendingIntentCompat.getActivity(context, i2, errorResolutionIntent, 134217728, false);
}
@NonNull
@KeepForSdk
public String getErrorString(int i) {
return GooglePlayServicesUtilLight.getErrorString(i);
}
@KeepForSdk
public int isGooglePlayServicesAvailable(@NonNull Context context, int i) {
int isGooglePlayServicesAvailable = GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, isGooglePlayServicesAvailable)) {
return 18;
}
return isGooglePlayServicesAvailable;
}
@ShowFirstParty
@KeepForSdk
public boolean isPlayServicesPossiblyUpdating(@NonNull Context context, int i) {
return GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, i);
}
@ShowFirstParty
@KeepForSdk
public boolean isPlayStorePossiblyUpdating(@NonNull Context context, int i) {
return GooglePlayServicesUtilLight.isPlayStorePossiblyUpdating(context, i);
}
@KeepForSdk
public boolean isUninstalledAppPossiblyUpdating(@NonNull Context context, @NonNull String str) {
return GooglePlayServicesUtilLight.zza(context, str);
}
@KeepForSdk
public boolean isUserResolvableError(int i) {
return GooglePlayServicesUtilLight.isUserRecoverableError(i);
}
@KeepForSdk
public void verifyGooglePlayServicesIsAvailable(@NonNull Context context, int i) throws GooglePlayServicesRepairableException, GooglePlayServicesNotAvailableException {
GooglePlayServicesUtilLight.ensurePlayServicesAvailable(context, i);
}
@HideFirstParty
@KeepForSdk
public int isGooglePlayServicesAvailable(@NonNull Context context) {
return isGooglePlayServicesAvailable(context, GOOGLE_PLAY_SERVICES_VERSION_CODE);
}
@Nullable
@KeepForSdk
public PendingIntent getErrorResolutionPendingIntent(@NonNull Context context, int i, int i2) {
return getErrorResolutionPendingIntent(context, i, i2, null);
}
@Deprecated
@Nullable
@ShowFirstParty
@KeepForSdk
public Intent getErrorResolutionIntent(int i) {
return getErrorResolutionIntent(null, i, null);
}
}