User app will cause ANR, when try to answer a ringing call

24 views
Skip to first unread message

Stelep Lc

unread,
Sep 26, 2016, 1:27:48 AM9/26/16
to android-platform
We found a issue that on Android M: user app will cause ANR, when try to answer a ringing call, it's the code:
    TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);  
    Class c = Class.forName(tm.getClass().getName());
    c.getMethod("answerRingingcall").invoke();
The answerRingingcall method is implemented in PhoneInterfaceMananger.java(/packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java), I was confused that, the request will be waiting until someone call request.notify(), but I didn't find a notify method called in MainThreadHandler.handleMessage() for message CMD_ANSWER_RINGING_CALL. I think it's the reason why the app cause ANR error.

Reply all
Reply to author
Forward
0 new messages