First this commit improves the threshold at which the icon color is
changed. We now ask the collapsing toolbar at which size it will be
collapsed instead of guessing.
Second, this commit also sets the appbar title (when collapsed) to the
podcast name in the podcast episode view.
* Improve search bar design on add podcast screen
The search bar now looks more up to date with modern android styles.
* Fix colorPrimaryContainer in default color schemes
The color should be usable as the background for containers with a tint
of the accent color, but it was set to the full accent color.
Now it is much more in line with how it should work.
If the user hasn't subscribed to any podcasts a welcome segment is
shown on the homescreen. However, the scrollview with a refresh below
was still there which was not only useless but could trigger an refresh
at the wrong position and also tint the app bar.
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.