fixed npe when OS invokes StartConversationsActivity with null action

This commit is contained in:
Daniel Gultsch 2018-04-20 11:32:50 +02:00
parent cccb3772cf
commit 1615aeff87
1 changed files with 5 additions and 1 deletions

View File

@ -745,7 +745,11 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
return invite.invite(); return invite.invite();
} }
} }
switch (intent.getAction()) { final String action = intent.getAction();
if (action == null) {
return false;
}
switch (action) {
case Intent.ACTION_SENDTO: case Intent.ACTION_SENDTO:
case Intent.ACTION_VIEW: case Intent.ACTION_VIEW:
Uri uri = intent.getData(); Uri uri = intent.getData();