/*
- * Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2018-2022 Soren Stoutner <soren@stoutner.com>.
*
- * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
*
- * Privacy Browser is free software: you can redistribute it and/or modify
+ * Privacy Browser Android is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * Privacy Browser is distributed in the hope that it will be useful,
+ * Privacy Browser Android is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>.
+ * along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>.
*/
package com.stoutner.privacybrowser.activities;
// Define the saved instance state constants.
private final String ENCRYPTION_PASSWORD_TEXTINPUTLAYOUT_VISIBILITY = "encryption_password_textinputlayout_visibility";
- private final String KITKAT_PASSWORD_ENCRYPTED_TEXTVIEW_VISIBILITY = "kitkat_password_encrypted_textview_visibility";
private final String OPEN_KEYCHAIN_REQUIRED_TEXTVIEW_VISIBILITY = "open_keychain_required_textview_visibility";
private final String FILE_LOCATION_CARD_VIEW = "file_location_card_view";
private final String FILE_NAME_LINEARLAYOUT_VISIBILITY = "file_name_linearlayout_visibility";
Spinner encryptionSpinner;
TextInputLayout encryptionPasswordTextInputLayout;
EditText encryptionPasswordEditText;
- TextView kitKatPasswordEncryptionTextView;
TextView openKeychainRequiredTextView;
CardView fileLocationCardView;
RadioButton importRadioButton;
case NO_ENCRYPTION:
// Hide the unneeded layout items.
encryptionPasswordTextInputLayout.setVisibility(View.GONE);
- kitKatPasswordEncryptionTextView.setVisibility(View.GONE);
openKeychainRequiredTextView.setVisibility(View.GONE);
openKeychainImportInstructionsTextView.setVisibility(View.GONE);
case OPENPGP_ENCRYPTION:
// Hide the password encryption layout items.
encryptionPasswordTextInputLayout.setVisibility(View.GONE);
- kitKatPasswordEncryptionTextView.setVisibility(View.GONE);
// Updated items based on the installation status of OpenKeychain.
if (openKeychainInstalled) { // OpenKeychain is installed.
if (savedInstanceState == null) { // The app has not been restarted.
// Initially hide the unneeded views.
encryptionPasswordTextInputLayout.setVisibility(View.GONE);
- kitKatPasswordEncryptionTextView.setVisibility(View.GONE);
openKeychainRequiredTextView.setVisibility(View.GONE);
fileNameLinearLayout.setVisibility(View.GONE);
openKeychainImportInstructionsTextView.setVisibility(View.GONE);
} else { // The app has been restarted.
// Restore the visibility of the views.
encryptionPasswordTextInputLayout.setVisibility(savedInstanceState.getInt(ENCRYPTION_PASSWORD_TEXTINPUTLAYOUT_VISIBILITY));
- kitKatPasswordEncryptionTextView.setVisibility(savedInstanceState.getInt(KITKAT_PASSWORD_ENCRYPTED_TEXTVIEW_VISIBILITY));
openKeychainRequiredTextView.setVisibility(savedInstanceState.getInt(OPEN_KEYCHAIN_REQUIRED_TEXTVIEW_VISIBILITY));
fileLocationCardView.setVisibility(savedInstanceState.getInt(FILE_LOCATION_CARD_VIEW));
fileNameLinearLayout.setVisibility(savedInstanceState.getInt(FILE_NAME_LINEARLAYOUT_VISIBILITY));
// Save the visibility of the views.
savedInstanceState.putInt(ENCRYPTION_PASSWORD_TEXTINPUTLAYOUT_VISIBILITY, encryptionPasswordTextInputLayout.getVisibility());
- savedInstanceState.putInt(KITKAT_PASSWORD_ENCRYPTED_TEXTVIEW_VISIBILITY, kitKatPasswordEncryptionTextView.getVisibility());
savedInstanceState.putInt(OPEN_KEYCHAIN_REQUIRED_TEXTVIEW_VISIBILITY, openKeychainRequiredTextView.getVisibility());
savedInstanceState.putInt(FILE_LOCATION_CARD_VIEW, fileLocationCardView.getVisibility());
savedInstanceState.putInt(FILE_NAME_LINEARLAYOUT_VISIBILITY, fileNameLinearLayout.getVisibility());