import androidx.appcompat.widget.Toolbar;
import androidx.cardview.widget.CardView;
import androidx.core.content.FileProvider;
-import androidx.multidex.BuildConfig;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout;
+import com.stoutner.privacybrowser.BuildConfig;
import com.stoutner.privacybrowser.R;
import com.stoutner.privacybrowser.helpers.ImportExportDatabaseHelper;
// Get a handle for the shared preferences.
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
- // Get the screenshot preference.
- boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false);
+ // Get the preferences.
+ boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+ boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
// Disable screenshots if not allowed.
if (!allowScreenshots) {
super.onCreate(savedInstanceState);
// Set the content view.
- setContentView(R.layout.import_export_coordinatorlayout);
+ if (bottomAppBar) {
+ setContentView(R.layout.import_export_coordinatorlayout_bottom_appbar);
+ } else {
+ setContentView(R.layout.import_export_coordinatorlayout_top_appbar);
+ }
- // Set the support action bar.
+ // Get a handle for the toolbar.
Toolbar toolbar = findViewById(R.id.import_export_toolbar);
+
+ // Set the support action bar.
setSupportActionBar(toolbar);
// Get a handle for the action bar.
// Close the streams.
inputStream.close();
- temporaryPgpEncryptedImportFileOutputStream.flush();
-
+ temporaryPgpEncryptedImportFileOutputStream.close();
// Create an decryption intent for OpenKeychain.
Intent openKeychainDecryptIntent = new Intent("org.sufficientlysecure.keychain.action.DECRYPT_DATA");