From 0247b2c41e0300d035554275add836b163c05f51 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 7 Nov 2015 13:18:00 +0100 Subject: [PATCH] Check for Play services --- app/src/main/java/eu/faircode/netguard/ActivityMain.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/netguard/ActivityMain.java b/app/src/main/java/eu/faircode/netguard/ActivityMain.java index d76d024d..2888660b 100644 --- a/app/src/main/java/eu/faircode/netguard/ActivityMain.java +++ b/app/src/main/java/eu/faircode/netguard/ActivityMain.java @@ -63,6 +63,8 @@ import android.widget.Toast; import com.android.vending.billing.IInAppBillingService; import com.google.android.gms.appinvite.AppInviteInvitation; +import com.google.android.gms.common.ConnectionResult; +import com.google.android.gms.common.GooglePlayServicesUtil; import org.json.JSONException; import org.json.JSONObject; @@ -480,7 +482,9 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences } }); - if (!Util.hasValidFingerprint(TAG, this) || getIntentInvite(this).resolveActivity(getPackageManager()) == null) + if (!Util.hasValidFingerprint(TAG, this) || + GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) != ConnectionResult.SUCCESS || + getIntentInvite(this).resolveActivity(getPackageManager()) == null) menu.removeItem(R.id.menu_invite); if (getIntentSupport().resolveActivity(getPackageManager()) == null)