mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00

As reported in Issue: androidx/media#1493 we already use `HEADSETHOOK` to start waiting for a double-tap, but we don't consider it for the second tap. Similarly, we previously considered `PLAY` for the second tap, but not the first. Only `HEADSETHOOK` and `PLAY_PAUSE` are [documented](https://developer.android.com/reference/androidx/media3/session/MediaSession#media-key-events-mapping) to transform double-tap to `seekToNext`. So this change removes the `PLAY` detection from the second tap. PiperOrigin-RevId: 651017522 (cherry picked from commit c64dacf3df9097dc2c4535674a31dac4f568d344)
Session test module
Tests cross-process use of the session module. To run the tests:
- Prepare a device (either an emulator or a real device) to run the tests on.
- Run
./gradlew :test-session-current:cAT