The original API used a callback where the caller needed to specify the
icons of the menu items. However, the manager can find them on it's own.
Since the callback was never used for anything else, I also removed it,
which now means the ToolbarIconTintManager can now be used on it's own
instead of instantiating an anonymous class that only overwrites the
callback.
There has been some regression that the error icon in the drawer was
just a circle instead of the the exclamation mark.
The error occurred because the icon was modified to have a background
circle once it was added to the subscription screens. However, in the
drawer a icon tint was applied which now also tinted the background
and made now only the background show.
On the search screen there was always the message "no results found"
even before anything was ever searched and the message was repeated
beneath it if really nothing was found by the app.
Users had a hard time understanding that automatic deletion and episode cleanup are two different things.
Maybe that is because in German, both got translated to the exact same string.
Now both are next to each other and the titles are updated, so that it hopefully causes less confusion.
Previously the MediaSession object created in PlaybackService in onCreate would
be completely empty. This seemed to confuse Android Auto, and prevented it from
restarting playback.
Filling the MediaSession object using the data from the player state at
onCreate resolves this problem.
This is documented in Android Auto docs[1], albeit indirectly and somewhat
confusingly.
Also move the setSessionToken call to the end of onCreate handler to ensure
that the media session has already been completely filled by the time the
session token is made available to the framework. There is no evidence that
this is required; however intuitively, this is likely the trigger for the
framework to start querying the media session.
The change was tested both with Desktop Head Unit and with a real vehicle.
[1] https://developer.android.com/training/cars/media/#initial-playback-state
If only some chapters have images the other chapters don't display
anything but reserve space for the image.
Now those chapters display the image of the episode. If no chapters have
images no images will be displayed (just like before).
Before 5218e06904, deleting an item
loaded its state from the database again. Now it stores the state
of that object. markItemPlayed() did not reset the object's playback
position, so when auto-delete was enabled, the position was overwritten again.