mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-12-23 03:11:30 +00:00
Fix potential NPE in ShareActivity (#1839)
This commit is contained in:
parent
fb5ba8b73e
commit
30ce89b9ee
1 changed files with 2 additions and 2 deletions
|
@ -119,11 +119,11 @@ public class ShareActivity extends StateDialogActivity
|
|||
|
||||
// TODO: add support for EXTRA_TEXT (notes, memos sharing)
|
||||
ArrayList<Uri> extrasToCopy = new ArrayList<>();
|
||||
if (getIntent().getAction().equals(Intent.ACTION_SEND)) {
|
||||
if (Intent.ACTION_SEND.equals(getIntent().getAction())) {
|
||||
Uri uri = getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
|
||||
if (uri != null)
|
||||
extrasToCopy.add(uri);
|
||||
} else if (getIntent().getAction().equals(Intent.ACTION_SEND_MULTIPLE)) {
|
||||
} else if (Intent.ACTION_SEND_MULTIPLE.equals(getIntent().getAction())) {
|
||||
ArrayList<Uri> extras = getIntent().getParcelableArrayListExtra(Intent.EXTRA_STREAM);
|
||||
if (extras != null)
|
||||
extrasToCopy = extras;
|
||||
|
|
Loading…
Reference in a new issue