jimu-decompiled/sources/com/google/android/gms/common/GooglePlayServicesUtil.java
2025-05-13 19:24:51 +02:00

108 lines
4.0 KiB
Java

package com.google.android.gms.common;
import android.app.Activity;
import android.app.Dialog;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.content.res.Resources;
import androidx.fragment.app.Fragment;
import com.google.android.gms.common.internal.DialogRedirect;
/* loaded from: classes.dex */
public final class GooglePlayServicesUtil extends GooglePlayServicesUtilLight {
public static final String GMS_ERROR_DIALOG = "GooglePlayServicesErrorDialog";
@Deprecated
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
@Deprecated
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending";
private GooglePlayServicesUtil() {
}
@Deprecated
public static Dialog getErrorDialog(int i, Activity activity, int i2) {
return getErrorDialog(i, activity, i2, null);
}
@Deprecated
public static PendingIntent getErrorPendingIntent(int i, Context context, int i2) {
return GooglePlayServicesUtilLight.getErrorPendingIntent(i, context, i2);
}
@Deprecated
public static String getErrorString(int i) {
return GooglePlayServicesUtilLight.getErrorString(i);
}
public static Context getRemoteContext(Context context) {
return GooglePlayServicesUtilLight.getRemoteContext(context);
}
public static Resources getRemoteResource(Context context) {
return GooglePlayServicesUtilLight.getRemoteResource(context);
}
@Deprecated
public static int isGooglePlayServicesAvailable(Context context) {
return GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context);
}
@Deprecated
public static boolean isUserRecoverableError(int i) {
return GooglePlayServicesUtilLight.isUserRecoverableError(i);
}
@Deprecated
public static boolean showErrorDialogFragment(int i, Activity activity, int i2, DialogInterface.OnCancelListener onCancelListener) {
return showErrorDialogFragment(i, activity, null, i2, onCancelListener);
}
@Deprecated
public static void showErrorNotification(int i, Context context) {
GoogleApiAvailability a = GoogleApiAvailability.a();
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, i) || GooglePlayServicesUtilLight.isPlayStorePossiblyUpdating(context, i)) {
a.c(context);
} else {
a.b(context, i);
}
}
@Deprecated
public static Dialog getErrorDialog(int i, Activity activity, int i2, DialogInterface.OnCancelListener onCancelListener) {
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
i = 18;
}
return GoogleApiAvailability.a().a(activity, i, i2, onCancelListener);
}
@Deprecated
public static int isGooglePlayServicesAvailable(Context context, int i) {
return GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
}
public static boolean showErrorDialogFragment(int i, Activity activity, Fragment fragment, int i2, DialogInterface.OnCancelListener onCancelListener) {
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
i = 18;
}
GoogleApiAvailability a = GoogleApiAvailability.a();
if (fragment == null) {
return a.b(activity, i, i2, onCancelListener);
}
Dialog a2 = GoogleApiAvailability.a(activity, i, DialogRedirect.a(fragment, GoogleApiAvailability.a().a(activity, i, "d"), i2), onCancelListener);
if (a2 == null) {
return false;
}
GoogleApiAvailability.a(activity, a2, GMS_ERROR_DIALOG, onCancelListener);
return true;
}
@Deprecated
public static boolean showErrorDialogFragment(int i, Activity activity, int i2) {
return showErrorDialogFragment(i, activity, i2, null);
}
}