public boolean update(
    AccountIndex index, String secret, OtpType type, Integer counter, Boolean googleAccount) {
    Preconditions.checkNotNull(index);
    Log.d(LOCAL_TAG, "Updating account: " + index);

    ContentValues values = newContentValuesWith(secret, type, counter, googleAccount);
    int affectedRows = mDatabase.update(TABLE_NAME, values, whereClause(index), null);
    if (affectedRows > 1) {
      Log.wtf(LOCAL_TAG, "Unexpectedly changed multiple rows during update. Database consistent: " +
          isDbConsistent());
    }
    return  affectedRows > 0;
  }
Updates the account with the specified {@link AccountIndex} using the provided
values.

@param index the {@link AccountIndex} pointing to the account to be updated
@param secret the new secret key, or use {@code null} to preserve the current one
@param type the new {@link OtpType}, hotp vs totp, or {@code null} to leave unchanged
@param counter only important for the hotp type. Set to {@code null} to leave unchanged
@param googleAccount whether the key is for a Google Account or {@code null} to leave unchanged

@return whether the update was successful
java/com/google/android/apps/authenticator/otp/AccountDb.java