'ANR in ILocationManager.locationCallbackFinished

We see an ANR in our log. Looks like it is related to ILocationManager.locationCallbackFinished Any ideas how to workaround/fix it?

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x7289ad98 self=0xf6cbe67f7c00
  | sysTid=1244 nice=-10 cgrp=default sched=0/0 handle=0xf6cbe7d57ed0
  | state=S schedstat=( 10178736375 1748505000 11022 ) utm=904 stm=113 core=3 HZ=100
  | stack=0xfffffeea5000-0xfffffeea7000 stackSize=8192KB
  | held mutexes=
  kernel: (couldn't read /proc/self/task/1244/stack)
  native: #00 pc 000000000007f33c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  native: #01 pc 000000000014b094  /apex/com.android.runtime/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
  native: #02 pc 000000000058f9b4  /apex/com.android.runtime/lib64/libart.so (_ZN3artL12GoToRunnableEPNS_6ThreadE.llvm.1498822856213785818+460)
  native: #03 pc 000000000058f7a4  /apex/com.android.runtime/lib64/libart.so (art::JniMethodEnd(unsigned int, art::Thread*)+28)
  at android.os.BinderProxy.transactNative(Native method)
  at android.os.BinderProxy.transact(BinderProxy.java:511)
  at android.location.ILocationManager$Stub$Proxy.locationCallbackFinished(ILocationManager.java:2217)
  at android.location.LocationManager$ListenerTransport.locationCallbackFinished(LocationManager.java:373)
  at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:368)
  at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:275)
  at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:291)
  at android.os.Handler.dispatchMessage(Handler.java:107)
  at android.os.Looper.loop(Looper.java:214)
  at android.app.ActivityThread.main(ActivityThread.java:7356)
  at java.lang.reflect.Method.invoke(Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1131)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source