19 Commits

Author SHA1 Message Date
tonihei
287182952d Fix the position of IntDefs to match TYPE_USE
#minor-release

PiperOrigin-RevId: 427131569
2022-02-08 11:07:50 +00:00
olly
1f7174e731 Revert of 87420e5f9bd1671cd3068185f7358f5faba53e71
PiperOrigin-RevId: 426996878
2022-02-08 11:07:43 +00:00
ibaker
87420e5f9b Fix the position of IntDefs to match TYPE_USE
#minor-release

PiperOrigin-RevId: 426855255
2022-02-07 10:49:31 +00:00
olly
596d98a048 Shorten logging tag to required length
PiperOrigin-RevId: 424858504
2022-01-28 16:51:06 +00:00
jaewan
cd56084b3e Fix flaky MediaBrowserListenerTest
MediaNotificationHandler tries to connect session in the same
process, so tests should be aware MediaControllers from the
MediaNotificationHandler.

PiperOrigin-RevId: 422330424
2022-01-25 18:34:25 +00:00
jaewan
e95b15100b Use MediaController to control sessions
This is a small refactoring toward merging
MediaNotificationHandler and PlayerNotificationManager

In detail, this CL includes following changes:
  - Use MediaController to dispatch commands to sessions in
    MediaSessionService, rather than media key events.
  - Use MediaController to monitor changes in MediaSession's
    underlying Player, rather than ForegroundServiceEventCallback.
    Removed the callback interface as well.

PiperOrigin-RevId: 422049265
2022-01-25 18:25:46 +00:00
jaewan
7756d9823d Fix NPE in MediaController's constructor
MediaController tries to release itself when the binder to the
session becomes unavailable. However, if such thing happens while
connecting in the constructor, it causes NPE when accessing
MediaControllerImpl which is only initialized after it's
connected.

This fixes random failures in existing tests.

PiperOrigin-RevId: 421423381
2022-01-25 18:00:42 +00:00
jaewan
bb81c4969d Fix missing notification of session release
A session may not notify its release back to the controller
when the controller is connecting while the session is releasing.
Here are issues in detail:
  - MediaSession doesn't respond to controller's connection
    request when it's released.
  - MediaSession discards incoming connection requests when it's
    released. The requests are only kept in the application
    looper, but the looper is cleared when the session is
    released.

This CL fixes the above issues, and fixes some flaky tests.

PiperOrigin-RevId: 419756158
2022-01-05 12:15:35 +00:00
olly
f2ad8ccd3c Shorten log tags to 23 char limit
When calling Android's Log class directly, there's a LongLogTag
lint check that detects tags over the 23 char limit, however it
cannot detect long log tags in ExoPlayer due to the way that we
log via our own Log class. This commit adds @Size annotations to
enforce the same rule.

PiperOrigin-RevId: 413976364
2021-12-07 17:37:31 +00:00
olly
c046f40fd0 Fixes for some minor misc issues
- Unnecessary deprecation suppressions
- Dead code
- Broken Javadoc

PiperOrigin-RevId: 409357884
2021-11-19 14:44:25 +00:00
tonihei
313517e092 Use app target sdk of 29 everywhere.
PiperOrigin-RevId: 407807694
2021-11-09 10:10:10 +00:00
ibaker
8b34d160dc Fix implementations of MediaLibrarySessionCallback to pass params
The documentation makes it clear this value should be propagated
through to the result.

PiperOrigin-RevId: 407085751
2021-11-09 10:09:12 +00:00
ibaker
dfb87e2161 Throw unsupported exception from deprecated MediaController methods
This is consistent with existing deprecated methods that have never been
supported on MediaController.

PiperOrigin-RevId: 407071712
2021-11-09 10:09:12 +00:00
ibaker
65c2bd981c Add missing LibraryResult type parameters
PiperOrigin-RevId: 407051126
2021-11-09 10:07:30 +00:00
ibaker
686f2ca96d Migrate usages of Window-based Player methods
Where this introduced an inconsistency (e.g. assigning to something
called `windowIndex`), I generally renamed the transitive closure of
identifiers to maintain consistency (meaning this change is quite
large). The exception is code that interacts with Timeline and Window
directly, where sometimes I kept the 'window' nomenclature.

#minor-release

PiperOrigin-RevId: 407040052
2021-11-09 10:07:30 +00:00
ibaker
a60843ead5 Migrate callers of deprecated C.java methods to Util.java
#minor-release

PiperOrigin-RevId: 406166670
2021-11-08 15:17:26 +00:00
ibaker
f37e980018 Migrate media3.session references from Window to MediaItem
#minor-release

PiperOrigin-RevId: 405927299
2021-11-08 15:13:41 +00:00
ibaker
d83fe03d88 Update most Player parameter & doc references from Window to MediaItem
Only deprecated references remain.

Usages of the deprecated methods will be migrated in a follow-up change.

#minor-release

PiperOrigin-RevId: 405927141
2021-11-08 15:12:32 +00:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00