The only allowed format - usage pairs are currently:
* PRIVATE with USAGE_GPU_SAMPLED_IMAGE
* PRIVATE with USAGE_VIDEO_ENCODE
* PRIVATE with USAGE_GPU_SAMPLED_IMAGE | USAGE_VIDEO_ENCODE
* Non-PRIVATE with USAGE_CPU_READ_RARELY
* Non-PRIVATE with USAGE_CPU_READ_OFTEN
This commit enable other cases, ie. PRIVATE with
GRALLOC_USAGE_HW_COMPOSER.
Bug: 77148005
Test: Manually tested it.
Change-Id: I414c25bc62d52a3573461df6cec4d88512509ec4
PlayerEventCallback#onSeekCompleted() will be called when the
MediaPlayerBase#seekTo() is completed. Following callbacks are also
added to listen the event.
- SessionCallback#onSeekCompleted()
- ControllerCallback#onSeekCompleted()
Bug: 74370608
Test: Build
Change-Id: Ib1ecd75f7e217ed9a927db3ab443073a1aef2074
This CL removes code that directly casts int[] to long[] and instead
iterates through the individual values and casts to int if necessary.
They are cast to integer because StripOffsets/StripByteCounts
Attributes can return either int[] or long[] values, but the maximum
length of a file that ExifInterface can handle is the maximum value
of integer, so it should be safe to cast the long values to integer
values.
Bug: 73091048
Test: Cts
Change-Id: I9f3b98204e0829a8a8a30927bb8c0a698c457654
If MtpService stops before MtpServer
shuts down, the server will be null,
so don't attempt to use it in that
case.
Bug: 76433619
Test: no errors
Change-Id: I6744cb78908e6a0663a4b60107d5c9c18dda62bb
Provide a way for a custom MediaPlaylistAgent to tell which
MediaItem2 maps to the DataSourceDesc from the
MediaPlayerBase#PlayerEventCallback.
Bug: 74316764, Bug: 75500592
Test: Run CTS with MediaComponents/runcts.sh
Change-Id: I45c9893bf74b2635f31949be537885a79860cfb3
* Add AudioSystem.FOR_VIBRATE_RINGING mode to match the native layer
AUDIO_POLICY_FORCE_FOR_VIBRATE_RINGING force mode
* Switch to this mode when Bluetooth SCO is connected
* Modify AudioService.muteRingerModeStreams() method to not mute ringer
volume when Bluetooth SCO is ON. Also, when ringer is unmuted, mirror
speaker ringtone volume on Bluetooth SCO ringer
Bug: 72647074
Test: Call phone in vibration mode and hear ringtone on HFP enabled
headset, verify that ringtone is only played through headset.
Then disconnect headset and call again to verify that ringtone
does not play through phone speaker in vibration mode.
Change-Id: I7d642020710c085f0e1f27c750c74b0e2fb57398
bug: 76125031
Test: push some HEIC files with rotation to sdcard, and query
the content provider to see the orientation field is set.
Change-Id: I8235cbcd2aad2f0088d771ee53d2ca87cd85800d
Adds additional documentation that clarifies how to set up CryptoInfo
objects for CENC 2016 decryption schemes, in particular for the case of
HLS SAMPLE-AES Audio.
Bug: 62503021
Test: make docs
Change-Id: Ia21ef62a4144e7b41b0216ba0b968ff6c52d0297
The current model for setting up a functionfs
function is:
UsbDeviceManager#setCurrentFunctions() ->
intent is sent to MtpReceiver to write the descriptors ->
init/hal waits for descriptors to write, then pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
The main downside of this is a lack of reliability because
the Mtp process could be killed at any point. Normally, a
gadget is unbound if its control endpoint is closed. no_disconnect
works around this, but is still a little janky. In addition, the
extra intent delays the startup of the gadget.
With the new model, UsbDeviceManager writes the descriptors
on initialization. Since it is a system service, it won't be killed.
UsbDeviceManager#setCurrentFunctions() ->
init/hal pulls up gadget ->
Gadget is configured, a USB_STATE intent starts MtpServer
MtpServer calls UsbManager#getControlFd to get a dup of the control
endpoint.
Also modify permissions so system server can access mtp files.
Bug: 72877174
Test: Change usb configurations to ptp/mtp
Change-Id: Id17d2b5930f4e1f37ec1b4f00add9d594174ad49