1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-24 19:06:53 +01:00

Bangle.js: Fix crash when file save is cancelled

This commit is contained in:
José Rebelo 2024-03-16 18:42:16 +00:00 committed by José Rebelo
parent b7ab61f233
commit 8aa3fa3689

View File

@ -315,6 +315,10 @@ public class AppsManagementActivity extends AbstractGBActivity {
fileChooserCallback = null; fileChooserCallback = null;
} }
if (requestCode == CREATE_FILE) { // showSaveFileDialog if (requestCode == CREATE_FILE) { // showSaveFileDialog
if (resultCode == Activity.RESULT_CANCELED || intent == null || intent.getData() == null) {
return;
}
OutputStream os = null; OutputStream os = null;
try { try {
os = getContentResolver().openOutputStream(intent.getData()); os = getContentResolver().openOutputStream(intent.getData());