Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2021-02-01 17:04:09 +0300
committerAleksandr Zatsepin <alexander.zatsepin@mail.ru>2021-03-30 13:59:46 +0300
commitc0eb9c743878884e745791632ba41e4342588b9e (patch)
treed83b40fbe473e48b44e8af9272e3808d5e54f24c
parentbfbef48ca7cd8e463dd044f0ddeb7898502d5f62 (diff)
[android] do not proceed null intent into broadcast receivers.
-rw-r--r--android/src/com/mapswithme/maps/background/AbstractLogBroadcastReceiver.java8
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);