Skip to content

Commit

Permalink
[TIMOB-20522] Improve validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Feb 21, 2018
1 parent 61e58ad commit 9712e59
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ public static boolean validVersion()

public static boolean available(Context context)
{
googleApiCode = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
if (googleApiCode == ConnectionResult.SUCCESS) {
return true;
GoogleApiAvailability availability = GoogleApiAvailability.getInstance();
if (availability != null) {
googleApiCode = availability.isGooglePlayServicesAvailable(context);
if (googleApiCode == ConnectionResult.SUCCESS) {
return true;
}
}

Log.w(TAG, "Google Play Services is not available");
Expand Down

0 comments on commit 9712e59

Please sign in to comment.