mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 03:16:51 +01:00
Fossil Hybrid HR: prevent hard crash when choosing a remote URL in FIle Mananger
This commit is contained in:
parent
2d17f06d6d
commit
91b27901e7
@ -121,9 +121,14 @@ public class FileManagementActivity extends AbstractGBActivity implements View.O
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode != REQUEST_CODE_PICK_UPLOAD_FILE) return;
|
||||
if (resultCode != RESULT_OK) return;
|
||||
|
||||
String fileName = AndroidUtils.getFilePath(this, data.getData());
|
||||
if (fileName == null) {
|
||||
String fileName;
|
||||
try {
|
||||
fileName = AndroidUtils.getFilePath(this, data.getData());
|
||||
if (fileName == null) {
|
||||
return;
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
GB.toast("please choose a local file", Toast.LENGTH_LONG, GB.WARN);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user