Commit 17e9892c authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fix showing callers number on Pie

parent a8bc4f24
......@@ -108,15 +108,15 @@ public class TelephonyPlugin extends Plugin {
else if (state.equals(TelephonyManager.EXTRA_STATE_OFFHOOK))
intState = TelephonyManager.CALL_STATE_OFFHOOK;
String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
if (number == null)
number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
// We will get a second broadcast with the phone number
if (!intent.hasExtra(TelephonyManager.EXTRA_INCOMING_NUMBER))
String number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
final int finalIntState = intState;
final String finalNumber = number;
if (finalIntState != lastState) {
callBroadcastReceived(finalIntState, finalNumber);
callBroadcastReceived(finalIntState, number);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment