]> git.ktnx.net Git - mobile-ledger.git/commitdiff
adjust deprecated constructor usage
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 6 Apr 2022 19:24:42 +0000 (22:24 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Wed, 6 Apr 2022 19:28:14 +0000 (19:28 +0000)
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
@@ -68,9 +68,8 @@ public class BackupsActivity extends AppCompatActivity {
         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);