The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.
Test: passed ExifInterface CTS
Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
The IFD entry has a 4-byte field COUNT. It is read as int type
and is used as array size by ExifInterface. If a crafted JPEG
file contains a negative value, a NegativeArraySizeException
occurs.
Change-Id: Ief29936400f04636928df09e7f357cbf25345383
Signed-off-by: NIEJuhu <niejuhu@xiaomi.com>
Deprecate methods where stream types are not used for
volume control operations.
Add a warning in the logs about the use of stream
types to encourage migration to audio attributes.
Since STREAM_ACCESSIBILITY is added in O for the
volume of a11y audio, throw an exception when
trying to use it for playback.
Test: make offline-sdk-docs
Bug: 30955183
Change-Id: I7fcf79f1de68f217a9b19561aa1325ade169dfcf
AudioManager:
- add missing references to STREAM_ACCESSIBILITY
- add STREAM_ACCESSIBILITY in getDevicesForStream() method
(this method is only ever called for STREAM_MUSIC)
Test: make offline-sdk-docs
Bug: 30448020
Change-Id: I449082ff01e9822e7e7dca69762c197468237d67
VolumePolicy: define two a11y modes: 1/ legacy where
a11y volume aliases to media volume, 2/ a11y where
the a11y volume is independent from any other stream
type volume.
Refactor accessibility service listening to accomodate
communicating to the volume controller when the
a11y service is running.
Make accessibility stream alias conditional on a11y
service running. Reflect the behavior in the
volume controller.
Test: enable Talkback and verify logs in Vol controller
Bug 30448020
Change-Id: I80535ba259a22b6d93e62a7b3ca462a19d4c84b7
New stream type for accessibility volume.
Add related appOps.
Test: see added CTS tests in AudioManagerTest & Stub
Bug 30448020
Change-Id: I34f96713b22fedf75322b8ffe2b96a7c566f5009
Modified the signature of the abstract volume methods so
it is clear at the subclass level whether the volume
command is for a mute or a volume control.
Changed the implementations in the subclasses
accordingly.
Removed appOps handling inside SoundPool and made it
inherit from PlayerBase.
Moved handling of the camera sound restriction from
SoundPool to PlayerBase.
Added support in SoundPool native implementation for
muting, as each player has its own volume.
Test: play a long file with SoundPool and enter DnD mode
Bug: 30955183
Bug: 28249605
Change-Id: I0fcd7480f9a455c06aa4f7092486f5c65bc9d7db
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.
In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces. It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.
This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into. Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.
Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
voice recognition: it is always available
camcorder: "main microphone" doesn't mean anything
communication: there is no requirement for this source
to behave like the default preset.
Test: make offline-sdk-docs
Bug: 32451872
Change-Id: I1a2f196977e547feebb031a98b0f0e560f0557d5
This breaks a local refcount cycle and allows the Java gc to finalize
the Ringtone and MediaPlayer objects quickly.
Bug: 31811091
Change-Id: I0e5a4a78fdc02cc0c8b7811a1f1a45db3c90a0ff
Fix javadoc for stream types to indicate they are only used for
volume, not to identify streams of audio.
Do not reference AudioSystem in SDK doc.
Test: make offline-sdk-docs
Change-Id: Id7b84db1f22841c47e9d580c9f71f7765c498b9d
The USB data transfer is disabled we should not allow access MTP devices
(e.g.
usb sticks). We have two ways of accessing them: Either by mounting them
or by creating a MTPDevice in an app.
Of course an app could implement implement their own MTPDevice
implementation. In this case we cannot enforce the policy without
completely suppressing all MTP USB devices which would be too
restrictive.
Note: When the policy is set we do _not_ disconnect already connected
MTP devices
Fixes: 31472955
Change-Id: I6080c48c49657102774b2b3b4d89ff030245a266
A couple of MIDI device's properties (related to ALSA) are of int type
and can't be transferred as a string. Fixed the code.
As we whitelist properties that can go into native, there is no need to
expect other type of properties besides ints and strings.
Bug: 25945784
Change-Id: I008731d0ffee60c31be0bfddb15dcd1425e4b88e
Test: using a PoC app