Silence exception in NotificatonsPlugin
AbandonedPublic

Authored by nicolasfella on Dec 27 2017, 6:13 PM.

Details

Reviewers
albertvaka
Group Reviewers
KDE Connect
Summary

A NullpointerException occured when service.getActiveNotifications() returns null.

Diff Detail

Repository
R225 KDE Connect - Android application
Branch
fix
Lint
No Linters Available
Unit
No Unit Test Coverage
nicolasfella requested review of this revision.Dec 27 2017, 6:13 PM
nicolasfella created this revision.
nicolasfella retitled this revision from Silence exception in NotificatonsPlugin A NullpointerException occured when service.getActiveNotifications() returns null. to Silence exception in NotificatonsPlugin.Dec 27 2017, 6:14 PM
nicolasfella edited the summary of this revision. (Show Details)
nicolasfella added a reviewer: KDE Connect.
nicolasfella added a project: KDE Connect.
nicolasfella added a subscriber: KDE Connect.
albertvaka accepted this revision.Dec 27 2017, 9:57 PM
This revision is now accepted and ready to land.Dec 27 2017, 9:57 PM

We get null here because the NotificationListenerService is not ready yet, according to the Android docs. Are you sure this is the correct solution? Maybe we should wait until we get the onListenerConnected signal?

I've had some problems lately with receiving notifications lately, although I'm not sure this is related to the (now suppressed) exception.

We get null here because the NotificationListenerService is not ready yet, according to the Android docs. Are you sure this is the correct solution? Maybe we should wait until we get the onListenerConnected signal?

I've had some problems lately with receiving notifications lately, although I'm not sure this is related to the (now suppressed) exception.

Good point. I took this into account while creating D9558, so this patch isn't needed anymore.

Your issues might be related to https://bugs.kde.org/show_bug.cgi?id=386246

nicolasfella abandoned this revision.Dec 29 2017, 11:10 PM