Skip to content

Fix MPRIS notification

There's this annoying error:

02-09 13:04:38.332 10970 11028 W MediaControlHelperNotificationListenerService: onNotificationPosted: can't rebuild notification from org.kde.kdeconnect_tp
te

02-09 13:04:38.611  3957  3957 E StatusBar: couldn't inflate view for notification org.kde.kdeconnect_tp/0x91b70463
02-09 13:04:38.611  3957  3957 E StatusBar: java.lang.IllegalArgumentException: setShowActionsInCompactView: action 1 out of bounds (max 0)
02-09 13:04:38.611  3957  3957 E StatusBar:     at android.app.Notification$MediaStyle.makeMediaContentView(Notification.java:7859)
02-09 13:04:38.611  3957  3957 E StatusBar:     at android.app.Notification$MediaStyle.makeContentView(Notification.java:7764)
02-09 13:04:38.611  3957  3957 E StatusBar:     at android.app.Notification$Builder.createContentView(Notification.java:4991)
02-09 13:04:38.611  3957  3957 E StatusBar:     at com.android.systemui.statusbar.notification.NotificationInflater.createContentView(NotificationInflater.java:521)
02-09 13:04:38.611  3957  3957 E StatusBar:     at com.android.systemui.statusbar.notification.NotificationInflater.createRemoteViews(NotificationInflater.java:168)
02-09 13:04:38.611  3957  3957 E StatusBar:     at com.android.systemui.statusbar.notification.NotificationInflater.access$1600(NotificationInflater.java:49)
02-09 13:04:38.611  3957  3957 E StatusBar:     at com.android.systemui.statusbar.notification.NotificationInflater$AsyncInflationTask.doInBackground(NotificationInflater.java:629)
02-09 13:04:38.611  3957  3957 E StatusBar:     at com.android.systemui.statusbar.notification.NotificationInflater$AsyncInflationTask.doInBackground(NotificationInflater.java:573)
02-09 13:04:38.611  3957  3957 E StatusBar:     at android.os.AsyncTask$2.call(AsyncTask.java:333)
02-09 13:04:38.611  3957  3957 E StatusBar:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
02-09 13:04:38.611  3957  3957 E StatusBar:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
02-09 13:04:38.611  3957  3957 E StatusBar:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
02-09 13:04:38.611  3957  3957 E StatusBar:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
02-09 13:04:38.611  3957  3957 E StatusBar:     at java.lang.Thread.run(Thread.java:764)

that happens if:

  • kdeconnect is used on Android 9+,
  • there is less than 3 media actions available.

"Seek" doesn't add notification actions, so shouldn't increment numActions.

Merge request reports

Loading