am 23daa441: am 8e115e64: Merge "docs: Documenting fix for CVE-2014-0224 (SSL...
am 23daa441: am 8e115e64: Merge "docs: Documenting fix for CVE-2014-0224 (SSL vulnerability)." into klp-modular-docs
* commit '23daa441':
docs: Documenting fix for CVE-2014-0224 (SSL vulnerability).
class. You can verify that the security provider is up-to-date (and update it,
if necessary) by calling
that class's <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>
<p>When you call <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a>, the
This is appropriate if user experience won't be affected by the thread blocking
while it waits for the operation to finish.</p>
<p>For example, here's an implementation of a <a href="{@docRoot}training/sync-adapters">sync adapter</a> that updates the security provider. Since a sync
adapter runs in the background, it's okay if the thread blocks while waiting
for the security provider to be updated. The sync adapter calls
<a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html##installIfNeeded(android.content.Context)">{@code installIfNeeded()}</a> to
update the security provider. If the method returns normally, the sync adapter
knows the security provider is up-to-date. If the method throws an exception,
the sync adapter can take appropriate action (such as prompting the user to
update Google Play services).</p>
<pre>/**
* Sample sync adapter using {@link ProviderInstaller}.
*/
public class SyncAdapter extends AbstractThreadedSyncAdapter {
...
// This is called each time a sync is attempted; this is okay, since the
// overhead is negligible if the security provider is up-to-date.
@Override
public void onPerformSync(Account account, Bundle extras, String authority,
That method indicates its success or failure by calling callbacks.</p>
<p>For example, here's some code that updates the security provider in an
activity in the UI thread. The activity calls <a href="{@docRoot}reference/com/google/android/gms/security/ProviderInstaller.html#installIfNeededAsync(android.content.Context, com.google.android.gms.security.ProviderInstaller.ProviderInstallListener)">{@code installIfNeededAsync()}</a>
to update the provider, and designates itself as the listener to receive success
or failure notifications. If the security provider is up-to-date or is