LAMW: bug in jTelephonyManager.java ? lazarus / 43-Android ---------------------------------------------------------------------- Manlio · 2019-12-17 14:00 I don't understand the big picture here, but this looks like a bug to me: When the Phone call state changes to Idle, the pascal code is never called. The reason seems to be this: First, isPhoneCalling is set to false, like this:     @Override     public void onCallStateChanged(int state, String incomingNumber) {         isPhoneCalling = false; Afterwards, when the even is CALL_STATE_IDLE, isPhoneCalling is checked, but because the value will always be false, nothing happens.            case TelephonyManager.CALL_STATE_IDLE:                  if (isPhoneCalling) { etc. } Do we really need to check isPhoneCalling ? Anyway it would be great if someone who understands things better than me can give another look at this code... thanks!!