title: How to fix this AndroidANR？
body: <p>TraceFile of mainThread:(This call stack is from system library, and the mainThread seems to be locked)</p>
  
  <pre><code>"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x7454c5c8 self=0xb4cb6500
  | sysTid=11238 nice=0 cgrp=default sched=0/0 handle=0xb6f19b34
  | state=S schedstat=( 111248118635 36668819001 451360 ) utm=7881 stm=3243 core=0 HZ=100
  | stack=0xbe1a4000-0xbe1a6000 stackSize=8MB
  | held mutexes=
  kernel: (couldn't read /proc/self/task/11238/stack)
  native: #00 pc 00017640  /system/lib/libc.so (syscall+28)
  native: #01 pc 000f6e09  /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+96)
  native: #02 pc 00291bb3  /system/lib/libart.so (_ZN3art3JNI16CallObjectMethodEP7_JNIEnvP8_jobjectP10_jmethodIDz+658)
  native: #03 pc 00002bbb  /system/lib/libnativehelper.so (jniGetReferent+94)
  native: #04 pc 000af741  /system/lib/libandroid_runtime.so (???)
  native: #05 pc 00012e93  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+530)
  native: #06 pc 00012f63  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+130)
  native: #07 pc 00086b0d  /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
  native: #08 pc 0000055d  /data/dalvik-cache/arm/system@framework@boot.oat (Java_android_os_MessageQueue_nativePollOnce__JI+96)
  at android.os.MessageQueue.nativePollOnce(Native method)
  at android.os.MessageQueue.next(MessageQueue.java:323)
  at android.os.Looper.loop(Looper.java:141)
  at android.app.ActivityThread.main(ActivityThread.java:5653)
  at java.lang.reflect.Method.invoke!(Native method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:746)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
  </code></pre>
  
  <p>adbLog File of this ANR:</p>
  
  <pre><code>08-24 19:06:55.611  1751  1814 E ActivityManager: ANR in com.
  08-24 19:06:55.611  1751  1814 E ActivityManager: PID: 11220
  08-24 19:06:55.611  1751  1814 E ActivityManager: Reason: Input dispatching timed out (com, Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over 500.0ms ago.  Wait queue length: 46.  Wait queue head age: 5508.2ms.)
  08-24 19:06:55.611  1751  1814 E ActivityManager: Load: 11.81 / 11.91 / 11.85
  08-24 19:06:55.611  1751  1814 E ActivityManager: CPU usage from 666215ms to 0ms ago:
  08-24 19:06:55.611  1751  1814 E ActivityManager:   62% 562/sensors.qcom: 50% user + 11% kernel / faults: 198 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   9.5% 1751/system_server: 6.2% user + 3.3% kernel / faults: 5363 minor 2 major
  08-24 19:06:55.611  1751  1814 E ActivityManager:   1.8% 1465/kworker/u:1: 0% user + 1.8% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   1.7% 30539/kworker/u:5: 0% user + 1.7% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   1.7% 10878/kworker/u:3: 0% user + 1.7% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   1.7% 4805/kworker/u:2: 0% user + 1.7% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   1.6% 12028/com.navi.tracker:remote: 1.3% user + 0.3% kernel / faults: 3968 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   1% 347/mediaserver: 0.2% user + 0.8% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.9% 4977/mpdecision: 0% user + 0.8% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.8% 222/logd: 0.5% user + 0.3% kernel / faults: 19 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.6% 7/kworker/u:0H: 0% user + 0.6% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.6% 208/ueventd: 0.2% user + 0.4% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.6% 427/irq/33-cpubw_hw: 0% user + 0.6% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.6% 11973/com.navi.tracker: 0.4% user + 0.2% kernel / faults: 1345 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.6% 3745/com.android.phone: 0.4% user + 0.2% kernel / faults: 2342 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.5% 2791/com.android.systemui: 0.3% user + 0.1% kernel / faults: 973 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.5% 276/surfaceflinger: 0.2% user + 0.3% kernel / faults: 5 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.5% 2747/MC_Thread: 0% user + 0.5% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.4% 3543/com.xiaomi.metoknlp: 0.3% user + 0.1% kernel / faults: 1652 minor
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.3% 3/ksoftirqd/0: 0% user + 0.3% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.3% 163/cfinteractive: 0% user + 0.3% kernel
  08-24 19:06:55.611  1751  1814 E ActivityManager:   0.3% 26051/kworker/3:1H: 0% user + 0.3% kernel
  </code></pre>
  
  <p>I suspect that the cpu is overloaded, Has anyone seen a similar problem? Please give your help, thanks.</p>