109 lines
4.3 KiB
Java
109 lines
4.3 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.zag;
|
|
import com.kofax.mobile.sdk._internal.impl.extraction.kta.KtaJsonExactionHelper;
|
|
|
|
/* 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) {
|
|
return showErrorDialogFragment(i, activity, i2, null);
|
|
}
|
|
|
|
@Deprecated
|
|
public static void showErrorNotification(int i, Context context) {
|
|
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
|
|
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, i) || GooglePlayServicesUtilLight.isPlayStorePossiblyUpdating(context, i)) {
|
|
googleApiAvailability.zaf(context);
|
|
} else {
|
|
googleApiAvailability.showErrorNotification(context, i);
|
|
}
|
|
}
|
|
|
|
@Deprecated
|
|
public static Dialog getErrorDialog(int i, Activity activity, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
|
if (true == GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
|
|
i = 18;
|
|
}
|
|
return GoogleApiAvailability.getInstance().getErrorDialog(activity, i, i2, onCancelListener);
|
|
}
|
|
|
|
@Deprecated
|
|
public static int isGooglePlayServicesAvailable(Context context, int i) {
|
|
return GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
|
|
}
|
|
|
|
@Deprecated
|
|
public static boolean showErrorDialogFragment(int i, Activity activity, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
|
return showErrorDialogFragment(i, activity, null, i2, onCancelListener);
|
|
}
|
|
|
|
public static boolean showErrorDialogFragment(int i, Activity activity, Fragment fragment, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
|
if (true == GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
|
|
i = 18;
|
|
}
|
|
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
|
|
if (fragment == null) {
|
|
return googleApiAvailability.showErrorDialogFragment(activity, i, i2, onCancelListener);
|
|
}
|
|
Dialog zaa = googleApiAvailability.zaa(activity, i, zag.zac(fragment, GoogleApiAvailability.getInstance().getErrorResolutionIntent(activity, i, KtaJsonExactionHelper.OBJECT), i2), onCancelListener);
|
|
if (zaa == null) {
|
|
return false;
|
|
}
|
|
googleApiAvailability.zad(activity, zaa, GMS_ERROR_DIALOG, onCancelListener);
|
|
return true;
|
|
}
|
|
}
|