public static boolean hasAuthenticator(final AccountManager manager) {
        if (!AUTHENTICATOR_CHECKED) {
            final AuthenticatorDescription[] types = manager
                    .getAuthenticatorTypes();
            if (types != null && types.length > 0) {
                for (AuthenticatorDescription descriptor : types) {
                    if (descriptor != null
                            && ACCOUNT_TYPE.equals(descriptor.type)) {
                        HAS_AUTHENTICATOR = BuildConfig.APPLICATION_ID.equals(descriptor.packageName);
                        break;
                    }
                }
            }
            AUTHENTICATOR_CHECKED = true;
        }

        return HAS_AUTHENTICATOR;
    }
Verify authenticator registered for account type matches the package name
of this application

@param manager
@return true is authenticator registered, false otherwise
app/src/main/java/com/github/pockethub/android/accounts/AccountUtils.java