X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FImportExportActivity.java;h=7fe893275d8397d8a1a36d354cf8518a7d42d119;hp=de4ec4779fb45350bbb5a971260a376fa07acdb8;hb=1d656c562831f535aa33903d44198dd890393f4f;hpb=d4f39c36beb5e6c3568a1e075274ad66defd8e8e diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java index de4ec477..7fe89327 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java @@ -47,11 +47,11 @@ import androidx.appcompat.app.AppCompatActivity; 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; @@ -117,8 +117,9 @@ public class ImportExportActivity extends AppCompatActivity { // 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) { @@ -132,10 +133,16 @@ public class ImportExportActivity extends AppCompatActivity { super.onCreate(savedInstanceState); // Set the content view. - setContentView(R.layout.import_export_coordinatorlayout); + if (bottomAppBar) { + setContentView(R.layout.import_export_bottom_appbar); + } else { + setContentView(R.layout.import_export_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. @@ -698,8 +705,7 @@ public class ImportExportActivity extends AppCompatActivity { // 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");