277056 Commits

Author SHA1 Message Date
Pavlin Radoslavov
60d704f841 Add Bluetooth Codec selection UI to the Developer Options
Test: A2DP streaming to headsets and manual UI interaction
Bug: 30958229
Change-Id: I88f6efedf1c89b524c863543135ef7be9b7e1a7c
2017-01-06 15:44:27 -08:00
Treehugger Robot
ddc7ac8ba6 Merge "Unversion NDK stub libraries." 2017-01-06 20:44:19 +00:00
Dan Albert
98e462df7d Unversion NDK stub libraries.
The system versions of these libraries aren't versioned yet.

Bug: https://github.com/android-ndk/ndk/issues/278
Test: make ndk
Change-Id: I74e988be8f60f8728a0bfa7360091cbd9f5b1186
2017-01-06 11:04:14 -08:00
Ruchi Kandoi
cc4203221b Merge "nfc: Adds NFC_PAYMENT_DEFAULT_COMPONENT to the backed up settings." 2017-01-06 18:49:45 +00:00
Ruchi Kandoi
104e0b4399 nfc: Adds NFC_PAYMENT_DEFAULT_COMPONENT to the backed up settings.
Bug: 32881476
Test: Manual; backup, change settings, restore

Change-Id: Ibc31b23f632c50a2c7120734fc96e7d855df062e
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2017-01-06 18:48:51 +00:00
Yohann Roussel
43c98c74fe Merge "Fix LOCAL_SDK_VERSION of 3 multidex apks" 2017-01-06 09:29:26 +00:00
Treehugger Robot
616910fd53 Merge "Prevent LocalSocket from creating an fd if fd is already there" 2017-01-06 01:29:47 +00:00
Treehugger Robot
9ec4fec5ca Merge "HwBinder: get/register checked exceptions." 2017-01-06 00:58:17 +00:00
Treehugger Robot
1d8995aa9c Merge "Fix stack-buffer-overflow detected by AddressSanitizer." 2017-01-06 00:17:00 +00:00
Treehugger Robot
48eecdcbc4 Merge "Fix NetworkScorerAppManager#isCallerActiveScorer." 2017-01-05 23:57:54 +00:00
Ajay Panicker
7a8c36aa4e Prevent LocalSocket from creating an fd if fd is already there
Any LocalSocket created with a FileDescriptor will throw IOExceptions
when performing most opperations due to the fact that the LocalSocket
tries to create an implementation but fails since there is a FileDescriptor
already set.

Bug: 34095140
Test: Setup using tap&go
Change-Id: Ie8f50def6156c16617697d939d6c0ab570281642
2017-01-05 23:52:30 +00:00
Amin Shaikh
2cd918a63e Fix NetworkScorerAppManager#isCallerActiveScorer.
The current implementation checks whether the caller's uid has the
SCORE_NETWORKS permission instead of checking the passed in callingUid. I
removed this check entirely because the getActiveScorer method already checks
whether the scorer's package has the SCORE_NETWORKS permission. There is no way
callingUid can equal the active scoring package's uid without also having the
SCORE_NETWORKS permission.

Bug: 34107721
Test: runtest --path core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
Change-Id: Ifd427792169837c84a10a76b208c76137db06ae9
2017-01-05 14:28:47 -08:00
Treehugger Robot
1fe99a819c Merge "Use half-width quotes in code example." 2017-01-05 21:39:06 +00:00
Evgenii Stepanov
ab622718f3 Fix stack-buffer-overflow detected by AddressSanitizer.
Bug: 31855186
Test: boot SANITIZE_TARGET=address build
Change-Id: I5c2c64564ccea28e416d66b27af9d86506d622ce
2017-01-05 13:03:07 -08:00
Xin Li
5c14ebbbfa Use half-width quotes in code example.
Test: m -j49 -k docs
BUG: 34106216
Change-Id: I366b0bf085ad3fd166b7961301bb8c35da6a7630
2017-01-05 11:49:43 -08:00
Steven Moreland
c0631d0bb7 HwBinder: get/register checked exceptions.
Bug: 33673120
Test: hidl_test_java
Change-Id: Id19b61b252e756a032ae11f7b59bd8eed82edbe9
2017-01-05 09:20:44 -08:00
Martijn Coenen
33bd8a97b3 Merge "Callback elision for HIDL interfaces." 2017-01-05 09:40:57 +00:00
Treehugger Robot
fd6f631de5 Merge "Synchronize access to WebViewZygote." 2017-01-05 09:21:00 +00:00
Martijn Coenen
52280c38e2 Callback elision for HIDL interfaces.
Test: mma, hidl_test_java
Bug: 31380743
Change-Id: I9a5c8ef0cc6ac3150395a867690ca82ec2bc419f
2017-01-05 08:48:15 +01:00
Treehugger Robot
3c050268f0 Merge "Integration of the LDAC codec for A2DP source" 2017-01-05 07:43:50 +00:00
Pavlin Radoslavov
fad8b730d2 Integration of the LDAC codec for A2DP source
The codec can be used if the encoding shared library is installed
on the device:
 libldacBT_enc.so

Test: A2DP streaming to LDAC headsets
Bug: 30958229

Change-Id: I524805fd308b5181427515617eda05625a7c4ae5
2017-01-04 18:07:29 -08:00
Treehugger Robot
5242acbd0b Merge "Integration of the aptX and aptX-HD codecs for A2DP source" 2017-01-05 01:56:35 +00:00
Pavlin Radoslavov
feeb9b245c Integration of the aptX and aptX-HD codecs for A2DP source
Each of the codecs can be used if the corresponding encoding
shared library is installed on the device:
 - aptX: libaptX.so
 - aptX-HD: libaptXHD.so

Test: A2DP streaming to aptX and aptX-HD headsets
Bug: 30958229
Change-Id: I24faddc8cd88ae3e1370922c633f30e13124a867
2017-01-04 16:30:35 -08:00
Treehugger Robot
a54d76a81f Merge "Defining a new REQUEST_NETWORK_SCORES permission." 2017-01-04 23:04:47 +00:00
Treehugger Robot
5b4aec1dc6 Merge "Fix NetworkScoreServiceTest.testSystemRunning." 2017-01-04 22:43:35 +00:00
Treehugger Robot
34d46ca94c Merge "Use the new BIND_NETWORK_RECOMMENDATION_SERVICE." 2017-01-04 21:35:04 +00:00
Jeremy Joslin
97e711139d Defining a new REQUEST_NETWORK_SCORES permission.
This is intended to be a drop-in replacement for the existing
BROADCAST_NETWORK_PRIVILEGED with a more appropriate name.

Test: Built, ran.
BUG: 33752149
Change-Id: Iebe9d1c12f159bd91953ef094d9866eba9ff925a
Merged-In: I12bdba9694fdf2a2e39990736265919edafd865e
2017-01-04 13:30:07 -08:00
Jeremy Joslin
b17a5edb65 Fix NetworkScoreServiceTest.testSystemRunning.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33905890
Change-Id: Icc1db79cde26f1445ca925780ff760b7aa0515b1
Merged-In: Idc92fe3669b0efdb20d3899ce4ce7bae70033aff
2017-01-04 13:25:58 -08:00
Jeremy Joslin
c02fd4ea78 Use the new BIND_NETWORK_RECOMMENDATION_SERVICE.
Declare that the system uses the new
BIND_NETWORK_RECOMMENDATION_SERVICE permission.

Test: Built & ran
BUG: 33897544
Change-Id: I43424642a631f58da3a065f8221e351180f4f221
Merged-In: I41c7550adf0d1f81ed9a12068ba569e6a57f3b42
2017-01-04 11:46:06 -08:00
Treehugger Robot
944b017031 Merge "Expose RecommendationRequest.Builder as SystemApi." 2017-01-04 19:42:17 +00:00
Marie Janssen
c77074300b Merge "Bluetooth: don't output dumpsys info twice" 2017-01-04 19:07:18 +00:00
Marie Janssen
f5ec538f27 Bluetooth: don't output dumpsys info twice
Dumpsys info was printed in the "Application Services" section as well
as the bluetooth_manager section.  Add an argument to print so it prints
from here, and doesn't in the other section.

Test: run a bugreport, check in "APP SERVICES" section
Bug: 29356402
Change-Id: I8adedaeac54c9a538c581459654dbdf96361e046
2017-01-04 11:06:27 -08:00
Joe LaPenna
010e8b0dc8 Expose RecommendationRequest.Builder as SystemApi.
In order to test our recommender, we need to be able to create
network recommendation requests.

Test: make update-api
Change-Id: I68df0d3e684bcdb90709a34478d2aa669ee23547
Merged-In: I68df0d3e684bcdb90709a34478d2aa669ee23547
2017-01-04 10:15:52 -08:00
Treehugger Robot
c7c899bbe2 Merge "Fix NullPointerException in MediaPlayer" 2017-01-04 17:23:07 +00:00
Treehugger Robot
871beedc6d Merge "New permission - BIND_NETWORK_RECOMMENDATION_SERVICE." 2017-01-04 15:24:30 +00:00
Treehugger Robot
75ba827a4e Merge "Set isConnected, isBound, implCreated on server-side LocalSockets" 2017-01-04 12:26:49 +00:00
Neil Fuller
b08c7bc0bd Set isConnected, isBound, implCreated on server-side LocalSockets
Previously LocalServerSocket.accept() would return a LocalSocket
instance with isConnected, isBound and implCreated set to false.
[implCreated determines whether impl.create() needs to called].

A socket created via accept() in this way is implicitly bound
and connected. impl.create() does not need to be called because
impl.accept(LocalSocketImpl s) is called instead and has the same
effect (s.fd and s.mFdCreatedInternally set correctly).

This change modifies the behavior so that the flags are now all
set to true in this case and isBound() and isConnected() will
now return the correct answer.

Attempts to call bind() and connect() will still throw
IOException as before, but with a different exception message.

Correctly setting implCreated in LocalSocket means that
LocalSocketImpl.create() will no longer be called for accept()
created sockets and no longer needs to treat the "fd != null"
case as a no-op: we can now assert that there must be no fd set
when create() is called as we will no longer call it with sockets
created using accept().

Bug: https://code.google.com/p/android/issues/detail?id=35942
Test: Device boot
Test: vogar --mode app_process cts/tests/tests/net/src/android/net/cts/LocalServerSocketTest.java
Test: vogar --mode app_process cts/tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I3ac55439412e84501ae7c5ae6c9976e03b2d6fc5
2017-01-04 10:33:18 +00:00
Ivan Podogov
f33a71d017 Merge "HID Device role API fixes" 2017-01-04 10:32:41 +00:00
qinzhichao
30d4a498c4 Fix NullPointerException in MediaPlayer
Issue detail:
https://code.google.com/p/android/issues/detail?id=231417

setSubtitleAnchor() is a synchronized method and has checked
mSubtitleController. So checking for null pointer is not
needed in scanInternalSubtitleTracks() method.

Signed-off-by: qinzhichao <qinzhichao@xiaomi.com>
2017-01-04 14:51:33 +08:00
Treehugger Robot
6c5cc261f8 Merge "Add checked exceptions to HwBinder transact." 2017-01-04 04:58:38 +00:00
Treehugger Robot
63270f2b96 Merge "Add a mechanism for configuring the A2DP Source codecs" 2017-01-04 03:35:42 +00:00
Pavlin Radoslavov
44a4ef0aa9 Add a mechanism for configuring the A2DP Source codecs
* Added a new class BluetoothCodecConfig that contains codec-related
  configuration or capabilities: codec type, priority, sample rate,
  bits per sample, channel mode, and codec specific fields.

* Extended the Bluetooth A2DP AIDL interface to get/set the current
  codec configuration

* Added new call handleBluetoothA2dpDeviceConfigChange() to the Media
  Framework that is called when there are changes in the
  Bluetooth A2DP device configuration - e.g., the A2DP codec is changed.

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: I9a82716cbc2a5efbe77352a031ac80c88f6a2459
2017-01-03 17:52:52 -08:00
Steven Moreland
e62b1f32f3 Add checked exceptions to HwBinder transact.
Bug: 33673120
Test: hidl_test_java
Merged-In: I7b62eb6b066fc24c44ef7e46aaa2a3208c053d11

Change-Id: I7b62eb6b066fc24c44ef7e46aaa2a3208c053d11
2017-01-04 01:13:16 +00:00
Robert Sesek
89cc5205b3 Synchronize access to WebViewZygote.
The onWebViewProviderChanged callback can be entered from a binder thread,
rather than the system_server main thread. This could lead to races when
managing the webview_zygote.

Test: m
Test: Turn on Multiprocess WebView, install a new WebView provider, then
      instantiate a new WebView. The new WebView should load (note that
      this is racy so may require multiple attempts to test).

Bug: 21643067
Change-Id: I28512906c38e073d4e3d39a2f2b30dcbb50c85ff
2017-01-03 19:31:44 -05:00
Ivan Podogov
dd87cd3bb6 HID Device role API fixes
This change makes HIDD API more like the other ones, i.e.
supporting multiple devices, and implements missing methods.

While the underlying implementation may still only support a
single device at a time, the "device" parameter can still be
useful for checking if the application is trying to send the
data to a correct device.

Test: make
Change-Id: I55fe04c0762a96fcddd6c6678e790361d648111a
2017-01-03 22:36:30 +00:00
Jeremy Joslin
b9a61979cc New permission - BIND_NETWORK_RECOMMENDATION_SERVICE.
Used to protect exported network recommendation services.

Test: Built & ran
BUG:33897544
Change-Id: Icfc566275a8d832449f6358e576784199ab0f7b2
Merged-In: I4f163fb965be6a25201bc3ba5e0032e7652c8f20
2017-01-03 14:19:51 -08:00
Jeff Sharkey
f8720b95be Merge "Offer to measure disk stats using quotas." 2017-01-03 19:08:08 +00:00
Robert Greenwalt
43ced5941e Merge "Add IMEI_NOT_ACCEPTED disconnect cause" 2017-01-03 17:26:59 +00:00
Jeff Sharkey
5eb3eb58ac Offer to measure disk stats using quotas.
Now we're getting somewhere!  This CL starts measuring disk usage
using quotactl(), which is almost instant and has much lower impact
on flash memory lifetime.

We now grant the per-app cache GID to every launched app, and the
ContextImpl logic that creates cache directories matches the logic
down in installd.

Test: builds, boots, quota stats match manual stats
Bug: 27948817
Change-Id: Ie269a2958ce0e1c17cb74dbfecc791a5c12922cf
2017-01-03 10:22:39 -07:00
Treehugger Robot
fce04dc0be Merge "QS: Fix QuickQS visibility at non-first page" 2017-01-03 15:54:21 +00:00