Pebble: make the feature to automatically delete notifications from the pebble optional

(This is not pebble specific at all but as long as other devices do not use that it will stay in the Pebble specific preference screen)
master
Andreas Shimokawa 2017-01-15 00:10:40 +01:00
parent 4dfef382a9
commit ce67bf2c52
5 changed files with 16 additions and 5 deletions

View File

@ -1,13 +1,13 @@
###Changelog
####Version 0.17.0 (next)
####Version 0.17.0
* Add weather support through "Weather Notification" app
* Various fixes for K9 mail when using the generic notification receiver
* Add a preference to hide the persistent notification icon of Gadgetbridge
* Pebble: Support for build-in weather system app (FW 4.x)
* Pebble: Add weather support for various watchfaces
* Pebble: Add option to disable call display
* Pebble: Delete notifications that got dismissed on the phone
* Pebble: Add option to automatically delete notifications that got dismissed on the phone
* Pebble: Bugfix for some PebbleKit enabled 3rd party apps (TCW and maybe other)
* Pebble 2/LE: Improve reliablitly and transfer speed
* HPlus: Improved discovery and pairing

View File

@ -410,9 +410,12 @@ public class NotificationListener extends NotificationListenerService {
return;
}
LOG.info("notification removed, will ask device to delete it");
Prefs prefs = GBApplication.getPrefs();
if (prefs.getBoolean("autoremove_notifications", false)) {
LOG.info("notification removed, will ask device to delete it");
GBApplication.deviceService().onDeleteNotification((int) sbn.getPostTime()); //FIMXE: a truly unique id would be better
GBApplication.deviceService().onDeleteNotification((int) sbn.getPostTime()); //FIMXE: a truly unique id would be better
}
}
private void dumpExtras(Bundle bundle) {

View File

@ -114,6 +114,9 @@
<string name="pref_title_sunrise_sunset">Sunrise and Sunset</string>
<string name="pref_summary_sunrise_sunset">Send sunrise and sunset times based on the location to the pebble timeline</string>
<string name="pref_title_autoremove_notifications">Autoremove dismissed Notifications</string>
<string name="pref_summary_autoremove_notifications">Notifications are automatically removed from the Pebble when dismissed from the Android device</string>
<string name="pref_header_location">Location</string>
<string name="pref_title_location_aquire">Acquire Location</string>
<string name="pref_title_location_latitude">Latitude</string>

View File

@ -6,7 +6,7 @@
<change>Add a preference to hide the notification icon of Gadgetbridge</change>
<change>Pebble: Support for build-in weather system app (FW 4.x)</change>
<change>Pebble: Add weather support for various watchfaces</change>
<change>Pebble: Delete notifications that got dismissed on the phone</change>
<change>Pebble: Add option to automatically delete notifications that got dismissed on the phone</change>
<change>Pebble: Add option to disable call display</change>
<change>Pebble: Bugfix for some PebbleKit enabled 3rd party apps (TCW and maybe other)</change>
<change>Pebble 2/LE: Improve reliablitly and transfer speed</change>

View File

@ -172,6 +172,11 @@
android:title="@string/pref_title_sunrise_sunset"
android:summary="@string/pref_summary_sunrise_sunset"
android:key="send_sunrise_sunset" />
<CheckBoxPreference
android:defaultValue="false"
android:key="autoremove_notfifcations"
android:summary="@string/pref_summary_autoremove_notifications"
android:title="@string/pref_title_autoremove_notifications" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_header_activitytrackers">
<ListPreference