@VisibleForTesting
  public void refreshView(boolean isAccountModified) {
    List<AccountIndex> accounts = accountDb.getAccounts();
    int userCount = accounts.size();

    if (userCount > 0) {
      boolean newListRequired = isAccountModified || users.length != userCount;
      if (newListRequired) {
        users = new PinInfo[userCount];
      }

      for (int i = 0; i < userCount; ++i) {
        AccountIndex user = accounts.get(i);
        try {
          computeAndDisplayPin(user, i, false);
        } catch (OtpSourceException ignored) {
          // Ignore
        }
      }

      if (newListRequired) {
        if (actionMode != null) {
          actionMode.finish();
          actionMode = null;
        }
        // Make the list display the data from the newly created array of accounts
        // This forces the list to scroll to top.
        userAdapter = new PinListAdapter(this, R.layout.user_row, users);
        userList.setAdapter(userAdapter);
      }

      userAdapter.notifyDataSetChanged();
    } else {
      users = new PinInfo[0]; // clear any existing user PIN state
    }

    refreshLayoutByUserNumber();
    refreshFirstAccountAddedNoticeDisplay();
    refreshOrientationState();
  }
Display list of user account names and updated pin codes.

@param isAccountModified if true, force full refresh
java/com/google/android/apps/authenticator/AuthenticatorActivity.java