2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Hack to fix "low battery" notification spam

When two phones were paired together and notification sync enabled, one
phone was receiving the notification again and again from the other, which
made obvious that it was being sent over and over.
This commit is contained in:
Albert Vaca
2016-03-07 15:46:43 -08:00
parent b45a15c822
commit 36e8d14973

View File

@@ -173,6 +173,13 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
return;
}
if ("com.android.systemui".equals(packageName) &&
"low_battery".equals(statusBarNotification.getTag()))
{
//HACK: Android low battery notification are posted again every few seconds. Ignore them, as we already have a battery indicator.
return;
}
if (packageName.equals("com.google.android.googlequicksearchbox")) {
//HACK: Hide Google Now notifications that keep constantly popping up (and without text because we don't know how to read them properly)
return;