mirror of https://github.com/NekoX-Dev/NekoX.git
Fix gcm
This commit is contained in:
parent
50d7d66373
commit
579e722873
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue