284462 Commits

Author SHA1 Message Date
Tyler Gunn
b6ce026fd1 Add getSelfManagedPhoneAccounts() TelecomManager API.
This is consistent with the existing getCallCapablePhoneAccounts API
which is used to get the phone accounts capable of placing phone calls.

Test: CTS
Bug: 34159263
Merged-In: I1396c63a6882947cd66721528e53b6964a9091e0
Change-Id: I1396c63a6882947cd66721528e53b6964a9091e0
2017-04-10 13:29:21 -07:00
Jack He
e86bdcaed1 Add developer setting and system API for inband ringing support
* Add 1 system API to check inband ringing flag in config.xml
	static isInbandRingingSupported(Context)
* Add developer menu options to enable this feature

Bug: 19171297
Test: mm -j 40, HFP regression testing, testplans/82144
Change-Id: Iaf56ea41911f546bbc7ae1f82e399d0f8d48f75f
2017-04-10 19:49:36 +00:00
Erik Kline
908ce167eb Merge "Tethering: support Local-only Hotspot mode for downstreams"
am: d3128d4b55

Change-Id: Ic7d5e3e23f9ccc0f094ba5991e2fdefa82865b01
2017-04-10 12:02:49 +00:00
Treehugger Robot
d3128d4b55 Merge "Tethering: support Local-only Hotspot mode for downstreams" 2017-04-10 11:50:32 +00:00
Erik Kline
ea9cc488eb Tethering: support Local-only Hotspot mode for downstreams
Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 31466854

Change-Id: Ia50e28c8ce0af8cdd7ac63217d921aff213668e7
2017-04-10 19:11:08 +09:00
Lorenzo Colitti
0ad718aab1 Merge "Add an API hint for metered multipath traffic."
am: 7a12f7efc7

Change-Id: Ie0d289460f93d3b93d91545eb3dfa925f0bdee5f
2017-04-10 05:48:34 +00:00
Hugo Benichi
f294973f6c Merge "DO NOT MERGE IP connectivity metrics: fix tests."
am: b2adaad26b  -s ours

Change-Id: I47dbd0feaa99ff6018efc8703cfa29a265bc73fd
2017-04-10 05:43:43 +00:00
Treehugger Robot
7a12f7efc7 Merge "Add an API hint for metered multipath traffic." 2017-04-10 05:40:10 +00:00
Treehugger Robot
b2adaad26b Merge "DO NOT MERGE IP connectivity metrics: fix tests." 2017-04-10 05:33:48 +00:00
Hugo Benichi
fa0dadc540 DO NOT MERGE IP connectivity metrics: fix tests.
This patch fixes mismatch between current proto compiler and what is
expected in several IP connectivity metrics unit tests.

Test: built, flashed, $ runtest frameworks-net
Bug: 37126521
Change-Id: I1476c923d61f748ecac1146423127f54ba117502
2017-04-10 13:19:23 +09:00
Hugo Benichi
e718797a37 Merge "Improve utility of IntArray and LongArray"
am: 35786735df

Change-Id: Id50add8d7e3fc45978752a6a31760bc69df0cc4a
2017-04-10 01:17:42 +00:00
Hugo Benichi
35786735df Merge "Improve utility of IntArray and LongArray" 2017-04-10 01:09:04 +00:00
Nathan Harold
c12d6c5983 Deprecate TelephonyManager.getCellLocation()
This API has been long-marked for deprecation. It has numerous problems:
-It does not support LTE
-It returns a limited subset of information
-It uses old (and poorly-chosen) sentinel values for fields that are
 not provided.

Bug: 36076138
Test: compilation
Change-Id: I87004710e5d046d4534ad3a0a938540440b0e83b
2017-04-07 11:31:41 -07:00
Jakub Pawlowski
909f3b108f Merge "Bluetooth 5 fix default AdvertisingSetParameters values"
am: 7bf58d5975

Change-Id: Idd2aad81fa1d6cc39d509c1556e8d1f7eb24a3b2
2017-04-07 06:57:30 +00:00
Treehugger Robot
7bf58d5975 Merge "Bluetooth 5 fix default AdvertisingSetParameters values" 2017-04-07 06:44:50 +00:00
Lorenzo Colitti
09146fc440 Merge "Add NETWORK_STACK permission"
am: b23fabf3fd

Change-Id: I20f0278e080ccc957ce6342581f3d0f18dfb4b9a
2017-04-07 05:00:15 +00:00
Lorenzo Colitti
b23fabf3fd Merge "Add NETWORK_STACK permission" 2017-04-07 04:51:14 +00:00
Hugo Benichi
112962a6b0 Improve utility of IntArray and LongArray
This patch adds several utility methods to IntArray and LongArray to
make them more useful in the context of a Parcelable class.

More specifically, it is now possible to parcel and unparcel a
{Int, Long}Array with the following one liners:
  - mIntArray = IntArray.wrap(parcel.createIntArray());
  - parcel.writeIntArray(mIntArray.toArray());

This patch also
  - adds unit tests for IntArray and LongArray.
  - adds a method for setting a field at a given index.
  - adds a method for changing the effective array length.
  - adds missing bound checks for negative index values.

Test: added test coverage
Bug: 34901696
Change-Id: Ia0febf4dae048b0a45c75310b5d90b56499320da
2017-04-07 13:18:16 +09:00
Rebecca Silberstein
ea55ae7d0c Add NETWORK_STACK permission
Add a new permission that only allows other system services to call
networking related methods.  This permission is intended to prevent
other apps from calling these methods that might leave networking
services in intermediate states.

Bug: 36538042
Test: build, run wifi unit tests, boots, wifi connects
Change-Id: Icba6ad5280e9a8863bd1c706ca34b7add8de5294
2017-04-07 03:03:26 +00:00
Hugo Benichi
deb64ea13e Merge "NetworkMonitor: improve captive portal validation logs"
am: d6933a6c14

Change-Id: I8f0fd26d6a9f036adc9cc895690aac27d4b8e9cd
2017-04-07 02:56:11 +00:00
Treehugger Robot
d6933a6c14 Merge "NetworkMonitor: improve captive portal validation logs" 2017-04-07 02:48:56 +00:00
Hugo Benichi
b960ee662c Merge "ConnectivityService: safer locking"
am: b8dc7fbc6d

Change-Id: I88a118bb59f8a870d42d2d665f838f5236ebd21c
2017-04-07 02:21:41 +00:00
Hugo Benichi
b8dc7fbc6d Merge "ConnectivityService: safer locking" 2017-04-07 02:10:45 +00:00
Steven Moreland
9912ec4ca6 Merge "Use hwservicemanager getTransport."
am: 562ed84ff4

Change-Id: I39ee473166dce391f3cad4acf62821a4dfb9f444
2017-04-07 01:18:36 +00:00
Steven Moreland
562ed84ff4 Merge "Use hwservicemanager getTransport." 2017-04-07 01:10:58 +00:00
Hugo Benichi
d9ac87ed65 NetworkMonitor: improve captive portal validation logs
This patch adds probe type and url to all validation logs about web
probes sent for captive portal detection.

Test: built, flashed, looked at $ adb shell dumpsys connectivity
Bug: 36830206, 36532213
Change-Id: Iee2caaf6664f3d097f9d1888ccc5fece0a95994c
2017-04-07 09:48:01 +09:00
Steven Moreland
f7019c2e53 Use hwservicemanager getTransport.
libhidl no longer provides a getTransport function. Now, call into the
hwservicemanager which directly interfaces with libvintf.

Test: extensive, see Ia5d1eb41b057ab5d6800f6c3fd22658adecc4be7
Bug: 36377072

Merged-In: I8b0ca845251cd7cd156f3471cbd4b0ce17617be0
Change-Id: I8b0ca845251cd7cd156f3471cbd4b0ce17617be0
(cherry picked from commit f8202e464e09618c2b780d331541f32cc186598e)
2017-04-06 22:28:01 +00:00
Philip P. Moltmann
997f7cbabf Merge "Add RecommendationPlugin for Cloud Print"
am: b2c75d062d

Change-Id: I4b018ac9763d9bf5c69d055b4a9d5ddf6dded3cb
2017-04-06 20:35:44 +00:00
Treehugger Robot
b2c75d062d Merge "Add RecommendationPlugin for Cloud Print" 2017-04-06 20:23:14 +00:00
Junda Liu
c86e5802c6 Merge "Add KEY_ENABLE_APPS_STRING_ARRAY carrier config key."
am: ded8a6b7f6

Change-Id: I12f28266088cd9565d62097477c69dcb5ece54e2
2017-04-06 18:25:10 +00:00
Junda Liu
ded8a6b7f6 Merge "Add KEY_ENABLE_APPS_STRING_ARRAY carrier config key." 2017-04-06 18:17:41 +00:00
Jakub Pawlowski
010cc95583 Bluetooth 5 fix default AdvertisingSetParameters values
Having advertiser be scannable and connectable by default is a bad
choice for new advertising set.

Bug: 30622771
Test: sl4a Bt5ScanTest
Change-Id: I4fc270e78ca4e62d3077c5cd28aa59b0518d2e77
2017-04-06 17:21:28 +00:00
Colin Cross
72ae1a8958 Merge "Update layoutlib to match java library changes"
am: ac6414524c

Change-Id: If673886a433d1c02ac19646ab8128ad1b36280c8
2017-04-06 15:38:45 +00:00
Colin Cross
ac6414524c Merge "Update layoutlib to match java library changes" 2017-04-06 15:30:45 +00:00
Przemyslaw Szczepaniak
9bc30db050 Merge "Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b"
am: 443af115ab

Change-Id: Id3eed59b96b9aba2f101bb3910f7eace84a6699e
2017-04-06 14:58:11 +00:00
Treehugger Robot
443af115ab Merge "Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b" 2017-04-06 14:49:19 +00:00
Neil Fuller
12ee401482 Merge "Canonicalize tz IDs when finding exemplar location"
am: 5e603a4b6e

Change-Id: Ib4eb5ce215ec2564d220e1658f2dec4d0dc86d67
2017-04-06 10:22:07 +00:00
Treehugger Robot
5e603a4b6e Merge "Canonicalize tz IDs when finding exemplar location" 2017-04-06 10:12:01 +00:00
Przemyslaw Szczepaniak
1607b49d6b Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b
Test: make -j 32
Bug: 36461944
Change-Id: I2075d03c3143d0582a76d91bcbaccd83c193a552
2017-04-06 09:58:18 +00:00
Hugo Benichi
2955172511 ConnectivityService: safer locking
This path changes a dangerous lock path in reportNetworkConnectivity().
This methods is called outside of the main ConnectivityService handler
and takes a lock on a specific NetworkAgentInfo whose connectivity
status is being reported.

While this lock is held, reportNetworkConnectivity() goes on and query
the network policy state for that network, which may ends into
NetworkPolicyManagerService.

Instead, the lock on NetworkAgentInfo is only held long enough to make a
copy of LinkProperties, which is then passed to
NetworkPolicyManagerService without that lock.

Bug: 36902662
Test: could not repro b/36902662, reportNetworkConnectivity() works.
      $ runtest frameworks-net

Change-Id: Iac4b75bcecbdddb0ac695c8b1a87ae755f62f47f
2017-04-06 17:23:28 +09:00
Lorenzo Colitti
46aa9c022e Add an API hint for metered multipath traffic.
This allows an application that knows how to provide seamless
network connectivity (e.g., using QUIC multipath) to find out if
doing so is desired.

(cherry picked from commit 2de4925f5cc64aeb92e02a8f740d3ff20f36dddd)

Test: builds, boots, runtest frameworks-net passes.
Bug: 34630278
Change-Id: Ic7fd0b9e1cd879fdfaf84009d7125391895e9087
2017-04-06 16:50:06 +09:00
Etan Cohen
39c6014666 [CM] Unhide the NetworkSpecifier as object API
API visibility change: unhide allowing NetworkSpecifier
to be an arbitrary object.

Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: builds and runs
Change-Id: I1d1705cca7ece077ef8d7c674c62d5369fedbb03
2017-04-05 21:16:18 -07:00
Philip P. Moltmann
5d0b53b684 Add RecommendationPlugin for Cloud Print
Reuses already existing infrastructure. The mMDNSFilteredDiscovery lambda
is called for every network service that supports #PRIVET_SERVICE. Then
the plugin checks the txt fields to make sure the printer is valid. The
check is not complete but good enough to make sure this is either a
cloud print capable printer or something that tries really hard.

Test: Connected to network with three printers, 2 GCP capable. Found the
      two printers
Fixes: 35766193
Change-Id: I7c9180c8c154fa092fec5b943a94bad77da74c86
2017-04-05 19:51:08 -07:00
Hugo Benichi
4062ac81be Merge changes I9ad4ce81,I360d539e
am: 9680667b1d

Change-Id: I7c64e3db6a1d153339f50db292761131dbfa2ae8
2017-04-06 02:01:07 +00:00
Treehugger Robot
9680667b1d Merge changes I9ad4ce81,I360d539e
* changes:
  NsdService: minor cleanups
  Nsdmanager/NsdService: add logging
2017-04-06 01:51:36 +00:00
Etan Cohen
a743427896 Make the NetworkSpecifier a class instead of a string.
Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: connectivity, wifi, telephony unit tests
Change-Id: Idd9b10a8418c53c8cf386d9ff8252226b076bbf9
2017-04-05 14:18:20 -07:00
Tobias Thierer
e11ed001dd Merge "Document the fact that StatFs.restat() and ctor can throw."
am: 183c93f6a0

Change-Id: I0c8a4c12495260044be6aac74a505280498a9b44
2017-04-05 21:03:42 +00:00
Tobias Thierer
183c93f6a0 Merge "Document the fact that StatFs.restat() and ctor can throw." 2017-04-05 20:53:47 +00:00
Tobias Thierer
0ad48dc8aa Document the fact that StatFs.restat() and ctor can throw.
StatFs.restat() and the StatFs constructor can throw
IllegalArgumentException. This was not previously documented;
not all callers took this into account, for example:
   http://r.android.com/251290

This CL adds documentation to those methods. It also adds
comments to two of the callers.

Separately from this CL, we may in addition consider adding
new API StatFs.checkedRestat() and StatFs.checkedCreate()
or similar that throw IOException; we cannot change the
existing constructor and method since they are public.

Test: Checked that "make" still completed successfully.

Change-Id: I6a0b3cb7718939408937c61de7c3b000b948fa59
2017-04-05 20:52:04 +00:00
Hall Liu
53d241411a Merge "Query geo description in worker thread to prevent ANR"
am: eb7c287c71

Change-Id: I0df6d788ff5f8794e03324c3dacf337a7a04c36c
2017-04-05 19:32:07 +00:00