NotificationListener: fix EXTRA_PEOPLE handling for VoIP, it's a stringArray

This commit is contained in:
ValdikSS
2025-07-19 23:29:21 +02:00
committed by José Rebelo
parent 16fd8cb651
commit e17612e543
@@ -669,10 +669,13 @@ public class NotificationListener extends NotificationListenerService {
} }
// figure out sender // figure out sender
String number; String number = null;
String appName = NotificationUtils.getApplicationLabel(this, app); String appName = NotificationUtils.getApplicationLabel(this, app);
if (noti.extras.containsKey(Notification.EXTRA_PEOPLE)) { if (noti.extras.containsKey(Notification.EXTRA_PEOPLE)) {
number = noti.extras.getString(Notification.EXTRA_PEOPLE); String[] people = noti.extras.getStringArray(Notification.EXTRA_PEOPLE);
if (people != null && people.length > 0 && people[0] != null) {
number = people[0];
}
} else if (noti.extras.containsKey(Notification.EXTRA_TITLE)) { } else if (noti.extras.containsKey(Notification.EXTRA_TITLE)) {
number = noti.extras.getString(Notification.EXTRA_TITLE); number = noti.extras.getString(Notification.EXTRA_TITLE);
} else { } else {