我正在获得一个电话管理器(单个或多个设备)的实例,并获得了几个ANR。我已经成功完成了大部分工作,但这个仍然存在:
*意图广播{act = android.intent.action.SCREEN_OFF flg = 0x50000010(有额外内容)
处理这个问题的最佳方法是什么?其中一些仅在应用程序打开且设备屏幕打开几个小时时才可重现。这使得很难调试这些ANR。
报告中有一部分说运行已“锁定”。如何区分这是死锁还是线程正在等待当前操作完成? callbackDataConnectionStateChanged(),refreshTelephonyState()方法是同步
"main" tid=1 Native
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 obj=0x75bf6598 self=0xb87af970
| sysTid=7874 nice=0 cgrp=default sched=0/0 handle=0xb6f90b4c
| state=S schedstat=( 54620404003 32316399006 164607 ) utm=3795 stm=1667 core=1 HZ=100
| stack=0xbe13c000-0xbe13e000 stackSize=8MB
| held mutexes=
#00 pc 0000000000016978 /system/lib/libc.so (syscall+28)
#01 pc 00000000000f5e43 /system/lib/libart.so (_ZN3art17ConditionVariable4WaitEPNS_6ThreadE+82)
#02 pc 00000000003e4da3 /system/lib/libart.so (_ZN3artL12GoToRunnableEPNS_6ThreadE+502)
#03 pc 00000000000e541d /system/lib/libart.so (_ZN3art12JniMethodEndEjPNS_6ThreadE+8)
#04 pc 0000000000f31ddd /system/framework/arm/boot.oat (Java_android_os_BinderProxy_transactNative__ILandroid_os_Parcel_2Landroid_os_Parcel_2I+152)
at android.os.BinderProxy.transactNative (Native method)
at android.os.BinderProxy.transact (Binder.java:503)
at com.android.internal.telephony.ISub$Stub$Proxy.getDefaultSubId (ISub.java:893)
at android.telephony.SubscriptionManager.getDefaultSubId (SubscriptionManager.java:992)
at android.telephony.TelephonyManager.getDefaultPhone (TelephonyManager.java:3995)
at android.telephony.TelephonyManager.getSimOperatorName (TelephonyManager.java:2152)
at com.test.api.tools.testTelephonyManager.getSimOperatorName (testTelephonyManager.java:434)
at com.test.api.DataCollector.refreshTelephonyState (DataCollector.java:1520)
- **locked** <0x0fdf1bd6> (a com.test.api.DataCollector)
at com.test.api.DataCollector.callbackDataConnectionStateChanged (DataCollector.java:675)
- **locked** <0x0fdf1bd6> (a com.test.api.DataCollector)
at com.test.api.DataCollectorSystemListener$MccServicePhoneStateListener.onDataConnectionStateChanged (DataCollectorSystemListener.java:241)
- locked <0x09fe3e57> (a com.test.api.DataCollectorSystemListener$MccServicePhoneStateListener)
at com.test.api.tools.MultiSimListener.onDataConnectionStateChanged (MultiSimListener.java:70)
at android.telephony.PhoneStateListener$1.handleMessage (PhoneStateListener.java:326)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:158)
at android.app.ActivityThread.main (ActivityThread.java:7231)
at java.lang.reflect.Method.invoke! (Native method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)