From: Damyan Ivanov Date: Wed, 6 Apr 2022 19:24:42 +0000 (+0300) Subject: adjust deprecated constructor usage X-Git-Tag: v0.21.3~2 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=7be576998b7449151aabd6b2810990436beaf623;p=mobile-ledger.git adjust deprecated constructor usage --- diff --git a/app/src/main/java/net/ktnx/mobileledger/BackupsActivity.java b/app/src/main/java/net/ktnx/mobileledger/BackupsActivity.java index 242fbb56..a2b5cf6c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/BackupsActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/BackupsActivity.java @@ -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);