Code example for AtomicInteger

0
 
    private static boolean AUTHENTICATOR_CHECKED;
 
    private static boolean HAS_AUTHENTICATOR;
 
    private static final AtomicInteger UPDATE_COUNT = new AtomicInteger(0);
 
    private static class AuthenticatorConflictException extends IOException {
 
        private static final long serialVersionUID = 641279204734869183L;
    } 
 
    /** 
     * Verify authenticator registered for account type matches the package name 
     * of this application 
     * 
     * @param manager 
     * @return true is authenticator registered, false otherwise 
     */ 
    public static boolean hasAuthenticator(final AccountManager manager) {
        if (!AUTHENTICATOR_CHECKED) {