284407 Commits

Author SHA1 Message Date
Lorenzo Colitti
c86013be93 Move some NetworkStats tests to tests/net.
This groups them together with the rest of the networking unit
tests. It also speeds up compile/test cycles ("runtest -x" of one
file goes from 1m15s to 30s).

Test: runtest frameworks-net passes on internal tree
Change-Id: I53cb0c51355fe4b4b30e451fa09fbbf58da39efd
2017-04-13 02:38:11 +09:00
Robert Greenwalt
70fea2df2a Merge "Adding 20 free short codes for DCB and other purposes" 2017-04-12 15:15:34 +00:00
Treehugger Robot
923ef69ae7 Merge "Captive portal: fix probe urls at network creation" 2017-04-12 09:38:41 +00:00
Treehugger Robot
d269f30d62 Merge "Fix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING" 2017-04-11 23:59:30 +00:00
Mark Salyzyn
cf39eea407 Merge "jni: isLoggable: adapt to removal of property name size limit" 2017-04-11 23:13:08 +00:00
Amit Mahajan
f954f2d5cc Merge "Add p2 option in openLogicalChannel." 2017-04-11 21:25:43 +00:00
Mathieu Chartier
1886a155f2 Fix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING
dalvik-data-code-cache and dalvik-CompilerMetadata should be counted
in JITCache instead of .GC in dumpsys.

Bug: 37224159
Test: adb shell dumpsys meminfo -d

(cherry picked from commit 874c4cf56c0a9ea3b48468a13ec7fb78a3e2594b)

Change-Id: I41def949d91b2fdef0b3f502fe16ae436d058051
2017-04-11 13:52:53 -07:00
Treehugger Robot
4a43598bd6 Merge "Remove .(ll)ndk suffix from (ll)ndk_library" 2017-04-11 16:19:16 +00:00
Andreas Gampe
ac293515b3 Merge "OtaDexOptService: Log post-reboot moves" 2017-04-11 15:22:14 +00:00
Dan Willemsen
68686dbb41 Remove .(ll)ndk suffix from (ll)ndk_library
Soong handles these automatically now.

Bug: 33241851
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Merged-In: Ic10796e75bb886cc3f92c234714ab3e6c85112df
Change-Id: Ic10796e75bb886cc3f92c234714ab3e6c85112df
2017-04-11 15:15:02 +00:00
Mark Salyzyn
8143fa57ad jni: isLoggable: adapt to removal of property name size limit
There is no longer a name size limit to the properties, remove
illegalArgumentException if tag length is too large.

Test: build
Bug: 36696208
Change-Id: I4b4329c8c951082ed0d777cdd70ee3e773bed16c
2017-04-11 07:31:40 -07:00
Jakub Pawlowski
763765b1b1 Merge "Remove enable from PeriodicAdvertisingPariameters (1/2)" 2017-04-11 06:18:56 +00:00
Jakub Pawlowski
e6c453d828 Remove enable from PeriodicAdvertisingPariameters (1/2)
Instead of setting enable to true, one can just pass null
PeriodicAdvertisingParameters and achieve same result when starting the
set.
Passing the "enable" when updating the parameters make no sense, and
might be confusing.
Experience with "timeout" field, which was a part of AdvertiseSettings
show that merging fields that go into different HCI commands can cause
problems during processing, so keep enable as separate field.

Test: manual
Bug: 30622771
Change-Id: Ida02c59eb8433537179b4d22202fe745f8b4bb3e
2017-04-11 06:18:44 +00:00
Hugo Benichi
b03272c9b5 Captive portal: fix probe urls at network creation
This patch changes how url configuration values for captive portal
detection are read: instead of re-reading the settings at every probe
detection, the settings are read once when the NetworkMonitor associated
to a network is created.

If the settings are updated, the new values are picked up by new
networks, but not by existing networks. Since captive portal detection
is most important when joining WiFi networks, the newest available
settings values will still be used.

This change prepares introducing further changes for rotating probe
urls. Especially it helps making the detection strategy stateful with
respect to the lifecycle of a single NetworkMonitor.

Test: built, flashed, tested manually with various portal networks
Bug: 36532213
Change-Id: I71cc8bb8b996462f27f50798d67bceee5ffb898d
2017-04-11 13:23:38 +09:00
nharold
bc0f610b25 Merge "Deprecate TelephonyManager.getCellLocation()" 2017-04-10 22:50:01 +00:00
Andreas Gampe
95349c0e96 OtaDexOptService: Log post-reboot moves
Disable artifact checks for non-upgrade booting. Log the number of
successfully move artifacts.

Bug: 37158297
Test: m
Test: manual
Change-Id: Ic81531950582ce937e2e3b7815fb9132888d9a42
2017-04-10 15:48:50 -07:00
Jack He
1da38b2bcd Merge "Add developer setting and system API for inband ringing support" 2017-04-10 22:47:56 +00:00
Treehugger Robot
c4ea961f91 Merge "Add getSelfManagedPhoneAccounts() TelecomManager API." 2017-04-10 21:49:06 +00:00
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
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
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
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
Treehugger Robot
7bf58d5975 Merge "Bluetooth 5 fix default AdvertisingSetParameters values" 2017-04-07 06:44:50 +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
Treehugger Robot
d6933a6c14 Merge "NetworkMonitor: improve captive portal validation logs" 2017-04-07 02:48:56 +00:00
Hugo Benichi
b8dc7fbc6d Merge "ConnectivityService: safer locking" 2017-04-07 02:10:45 +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
Treehugger Robot
b2c75d062d Merge "Add RecommendationPlugin for Cloud Print" 2017-04-06 20:23:14 +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
ac6414524c Merge "Update layoutlib to match java library changes" 2017-04-06 15:30:45 +00:00
Treehugger Robot
443af115ab Merge "Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b" 2017-04-06 14:49:19 +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
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
Treehugger Robot
9680667b1d Merge changes I9ad4ce81,I360d539e
* changes:
  NsdService: minor cleanups
  Nsdmanager/NsdService: add logging
2017-04-06 01:51:36 +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
eb7c287c71 Merge "Query geo description in worker thread to prevent ANR" 2017-04-05 19:23:32 +00:00