The only dependencies that are not updated are the ones that need
to be kept in sync with other system (like Android source tree) or
would require a Kotlin dependency in common or exoplayer modules.
As a side effect, some demo apps now need a Kotlin config and some
additional modules require desugaring/multidex logic. To simplify
the setup, the desugaring and multidex steps are added to the common
config.
PiperOrigin-RevId: 527243950
Also fixed the javadoc link in devsite and removed javadoc links from decoder extensions as it is not published yet on developer.android.com.
#minor-release
PiperOrigin-RevId: 520636868
These have the same value (`-1`), and basically the same meaning (offset
in an array/list/file/byte stream/etc), but 'position' is an overloaded
term in a media playback library, and there's a risk people assume that
methods like `Player.getCurrentPosition()` may return
`C.POSITION_UNSET`, when in fact unset media times (whether duration or
position) are always represented by `C.TIME_UNSET` which is a) a `long`
(not `int`) and b) a different underlying value. (aside:
`getCurrentPosition()` never returns an unset value, but it's a good
example of the ambiguity of the word 'position' between 'byte offset'
and 'media timestamp'.)
PiperOrigin-RevId: 492493102
Representing HTTP headers in a `java.util.Map` is error-prone, because
the names (keys) need to be case-insensitive (per
[RFC 2616 section 4.2](https://datatracker.ietf.org/doc/html/rfc2616#section-4.2))
but this is fundamentally technically incompatible with the `Map`
interface (e.g. with headers `{"key": ["val_1", "val_2"]}` then
`get("key")` and `get("KeY")` both return the same list, but `size()`
returns `1`). It also breaks as soon as you copy the `Map` into a
non-case-insensitive (i.e. normal) `Map` implementation, e.g. Guava's
`ImmutableMap`. It's risky that a line as 'innocent' as
`ImmutableMap.copyOf(headers)` could break things so badly.
For now it's enough to keep this field unstable (it's currently the only
reference to HTTP headers in the stable API). We can consider
stabilising an improved HTTP header representation in future.
PiperOrigin-RevId: 450708598
Before this change, we list the formats for which we don't
want transcoding. This change disables transcoding altogether.
This was tested by checking that transcoding takes place on a
short camera recording only when the added flag is not present
(and AndroidManifest does not declare support for HEVC).
PiperOrigin-RevId: 446986580
This ensures Kotlin usages of these IntDef annotations in the 'old'
position will continue to compile.
'Frequently used' is a subjective judgement. I have a parallel change
that marks all the other public IntDefs in the library as TYPE_USE
(those that I've judged to be 'rarely used' by apps).
A follow-up change will fix the positions of existing usages to be as if
they're only TYPE_USE.
#minor-release
PiperOrigin-RevId: 426427334
This is a breaking change if the annotation itself is in use in Kotlin
code. It's judged that the IntDefs in this commit are unlikely to be
referred to often in Kotlin code. This is because they're either:
- Related to esoteric parts of the library, or
- In a common part of the library but only returned from methods (and
never passed to callback methods).
A follow-up change will fix the positions of existing usages to match
this new config.
#minor-release
PiperOrigin-RevId: 426410237
The Robolectric implementation of HttpURLConnection forwards to the JRE
implementation [1], which behaves differently to the Android one
available on devices and emulators. For these tests to be a realistic
test of the HTTP stack used in real playbacks we can't use Robolectric.
Similar to d1e12dcddf
[1] https://github.com/robolectric/robolectric/issues/6769#issuecomment-943556156
PiperOrigin-RevId: 416013662
Robolectric uses the JRE HttpURLConnection [1], while real Android
devices and emulators use OkHttp to implement HttpURLConnection. This
can lead to important differences in behaviour, so it's better to use
instrumentation tests when specific HTTP behaviour is important.
[1] https://github.com/robolectric/robolectric/issues/6769#issuecomment-943556156
PiperOrigin-RevId: 408840295