mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Bangle.js: Fix crash when file save is cancelled
This commit is contained in:
parent
b7ab61f233
commit
8aa3fa3689
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user