mirror of
https://github.com/syncthing/syncthing-android.git
synced 2025-02-04 00:01:37 +00:00
Merge pull request #546 from capi/nullpointer-onnewintent
Fix NullPointerException in onNewIntent()
This commit is contained in:
commit
dd49ef2c02
1 changed files with 4 additions and 0 deletions
|
@ -284,6 +284,10 @@ public class MainActivity extends SyncthingActivity
|
||||||
protected void onNewIntent(Intent intent) {
|
protected void onNewIntent(Intent intent) {
|
||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
|
|
||||||
|
// intent's action will be null if notification is selected
|
||||||
|
if (intent.getAction() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (intent.getAction()) {
|
switch (intent.getAction()) {
|
||||||
case ACTION_ADD_DEVICE:
|
case ACTION_ADD_DEVICE:
|
||||||
final String deviceId = intent.getStringExtra(EXTRA_DEVICE_ID);
|
final String deviceId = intent.getStringExtra(EXTRA_DEVICE_ID);
|
||||||
|
|
Loading…
Reference in a new issue