1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +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;
}
if (requestCode == CREATE_FILE) { // showSaveFileDialog
if (resultCode == Activity.RESULT_CANCELED || intent == null || intent.getData() == null) {
return;
}
OutputStream os = null;
try {
os = getContentResolver().openOutputStream(intent.getData());