mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 11:26:47 +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,11 +121,16 @@ public class FileManagementActivity extends AbstractGBActivity implements View.O
|
|||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
if (requestCode != REQUEST_CODE_PICK_UPLOAD_FILE) return;
|
if (requestCode != REQUEST_CODE_PICK_UPLOAD_FILE) return;
|
||||||
if (resultCode != RESULT_OK) return;
|
if (resultCode != RESULT_OK) return;
|
||||||
|
String fileName;
|
||||||
String fileName = AndroidUtils.getFilePath(this, data.getData());
|
try {
|
||||||
|
fileName = AndroidUtils.getFilePath(this, data.getData());
|
||||||
if (fileName == null) {
|
if (fileName == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
GB.toast("please choose a local file", Toast.LENGTH_LONG, GB.WARN);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!warningDisplayed) {
|
if (!warningDisplayed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user