Boolean (@Nullable String password, boolean rememberByDefault) { // if password saving is disabled, don't show the checkbox. if (PasswordSafe.getInstance().isMemoryOnly()) { return null; } // if password is prefilled, it is expected to continue remembering it. if (!StringUtil.isEmptyOrSpaces(password)) { return true; } return rememberByDefault; }