]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/BackupsActivity.java
adjust deprecated constructor usage
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / BackupsActivity.java
index 242fbb567be8802a2096ae33921d29ab432c45ef..a2b5cf6caae5306fe88a0e6294b88b05e28da385 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright © 2021 Damyan Ivanov.
+ * Copyright © 2022 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -68,9 +68,8 @@ public class BackupsActivity extends AppCompatActivity {
         b.restoreButton.setOnClickListener(this::restoreClicked);
 
 
         b.restoreButton.setOnClickListener(this::restoreClicked);
 
 
-        backupChooserLauncher =
-                registerForActivityResult(new ActivityResultContracts.CreateDocument(),
-                        this::storeConfig);
+        backupChooserLauncher = registerForActivityResult(
+                new ActivityResultContracts.CreateDocument("application/json"), this::storeConfig);
         restoreChooserLauncher =
                 registerForActivityResult(new ActivityResultContracts.OpenDocument(),
                         this::readConfig);
         restoreChooserLauncher =
                 registerForActivityResult(new ActivityResultContracts.OpenDocument(),
                         this::readConfig);