code: boolean isAuthorized(String accountId) {
          try {
              DataStore<StoredCredential> sc = StoredCredential.getDefaultDataStore(dataStoreFactory);
              return sc.containsKey(accountId);
          } catch (IOException e) {
              return false;
          }
      }
docs: Checks if the given account id has already been authorized and the
  user granted access to his calendars info.
  
  @param accountId
  The identifier of the account used internally by the application.
  @return {@code true} if the account has already been set up, otherwise
  {@code false}.