From 7be576998b7449151aabd6b2810990436beaf623 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Wed, 6 Apr 2022 22:24:42 +0300 Subject: [PATCH] adjust deprecated constructor usage --- .../main/java/net/ktnx/mobileledger/BackupsActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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); -- 2.39.5