Force update on media session sensor when a session is in progress (#3652)

* Force update on media session sensor when a session is in progress

* Switch logic to only update when media is actively playing
This commit is contained in:
Daniel Shokouhi 2023-07-11 11:16:23 -07:00 committed by GitHub
parent f17a9d338d
commit 23c35af6a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -282,7 +282,8 @@ class NotificationSensorManager : NotificationListenerService(), SensorManager {
mediaSession,
primaryPlaybackState,
mediaSession.statelessIcon,
attr
attr,
forceUpdate = primaryPlaybackState == "Playing"
)
}