[Android MR] Check Google Play services APK version before enabling CAF

This CL checks GMS APK version before enabling CAF. The reason is that
the current SDK version is 12.0.1, while we require the APK version to
be 12.6.0 or above to make it fully functional (this is to avoid
intializing the SDK in Activity#onCreate()).

Currently we are using a fallback implementation to check GMS APK
version. Ideally this should be done via the versioned
GoogleApiAvailability.isGooglePlayServiceAvailable() API. However this
versioned API is only added in a later version. The downstream
implementation is calling the versioned API directly.

After the upstream SDK version gets updated, we can just call the
versioned API directly.

Bug: 711860
Change-Id: Iec5f84cffcc5c55fd303255b91a7f187c79b15cb
Reviewed-on: https://chromium-review.googlesource.com/1132474
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Zhiqiang Zhang <zqzhang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574722}
2 files changed