mapbox / mapbox-android-demo

Google Play demo app for the Mapbox Maps SDK for Android
https://play.google.com/store/apps/details?id=com.mapbox.mapboxandroiddemo
BSD 2-Clause "Simplified" License
720 stars 493 forks source link

IntentFilter warnings on each network requests #1159

Open LukasPaczos opened 5 years ago

LukasPaczos commented 5 years ago

When scrolling the map, each network requests sent from core results in a warning log:

1180-5873/? W/ActivityManager: Receiver with filter android.content.IntentFilter@fe11c8c already registered for pid 13630, callerPackage is com.mapbox.mapboxandroiddemo.debug
13630-13766/com.mapbox.mapboxandroiddemo.debug V/Mbgl-HttpRequest: [HTTP] Request was successful (code = 200).
1180-5873/? W/ActivityManager: Receiver with filter android.content.IntentFilter@9d3ffd5 already registered for pid 13630, callerPackage is com.mapbox.mapboxandroiddemo.debug
13630-13763/com.mapbox.mapboxandroiddemo.debug V/Mbgl-HttpRequest: [HTTP] Request was successful (code = 200).
1180-3691/? W/ActivityManager: Receiver with filter android.content.IntentFilter@af503ea already registered for pid 13630, callerPackage is com.mapbox.mapboxandroiddemo.debug
13630-13766/com.mapbox.mapboxandroiddemo.debug V/Mbgl-HttpRequest: [HTTP] Request was successful (code = 200).
1180-3691/? W/ActivityManager: Receiver with filter android.content.IntentFilter@28026db already registered for pid 13630, callerPackage is com.mapbox.mapboxandroiddemo.debug
13630-13763/com.mapbox.mapboxandroiddemo.debug V/Mbgl-HttpRequest: [HTTP] Request was successful (code = 200).

It feels like a red-herring but definitely correlates. I wasn't able to narrow down where do those logs come from.

langsmith commented 4 years ago

Comes from https://github.com/mapbox/mapbox-android-demo/pull/1012, where setUpTileLoadingMeasurement() was added to the MapboxApplication class: https://github.com/mapbox/mapbox-android-demo/blob/master/MapboxAndroidDemo/src/global/java/com/mapbox/mapboxandroiddemo/MapboxApplication.java#L44-L48

Will work on a pr to adjust if possible

langsmith commented 4 years ago

Comes from #1012, where setUpTileLoadingMeasurement() was added to the MapboxApplication class

The filter warning doesn't appear in the logcat when I comment out this method, fresh install on my phone, open an example, and then pan around to load tiles.

langsmith commented 4 years ago

I haven't found much. The ActivityManager: Receiver with filter.... log message seems to come from ActivityManagerService#registerReceiver():

https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/am/ActivityManagerService.java#14539