From 831303aea8ade404eb3819b5d15ecad4cc09c82d Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Sat, 10 Feb 2018 16:52:24 +0100 Subject: [PATCH] Fix regression introduced by 737578debcb848259e65e103ca56edbccd779cf7 With many thanks to https://github.com/80tf3262p8 who spotted the error closes #975 --- CHANGELOG.md | 3 +++ .../gadgetbridge/externalevents/NotificationListener.java | 2 +- app/src/main/res/xml/changelog_master.xml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 801bad121..d317412c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ### Changelog +#### Version next +* Fix notification deletion regression + #### Version 0.24.4 * Amazfit Bip: Fix language setting on new firmwares diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java index 7ecdeb32a..b9229f7db 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -367,7 +367,7 @@ public class NotificationListener extends NotificationListenerService { Prefs prefs = GBApplication.getPrefs(); if (prefs.getBoolean("autoremove_notifications", false)) { LOG.info("notification removed, will ask device to delete it"); - GBApplication.deviceService().onDeleteNotification(sbn.getPackageName().hashCode() * 31 + sbn.getId()); + GBApplication.deviceService().onDeleteNotification((int) sbn.getPostTime()); } } diff --git a/app/src/main/res/xml/changelog_master.xml b/app/src/main/res/xml/changelog_master.xml index 1846f3f98..67e33824e 100644 --- a/app/src/main/res/xml/changelog_master.xml +++ b/app/src/main/res/xml/changelog_master.xml @@ -1,5 +1,8 @@ + + Fix notification deletion regression + Amazfit Bip: Fix language setting on new firmwares