mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
NotificationListener: fix EXTRA_PEOPLE handling for VoIP, it's a stringArray
This commit is contained in:
+5
-2
@@ -669,10 +669,13 @@ public class NotificationListener extends NotificationListenerService {
|
||||
}
|
||||
|
||||
// figure out sender
|
||||
String number;
|
||||
String number = null;
|
||||
String appName = NotificationUtils.getApplicationLabel(this, app);
|
||||
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)) {
|
||||
number = noti.extras.getString(Notification.EXTRA_TITLE);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user