X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FImportExportActivity.java;h=e3324295d6e8bae171f07e26fb0f46f57be70e76;hb=cd609c9888924549c03cd6509ed889cdb052d5bb;hp=1d000e381e36697ff3778a8d77371e1e93f55d98;hpb=7e0198f9aef9900b2c400b278e08f3e8273f2593;p=PrivacyBrowserAndroid.git 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 1d000e38..e3324295 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/ImportExportActivity.java @@ -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_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. @@ -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");