Commit Graph

12 Commits

Author SHA1 Message Date
Hugh Daschbach d734953b54
Replace deprecated SimpleExoPlayer with ExoPlayer.
This is part of an effort to resolve deprecation warnings.

Most of this is simple refactoring of interfaces that change between
the two Player implementations.  There are a few other changes that
deserve further explanation.

Testing indicated that the play/pause button was being reset to pause
in MainActivity:refreshCurrentTrack.  In the past this was likely
masked by the ordering of other callbacks.  We have removed the
nowPlayingToggle.icon update from MainActivity, leaving that UI update
to PlayerService.

One of the bigger refactorings in PlayerService was forced by the
deprecation of Player.EventListener.onPlayerStateChanged.  That forced
separation of handling playWhenReady and playbackState transitions.
In the SimpleExoPlayer implementations, where these transitions were
combined, the module attempted to work out playing state from a
combination of these two state variables.

In addition to separating the reaction to these state changes, we have
added a listener to onIsPlayingChanged, eliminating the need for some
of the earlier logic in Player.EventListener.onPlayerStateChanged.
This addition, along with the separation of state transition
processing, seems to provide a simpler implementation.  But it is,
certainly, a possible source of bugs.
2022-12-06 09:35:33 +01:00
Hugh Daschbach 79e27578e5 Fix issue #124 - empty queue on restart.
The Gson deserializer required parameter is a reader object.  It
silently fails when passed a string.
2022-07-21 11:15:54 +00:00
Ryan Harg 70d9ba241b Fix "A resource failed to call close." warnings. 2022-06-12 12:48:32 +00:00
Ryan Harg ef3387dee0
Fix existing linting problems 2021-09-09 09:56:15 +02:00
Ryan Harg 94ac0c6b85
Upgrading Android Gradle Plugin
- Also moving some model classes
2021-08-22 09:48:36 +02:00
Ryan Harg f3c7a865d2
74: Improve logging code 2021-08-13 15:04:49 +02:00
Ryan Harg c8382495ea 74: Add logs for queue management 2021-08-13 12:55:38 +00:00
Ryan Harg a9319b88b0 #7: Add Koin as dependency injection library 2021-08-09 04:50:46 +00:00
Ryan Harg e60d93a05a #7: Add unit tests to OAuthDatasource 2021-07-30 08:57:49 +00:00
Ryan Harg fcfc30a97e #48: Implement OAuth2 authentication 2021-07-23 12:10:13 +00:00
Ryan Harg d2497c7217 Remove build warnings 2021-07-21 07:11:44 +00:00
Ryan Harg 208c7e584b
Change base package name from org to audio 2021-07-12 10:14:26 +02:00