mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-03-13 01:30:09 +01:00
Fix phone calls from Fossify Phone
This commit is contained in:
parent
fb05459422
commit
bfb4a236f6
@ -131,6 +131,15 @@ public class NotificationListener extends NotificationListenerService {
|
||||
add("mikado.bizcalpro");
|
||||
}};
|
||||
|
||||
private static final Set<String> PHONE_CALL_APPS = new HashSet<String>() {{
|
||||
add("com.android.dialer");
|
||||
add("com.android.incallui");
|
||||
add("com.asus.asusincallui");
|
||||
add("com.google.android.dialer");
|
||||
add("com.samsung.android.incallui");
|
||||
add("org.fossify.phone");
|
||||
}};
|
||||
|
||||
public static final ArrayList<String> notificationStack = new ArrayList<>();
|
||||
private static final ArrayList<Integer> notificationsActive = new ArrayList<>();
|
||||
|
||||
@ -617,9 +626,8 @@ public class NotificationListener extends NotificationListenerService {
|
||||
|
||||
private void handleCallNotification(StatusBarNotification sbn) {
|
||||
String app = sbn.getPackageName();
|
||||
LOG.debug("got call from: " + app);
|
||||
if (app.equals("com.android.dialer") || app.equals("com.android.incallui") || app.equals("com.google.android.dialer") || app.equals("com.asus.asusincallui") || app.equals("com.samsung.android.incallui")) {
|
||||
LOG.debug("Ignoring non-voip call");
|
||||
LOG.debug("got call from: {}", app);
|
||||
if (PHONE_CALL_APPS.contains(app)) {
|
||||
return;
|
||||
}
|
||||
Notification noti = sbn.getNotification();
|
||||
|
Loading…
x
Reference in New Issue
Block a user