Fixed warnings in logs for formatted notifications

This commit is contained in:
jens 2025-05-01 16:07:22 +02:00
parent f04c517c80
commit e8524f719f
2 changed files with 4 additions and 3 deletions

View File

@ -146,13 +146,13 @@ public class NotificationListener extends NotificationListenerService// implemen
try
{
if (extras.containsKey(EXTRA_TEXT))
text = extras.getString(EXTRA_TEXT).toString();
text = String.valueOf(extras.getCharSequence(EXTRA_TEXT));
}
catch (NullPointerException e)
{
// in stacked notifications the "surrounding" element has no text, only a title
if (extras.containsKey(EXTRA_TEXT) && extras.get(EXTRA_TEXT) != null)
text = extras.get(EXTRA_TEXT).toString();
text = String.valueOf(extras.getCharSequence(EXTRA_TEXT));
}
SimpleNotification returnNotification = new SimpleNotification();

View File

@ -1,3 +1,4 @@
* Fixed: Crash when triggering a URL without parameter pairs
* Fixed: When checking for battery charging type "any" the trigger didn't fire.
* Added: Settings to turn on/off console logging (logcat)
* Fixed: Fixed warnings in logs for formatted notifications
* Added: Setting to turn on/off console logging (logcat)