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).
GitHub switched their MacOS runners to ARM, which makes the Android emulator fail to start. Since we introduced the CI workflow, GitHub upgraded the Ubuntu runners as well, now supporting hardware acceleration. This means we no longer need MacOS. The Ubuntu runner is also about 2 times faster.
Before when refreshing any feed(s) without network the refresh indicator
stayed indefinitely.
This was also the case if you were on mobile, trying to refresh a need
and in the popup selected "don't update over mobile".
When playback is started while an Android Auto projection is active, we want to
prevent automatic sleep timer from starting.
Note: the androidx.car.app library has not seen a full release since 1.2.0. We opted to use a release candidate here, which has a downgraded minSdk requirement, compatible with the current minSdk of AntennaPod at the time this dependency is introduced.
- Run Checkstyle with gradle to make it easier for users
- No longer needs different configuration for new code
- Exclude current violations
- Fix some violations that somehow couldn't be specified in the exclusion file
- Print SpotBugs/Lint/Checkstly violations in GitHub format
- Then the CI run gets annotated on the web UI
- When checking whether there is a subscription, there is no need to create feed objects (plus counters etc). Just the number of episodes is enough.
- Downloads section only needs to load the items it actually displays.
- No need to load FeedMedia, just to load FeedItem including the same FeedMedia afterwards.
- No need to convert columns to Strings and back to Longs.
- No need to join favorites when we are only interested in the list of IDs anyway.