Я получаю эту ошибку ANR, когда экран телефона выключается, и я снова включаю его, приложение выполняет запись, но когда я выключаю экран, приложение зависло и показывает диалоговое окно anr
E/ActivityManager: ANR in com.example.iotsmarthouses (com.example.iotsmarthouses/.Activities.MainActivity)
PID: 3448
Reason: Input dispatching timed out (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: 3. Wait queue head age: 5803.8ms.)
Load: 0.48 / 0.28 / 0.22
CPU usage from 74907ms to 0ms ago (2020-05-02 10:37:09.155 to 2020-05-02 10:38:24.062):
3.7% 519/system_server: 2.1% user + 1.6% kernel / faults: 16227 minor
3.3% 404/surfaceflinger: 1.6% user + 1.6% kernel / faults: 112 minor
2.3% 334/local_opengl: 0% user + 2.2% kernel / faults: 501 minor
2.2% 391/android.hardware.graphics.composer@2.1-service: 0.2% user + 1.9% kernel / faults: 23 minor
1% 165/adbd: 0.4% user + 0.6% kernel / faults: 61096 minor
0.8% 675/com.android.systemui: 0.5% user + 0.2% kernel / faults: 568 minor
0.6% 398/audioserver: 0.2% user + 0.3% kernel / faults: 4 minor
0.6% 384/android.hardware.audio@2.0-service: 0% user + 0.5% kernel / faults: 13 minor
0.6% 159/redis: 0.4% user + 0.1% kernel
0.5% 7/rcu_preempt: 0% user + 0.5% kernel
0.4% 389/android.hardware.gnss@1.0-service: 0% user + 0.3% kernel
0.4% 1400/com.android.launcher3: 0.2% user + 0.2% kernel / faults: 556 minor
0.3% 396/android.hardware.sensors@1.0-service: 0% user + 0.3% kernel
0.3% 3370/com.example.myapplication: 0.2% user + 0.1% kernel / faults: 466 minor
0.2% 338/batteryd: 0% user + 0.1% kernel
0.1% 392/android.hardware.health@2.0-service.genymotion: 0% user + 0.1% kernel
0.1% 133/logd: 0% user + 0.1% kernel / faults: 10 minor
0.1% 2845/kworker/u8:2: 0% user + 0.1% kernel
0.1% 20/ksoftirqd/3: 0% user + 0.1% kernel
0% 1768/com.android.packageinstaller: 0% user + 0% kernel / faults: 487 minor
0% 667/com.android.inputmethod.latin: 0% user + 0% kernel / faults: 103 minor
0% 131/jbd2/sdb3-8: 0% user + 0% kernel
0% 390/android.hardware.graphics.allocator@2.0-service: 0% user + 0% kernel / faults: 25 minor
0% 839/com.android.phone: 0% user + 0% kernel / faults: 41 minor
0% 6/kworker/u8:0: 0% user + 0% kernel
0% 12/ksoftirqd/1: 0% user + 0% kernel
0% 339/netd: 0% user + 0% kernel / faults: 23 minor
0% 373/logcat: 0% user + 0% kernel
0% 402/network_profile: 0% user + 0% kernel
0% 406/vinput: 0% user + 0% kernel
0% 444/wificond: 0% user + 0% kernel
0% 3/ksoftirqd/0: 0% user + 0% kernel
0% 16/ksoftirqd/2: 0% user + 0% kernel
0% 134/servicemanager: 0% user + 0% kernel
0% 175/mdnsd: 0% user + 0% kernel
0% 257/hostapd: 0% user + 0% kernel
0% 340/zygote: 0% user + 0% kernel / faults: 132 minor
0% 393/android.hardware.light@2.0-service: 0% user + 0% kernel
0% 394/android.hardware.memtrack@1.0-service: 0% user + 0% kernel
0% 395/android.hardware.power@1.0-service: 0% user + 0% kernel
0% 397/android.hardware.wifi@1.0-service: 0% user + 0% kernel
0% 442/statsd: 0% user + 0% kernel
0% 448/rild: 0% user + 0% kernel
0% 683/wpa_supplicant: 0% user + 0% kernel
0% 2734/kworker/3:1: 0% user + 0% kernel
0% 3161/kworker/1:1: 0% user + 0% kernel
+0% 3445/kworker/u8:1: 0% user + 0% kernel
+0% 3448/com.example.iotsmarthouses: 0% user + 0% kernel
+0% 3504/logcat: 0% user + 0% kernel
5.9% TOTAL: 3.5% user + 1.9% kernel + 0% iowait + 0.4% softirq
CPU usage from 10ms to 267ms later (2020-05-02 10:38:24.072 to 2020-05-02 10:38:24.329):
30% 519/system_server: 25% user + 4.3% kernel / faults: 377 minor
17% 529/HeapTaskDaemon: 17% user + 0% kernel
12% 546/ActivityManager: 12% user + 0% kernel
4.3% 526/ReferenceQueueD: 0% user + 4.3% kernel
4.7% 3448/com.example.iotsmarthouses: 4.7% user + 0% kernel / faults: 5 minor
+0% 3509/Binder:3448_4: 0% user + 0% kernel
9.9% TOTAL: 7.9% user + 1.9% kernel
E/EGL_emulation: tid 2169: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
я знаю это будет происходить в тяжелом потоке пользовательского интерфейса, но я не знаю, почему, когда экран мобильного телефона включился, это произошло