Search in sources :

Example 1 with Callback

use of org.wordpress.android.ui.accounts.SmartLockHelper.Callback in project WordPress-Android by wordpress-mobile.

the class SignInActivity method onConnected.

@Override
public void onConnected(Bundle bundle) {
    AppLog.d(T.NUX, "Google API client connected");
    SignInFragment signInFragment = (SignInFragment) getSupportFragmentManager().findFragmentByTag(SignInFragment.TAG);
    // empty).
    if (signInFragment != null && signInFragment.canAutofillUsernameAndPassword()) {
        mSmartLockHelper.smartLockAutoFill(new Callback() {

            @Override
            public void onCredentialRetrieved(Credential credential) {
                SignInFragment signInFragment = (SignInFragment) getSupportFragmentManager().findFragmentByTag(SignInFragment.TAG);
                if (signInFragment != null) {
                    signInFragment.onCredentialRetrieved(credential);
                }
            }
        });
    }
}
Also used : Credential(com.google.android.gms.auth.api.credentials.Credential) Callback(org.wordpress.android.ui.accounts.SmartLockHelper.Callback)

Aggregations

Credential (com.google.android.gms.auth.api.credentials.Credential)1 Callback (org.wordpress.android.ui.accounts.SmartLockHelper.Callback)1