- We had buildAddRequest and sendNewDownload. Converged to
buildAddDownload and sendAddDownload.
- Also fixed a few more inconsistencies, and brought the
action constants into line as well.
PiperOrigin-RevId: 244274041
We currently do manual position tracking while the player is in error mode.
This is to allow an initial seek to the new position when trying to re-prepare.
Instead, we can just use our player.retry method and remove the tracking code.
PiperOrigin-RevId: 243819580
- It can work with any DownloadIndex
- Also simplify things to not require that it's registered
as a DownloadManager listener by someone else
PiperOrigin-RevId: 243697352
- Expose constructors that take DatabaseProvider. Deprecate those
that do not.
- Expose Cache.getUid. This will likely be used for naming of the
tables accessed by DefaultDownloadIndex .
PiperOrigin-RevId: 243637786
- Allows enforcing immutability, which in a future CL will allow
avoiding allocating a new array/list on every call.
- Also some left over doc cleanup from the DownloadState rename.
PiperOrigin-RevId: 243627352
It's a transient state whose only use is when passing a removed
download to onDownloadStateChanged. It's a bit strange to have it
as a proper state, since we end up asserting that it's an invalid
value in other places.
This change adds an explicit onDownloadRemoved, which allows
removal of the transient STATE_REMOVED, related assertions, and
uncertainty when dealing with an @State variable whether it's
necessary to handle it being STATE_REMOVED.
PiperOrigin-RevId: 242444128
This simplifies the DownloadHelper code in the demo app and is generally
useful for more specific updates with SelectionOverrides.
PiperOrigin-RevId: 238228276
SQLiteException is a runtime exception, which makes it easy to
forget to handle it. This change converts SQLiteExceptions into
a checked exception, which is then handled appropriately.
PiperOrigin-RevId: 237038793
We currrently just inherit the acitivity's alertDialogTheme style (which
is equivalent to ThemeOverlay.AppCompat.Dialog.Alert). Using the theme
overlay directly and also force-enable the title such that the title is
shown even if the activity disabled the title.
PiperOrigin-RevId: 237012601
The release needs to post to the MediaSource thread and also needs to post
back to the DownloadHelper thread to prevent sending updates after release has
been called. The point where we release the downloadHelper also needs to
dismiss the dialog in case the creation has already been queued before the
release.
PiperOrigin-RevId: 236652309
They are currently broken because we ignore downloads without periods.
As the DownloadHelper doesn't create periods for progressive media, we don't
download them. Fixing by starting download automatically without showing
track selection dialog.
PiperOrigin-RevId: 236120202
Horizontal orientation doesn't make sense. I thought about
overriding the setter to throw something, but it's probably
not worth the extra lines.
PiperOrigin-RevId: 234632530
The system may destroy views at any time and may not have created the view
at all. Use the state saved in the fragment to be independant of the existance
of the view.
PiperOrigin-RevId: 234156285
TrackSelectionView requires an initialization with a call to init(...).
That's why we shouldn't let the view retain its view hierarchy automatically
as the views won't be backed by data if restored. Instead add a listener
which lets the containing activity/fragment save and restore the state if
needed.
PiperOrigin-RevId: 234152491
AlertDialog owns its view, which causes problems with TabLayout on API 21
and 22. Now using AppCompatDialog instead so that we can own the view
ourselves.
Also:
- Renamed layout files from download_xyz to track_selection_xyz.
- Added OK and Cancel buttons to the view.
- Applied alert dialog style to the "normal" dialog to get a nicer UI.
PiperOrigin-RevId: 233944647
We need additional initial selection settings and a configurable title.
The update logic for the track selection parameters moved to a static helper
method in TrackSelectionDialog.
PiperOrigin-RevId: 233713788