This commit is contained in:
世界 2021-04-11 02:17:01 +08:00
parent 50d7d66373
commit 579e722873
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ import android.view.WindowManager;
import androidx.annotation.Keep; import androidx.annotation.Keep;
import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.common.GoogleApiAvailabilityLight;
import com.google.android.play.core.appupdate.AppUpdateManager; import com.google.android.play.core.appupdate.AppUpdateManager;
import com.google.android.play.core.appupdate.AppUpdateManagerFactory; import com.google.android.play.core.appupdate.AppUpdateManagerFactory;
import com.google.android.play.core.install.InstallStateUpdatedListener; import com.google.android.play.core.install.InstallStateUpdatedListener;
@ -42,7 +42,7 @@ public class GcmImpl implements ExternalGcm.Interface {
public boolean checkPlayServices() { public boolean checkPlayServices() {
if (hasPlayServices != null) return hasPlayServices; if (hasPlayServices != null) return hasPlayServices;
try { try {
int resultCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(ApplicationLoader.applicationContext); int resultCode = GoogleApiAvailabilityLight.getInstance().isGooglePlayServicesAvailable(ApplicationLoader.applicationContext);
hasPlayServices = resultCode == ConnectionResult.SUCCESS; hasPlayServices = resultCode == ConnectionResult.SUCCESS;
} catch (Exception e) { } catch (Exception e) {
hasPlayServices = false; hasPlayServices = false;