diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2021-02-01 17:04:09 +0300 |
---|---|---|
committer | Aleksandr Zatsepin <alexander.zatsepin@mail.ru> | 2021-03-30 13:59:46 +0300 |
commit | c0eb9c743878884e745791632ba41e4342588b9e (patch) | |
tree | d83b40fbe473e48b44e8af9272e3808d5e54f24c | |
parent | bfbef48ca7cd8e463dd044f0ddeb7898502d5f62 (diff) |
[android] do not proceed null intent into broadcast receivers.
-rw-r--r-- | android/src/com/mapswithme/maps/background/AbstractLogBroadcastReceiver.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/android/src/com/mapswithme/maps/background/AbstractLogBroadcastReceiver.java b/android/src/com/mapswithme/maps/background/AbstractLogBroadcastReceiver.java index 7ed48c9c3c..84fa4842b4 100644 --- a/android/src/com/mapswithme/maps/background/AbstractLogBroadcastReceiver.java +++ b/android/src/com/mapswithme/maps/background/AbstractLogBroadcastReceiver.java @@ -21,7 +21,13 @@ public abstract class AbstractLogBroadcastReceiver extends BroadcastReceiver @Override public final void onReceive(Context context, Intent intent) { - String action = intent != null ? intent.getAction() : null; + if (intent == null) + { + LOGGER.w(getTag(), "An intent with null intent detected"); + return; + } + + String action = intent.getAction(); if (!TextUtils.equals(getAssertAction(), action)) { LOGGER.w(getTag(), "An intent with wrong action detected: " + action); |