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
* changes:
Make dispatchAudioRoutesChanged be called when BT A2DP status changed
Revert "Disable selecting the default audio route when a BT route is avaiable"
Otherwise we'll miss a trick and not take the settings provider
shortcut for playing work ringtones.
Bug: 30658854
Change-Id: I378cabe0ba426a2c91919b3df33a525d41fe3d0d
Update Java serialization code to allow interacting with native
serialization code. One notable change is due to the fact that
properties of non-primitive types can not be read back by native code,
the properties are serialized in two versions: one only contains
properties having primitive types, and another contains all
the properties. The latter is ignored by native code.
Bug: 25945784
Test: using a PoC app
Change-Id: I047a5bdec3006bcbce34c1c63aa7746e01f7a71e