From e42a2965f9896f6e9795ec7f68360b56b0dbdb3f Mon Sep 17 00:00:00 2001 From: jacques Date: Sat, 14 Sep 2024 15:05:08 +0200 Subject: [PATCH] Try backup room framework (WIP) --- .../main/java/net/foucry/pilldroid/DrugListActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java index 0065261..617eb9f 100644 --- a/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java +++ b/app/src/main/java/net/foucry/pilldroid/DrugListActivity.java @@ -805,13 +805,13 @@ public class DrugListActivity extends AppCompatActivity { // startActivity(intent); // }); - Button btn_export = findViewById(R.id.switch_btn_export); + Button btn_export = dlg.findViewById(R.id.switch_btn_export); assert btn_export != null; - Button btn_import = findViewById(R.id.switch_btn_import); + Button btn_import = dlg.findViewById(R.id.switch_btn_import); assert btn_import != null; - Button btn_properties = findViewById(R.id.btn_properties); + Button btn_properties = dlg.findViewById(R.id.btn_properties); assert btn_properties != null; - Button btn_backupLocation = findViewById(R.id.btn_backup_location); + Button btn_backupLocation = dlg.findViewById(R.id.btn_backup_location); assert btn_backupLocation != null; encryptBackup = sharedPreferences.getBoolean(spEncryptBackup, true); @@ -885,6 +885,7 @@ public class DrugListActivity extends AppCompatActivity { Log.i(TAG, "ok button"); PrescriptionDatabase.getInstanceDatabase(this); + final RoomBackup roomBackup = new RoomBackup(DrugListActivity.this); if (btn_export.isEnabled()) { btn_export.setOnClickListener(v -> {