OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Add a default SSID prefix for local only hotspot"
Rebecca Silberstein [Fri, 14 Apr 2017 04:03:48 +0000 (04:03 +0000)]
Merge "Add a default SSID prefix for local only hotspot"

7 years agoMerge "Revert "Captive portal: rotate fallback urls""
Hugo Benichi [Thu, 13 Apr 2017 13:25:40 +0000 (13:25 +0000)]
Merge "Revert "Captive portal: rotate fallback urls""

7 years agoMerge "Unhide MethodHandles.explicitCastArguments()"
Treehugger Robot [Thu, 13 Apr 2017 13:25:10 +0000 (13:25 +0000)]
Merge "Unhide MethodHandles.explicitCastArguments()"

7 years agoRevert "Captive portal: rotate fallback urls"
Hugo Benichi [Thu, 13 Apr 2017 12:43:49 +0000 (12:43 +0000)]
Revert "Captive portal: rotate fallback urls"

After discussion in the cl we agreed to use "|" as a separator. However  String.split() input arg is a regex and not a literal string, so that "|" will actually split the urls characters per characters.

Will revert and resubmit with a comma.

This reverts commit 0908daaaf00e6b56ebed0a0fce9c3e3fe183a06b.

Change-Id: Ifab25e41bec806fbc1d2c13ffd81d4ad91598c89

7 years agoMerge changes Ia15f77e2,Icaa1f95c
Treehugger Robot [Thu, 13 Apr 2017 09:24:32 +0000 (09:24 +0000)]
Merge changes Ia15f77e2,Icaa1f95c

* changes:
  Captive portal: regroup hardcoded http response codes.
  Captive portal: rotate fallback urls

7 years agoMerge "Extract SimChangeListener to its own file"
Treehugger Robot [Thu, 13 Apr 2017 08:19:05 +0000 (08:19 +0000)]
Merge "Extract SimChangeListener to its own file"

7 years agoCaptive portal: regroup hardcoded http response codes.
Hugo Benichi [Mon, 10 Apr 2017 08:08:06 +0000 (17:08 +0900)]
Captive portal: regroup hardcoded http response codes.

This patch regroups various hardcoded http codes into well defined
constants. This reduces risk of errors and makes the captive portal
logic clearer.

This patch also fixes the logging when a captive portal detection
probe fails, to take into account https ssl handshake failures: for
well-behaved portals it is expected that the https probe will fail,
however the error message was written before the introduction of the
https probe and had become ambiguous.

Test: built, flashed, tested manually with various portal networks
Bug: 36532213

Change-Id: Ia15f77e268cb414816fc52f92835289f9a9ce92b

7 years agoCaptive portal: rotate fallback urls
Hugo Benichi [Mon, 10 Apr 2017 08:43:08 +0000 (17:43 +0900)]
Captive portal: rotate fallback urls

This patch introduces a new settings value to specify more than one url
for the fallback http probe in addition to the existing settings value.
If more than one url exists, a network will rotate urls for the fallback
probe one by one everytime the fallback probe is sent.

Test: built, flashed, tested manually with various portal networks.
Bug: 36532213
Change-Id: Icaa1f95c5914e8840c83ccdf071047358a5b760f

7 years agoAdd a default SSID prefix for local only hotspot
Rebecca Silberstein [Sun, 26 Mar 2017 00:19:38 +0000 (17:19 -0700)]
Add a default SSID prefix for local only hotspot

Add a default prefix for local only hotspot that will be used to
generate WifiConfiguration objects.  This prefix will have
random digits appended to reduce AP name collisions.

Bug: 36704909
Test: compiles

Change-Id: I2b9478a12de27cabe13ece2973bce7cd4976ba2f

7 years agoMerge "Ignore potential SystemProperties errors when setting net.dns"
Treehugger Robot [Thu, 13 Apr 2017 05:49:31 +0000 (05:49 +0000)]
Merge "Ignore potential SystemProperties errors when setting net.dns"

7 years agoMerge "Move some NetworkStats tests to tests/net."
Lorenzo Colitti [Thu, 13 Apr 2017 05:18:46 +0000 (05:18 +0000)]
Merge "Move some NetworkStats tests to tests/net."

7 years agoIgnore potential SystemProperties errors when setting net.dns
Erik Kline [Fri, 7 Apr 2017 06:29:29 +0000 (15:29 +0900)]
Ignore potential SystemProperties errors when setting net.dns

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 33308258
Bug: 36249702

Change-Id: I76ae853ceb61b7b900f36f9c3cd67b2d2284aab0

7 years agoMerge changes from topic 'network_specifier'
Lorenzo Colitti [Wed, 12 Apr 2017 22:27:35 +0000 (22:27 +0000)]
Merge changes from topic 'network_specifier'

* changes:
  [CM] Unhide the NetworkSpecifier as object API
  Make the NetworkSpecifier a class instead of a string.

7 years agoMerge "Bluetooth 5 PHY simplification"
Jakub Pawlowski [Wed, 12 Apr 2017 21:22:26 +0000 (21:22 +0000)]
Merge "Bluetooth 5 PHY simplification"

7 years agoMerge "ECBM SystemProperty cleanup"
Shuo Qian [Wed, 12 Apr 2017 20:52:18 +0000 (20:52 +0000)]
Merge "ECBM SystemProperty cleanup"

7 years agoMerge changes from topic 'ipsec-api-tweaks'
nharold [Wed, 12 Apr 2017 18:13:55 +0000 (18:13 +0000)]
Merge changes from topic 'ipsec-api-tweaks'

* changes:
  Add FileDescriptor Versions of applyTransportModeTransform()
  IpSecManager and IpSecAlgorithm API Tweaks

7 years agoBluetooth 5 PHY simplification
Jakub Pawlowski [Wed, 12 Apr 2017 15:51:22 +0000 (08:51 -0700)]
Bluetooth 5 PHY simplification

Having PHY_LE_* constants defined in four different places, with one
value being different than others is misleading. Leave just PHY_LE_*
definitions in BluetoothDevice, and add PHY_LE*_MASK for the mask used
in PHY update API.

This patch also removes need to translate PHY value between PHY update
request and event, as mask is used for request, and the value is
returned in event.

Bug: 30622771
Test: manual
Change-Id: I897effa1204a024465d55501c83c542566c4d37c

7 years agoMove some NetworkStats tests to tests/net.
Lorenzo Colitti [Wed, 12 Apr 2017 16:18:05 +0000 (01:18 +0900)]
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

7 years agoMerge "Adding 20 free short codes for DCB and other purposes"
Robert Greenwalt [Wed, 12 Apr 2017 15:15:32 +0000 (15:15 +0000)]
Merge "Adding 20 free short codes for DCB and other purposes"

7 years agoUnhide MethodHandles.explicitCastArguments()
Orion Hodson [Wed, 12 Apr 2017 13:00:18 +0000 (14:00 +0100)]
Unhide MethodHandles.explicitCastArguments()

Bug: 33192564
Test: m -j32
Change-Id: Ic80c9fa8bd81173220f4a1615e35d89b0ed621c2

7 years agoMerge "Captive portal: fix probe urls at network creation"
Treehugger Robot [Wed, 12 Apr 2017 09:38:40 +0000 (09:38 +0000)]
Merge "Captive portal: fix probe urls at network creation"

7 years agoExtract SimChangeListener to its own file
Erik Kline [Fri, 20 Jan 2017 11:26:10 +0000 (20:26 +0900)]
Extract SimChangeListener to its own file

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - runtest -x full/path/to/SimChangeListenerTest.java passes
Bug: 32163131
Change-Id: If90539fe9a5dc07c7c24ed0b70b920d94065a623

7 years agoMerge "Fix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING"
Treehugger Robot [Tue, 11 Apr 2017 23:59:28 +0000 (23:59 +0000)]
Merge "Fix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING"

7 years agoMerge "jni: isLoggable: adapt to removal of property name size limit"
Mark Salyzyn [Tue, 11 Apr 2017 23:13:06 +0000 (23:13 +0000)]
Merge "jni: isLoggable: adapt to removal of property name size limit"

7 years agoECBM SystemProperty cleanup
shuoq [Tue, 10 Jan 2017 21:14:02 +0000 (13:14 -0800)]
ECBM SystemProperty cleanup

- Add getEmergencyCallbackMode() method in the TelephonyManager.java
to get the boolean value for ECBM callback mode from the phone through
ITelephony.aidl/java interface

- Use the added TelephonyManager Api to replace the 'get' of
PROPERTY_INECM_MODE system property in the framework/base

Test: manual
Bug: 30361624

Change-Id: I355d69820b157f23e077a95a13f8509ee0fa5874

7 years agoMerge "Add p2 option in openLogicalChannel."
Amit Mahajan [Tue, 11 Apr 2017 21:25:41 +0000 (21:25 +0000)]
Merge "Add p2 option in openLogicalChannel."

7 years agoFix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING
Mathieu Chartier [Tue, 11 Apr 2017 01:28:03 +0000 (18:28 -0700)]
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

7 years agoAdd FileDescriptor Versions of applyTransportModeTransform()
Nathan Harold [Fri, 7 Apr 2017 00:46:00 +0000 (17:46 -0700)]
Add FileDescriptor Versions of applyTransportModeTransform()

Because there is no way using the Java sockets API to actually
get a socket of AF_INET on mode machines, it is necessary to
provide a way to apply transforms to sockets made using the
native wrapper API, which uses POSIX APIs and will create a
socket that is AF_INET.

Bug: 36073210
Test: b/34811227
Change-Id: I28ac7cc4f36045ce523a54111e5be975b0331356

7 years agoIpSecManager and IpSecAlgorithm API Tweaks
Nathan Harold [Fri, 7 Apr 2017 01:16:28 +0000 (18:16 -0700)]
IpSecManager and IpSecAlgorithm API Tweaks

-Add a reserveSecurityParamterIndex() function that allows the
 system to select an SPI.
-Disallow INVALID_SECURITY_PARAMETER_INDEX from being passed as
 an explicit SPI request.
-Remove the ALGO_ prefix from constants in IpSecAlgorithm

Bug: 36073210
Test: Updated CTS tests still pass on bullhead
Change-Id: Ic94809996076b0718f153f550b82192fe7048a2e

7 years agoMerge "Remove .(ll)ndk suffix from (ll)ndk_library"
Treehugger Robot [Tue, 11 Apr 2017 16:19:14 +0000 (16:19 +0000)]
Merge "Remove .(ll)ndk suffix from (ll)ndk_library"

7 years agoMerge "OtaDexOptService: Log post-reboot moves"
Andreas Gampe [Tue, 11 Apr 2017 15:22:13 +0000 (15:22 +0000)]
Merge "OtaDexOptService: Log post-reboot moves"

7 years agoRemove .(ll)ndk suffix from (ll)ndk_library
Dan Willemsen [Fri, 7 Apr 2017 22:48:45 +0000 (15:48 -0700)]
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

7 years agojni: isLoggable: adapt to removal of property name size limit
Mark Salyzyn [Fri, 7 Apr 2017 18:26:26 +0000 (11:26 -0700)]
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

7 years agoMerge "Remove enable from PeriodicAdvertisingPariameters (1/2)"
Jakub Pawlowski [Tue, 11 Apr 2017 06:18:54 +0000 (06:18 +0000)]
Merge "Remove enable from PeriodicAdvertisingPariameters (1/2)"

7 years agoRemove enable from PeriodicAdvertisingPariameters (1/2)
Jakub Pawlowski [Mon, 10 Apr 2017 20:45:16 +0000 (13:45 -0700)]
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

7 years agoCaptive portal: fix probe urls at network creation
Hugo Benichi [Mon, 10 Apr 2017 13:45:13 +0000 (22:45 +0900)]
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

7 years agoMerge "Deprecate TelephonyManager.getCellLocation()"
nharold [Mon, 10 Apr 2017 22:49:59 +0000 (22:49 +0000)]
Merge "Deprecate TelephonyManager.getCellLocation()"

7 years agoOtaDexOptService: Log post-reboot moves
Andreas Gampe [Mon, 10 Apr 2017 22:48:50 +0000 (15:48 -0700)]
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

7 years agoMerge "Add developer setting and system API for inband ringing support"
Jack He [Mon, 10 Apr 2017 22:47:54 +0000 (22:47 +0000)]
Merge "Add developer setting and system API for inband ringing support"

7 years agoMerge "Add getSelfManagedPhoneAccounts() TelecomManager API."
Treehugger Robot [Mon, 10 Apr 2017 21:49:05 +0000 (21:49 +0000)]
Merge "Add getSelfManagedPhoneAccounts() TelecomManager API."

7 years agoAdd getSelfManagedPhoneAccounts() TelecomManager API.
Tyler Gunn [Fri, 7 Apr 2017 21:57:37 +0000 (14:57 -0700)]
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

7 years agoAdd developer setting and system API for inband ringing support
Jack He [Fri, 18 Nov 2016 00:19:43 +0000 (16:19 -0800)]
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

7 years agoMerge "Tethering: support Local-only Hotspot mode for downstreams"
Treehugger Robot [Mon, 10 Apr 2017 11:50:31 +0000 (11:50 +0000)]
Merge "Tethering: support Local-only Hotspot mode for downstreams"

7 years agoTethering: support Local-only Hotspot mode for downstreams
Erik Kline [Fri, 10 Mar 2017 10:35:34 +0000 (19:35 +0900)]
Tethering: support Local-only Hotspot mode for downstreams

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - "runtest frameworks-net" passes
Bug: 31466854

Change-Id: Ia50e28c8ce0af8cdd7ac63217d921aff213668e7

7 years agoMerge "Add an API hint for metered multipath traffic."
Treehugger Robot [Mon, 10 Apr 2017 05:40:08 +0000 (05:40 +0000)]
Merge "Add an API hint for metered multipath traffic."

7 years agoMerge "DO NOT MERGE IP connectivity metrics: fix tests."
Treehugger Robot [Mon, 10 Apr 2017 05:33:46 +0000 (05:33 +0000)]
Merge "DO NOT MERGE IP connectivity metrics: fix tests."

7 years agoDO NOT MERGE IP connectivity metrics: fix tests.
Hugo Benichi [Mon, 10 Apr 2017 04:12:49 +0000 (13:12 +0900)]
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

7 years agoMerge "Improve utility of IntArray and LongArray"
Hugo Benichi [Mon, 10 Apr 2017 01:09:02 +0000 (01:09 +0000)]
Merge "Improve utility of IntArray and LongArray"

7 years agoDeprecate TelephonyManager.getCellLocation()
Nathan Harold [Fri, 7 Apr 2017 17:56:05 +0000 (10:56 -0700)]
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

7 years agoMerge "Bluetooth 5 fix default AdvertisingSetParameters values"
Treehugger Robot [Fri, 7 Apr 2017 06:44:48 +0000 (06:44 +0000)]
Merge "Bluetooth 5 fix default AdvertisingSetParameters values"

7 years agoMerge "Add NETWORK_STACK permission"
Lorenzo Colitti [Fri, 7 Apr 2017 04:51:13 +0000 (04:51 +0000)]
Merge "Add NETWORK_STACK permission"

7 years agoImprove utility of IntArray and LongArray
Hugo Benichi [Mon, 27 Mar 2017 04:45:23 +0000 (13:45 +0900)]
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

7 years agoAdd NETWORK_STACK permission
Rebecca Silberstein [Thu, 23 Mar 2017 07:29:28 +0000 (00:29 -0700)]
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

7 years agoMerge "NetworkMonitor: improve captive portal validation logs"
Treehugger Robot [Fri, 7 Apr 2017 02:48:55 +0000 (02:48 +0000)]
Merge "NetworkMonitor: improve captive portal validation logs"

7 years agoMerge "ConnectivityService: safer locking"
Hugo Benichi [Fri, 7 Apr 2017 02:10:45 +0000 (02:10 +0000)]
Merge "ConnectivityService: safer locking"

7 years agoMerge "Use hwservicemanager getTransport."
Steven Moreland [Fri, 7 Apr 2017 01:10:56 +0000 (01:10 +0000)]
Merge "Use hwservicemanager getTransport."

7 years agoNetworkMonitor: improve captive portal validation logs
Hugo Benichi [Thu, 6 Apr 2017 05:36:39 +0000 (14:36 +0900)]
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: 3683020636532213
Change-Id: Iee2caaf6664f3d097f9d1888ccc5fece0a95994c

7 years agoUse hwservicemanager getTransport.
Steven Moreland [Thu, 6 Apr 2017 16:28:32 +0000 (09:28 -0700)]
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)

7 years agoMerge "Add RecommendationPlugin for Cloud Print"
Treehugger Robot [Thu, 6 Apr 2017 20:23:13 +0000 (20:23 +0000)]
Merge "Add RecommendationPlugin for Cloud Print"

7 years agoMerge "Add KEY_ENABLE_APPS_STRING_ARRAY carrier config key."
Junda Liu [Thu, 6 Apr 2017 18:17:39 +0000 (18:17 +0000)]
Merge "Add KEY_ENABLE_APPS_STRING_ARRAY carrier config key."

7 years agoBluetooth 5 fix default AdvertisingSetParameters values
Jakub Pawlowski [Thu, 6 Apr 2017 14:22:57 +0000 (07:22 -0700)]
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

7 years agoMerge "Update layoutlib to match java library changes"
Colin Cross [Thu, 6 Apr 2017 15:30:44 +0000 (15:30 +0000)]
Merge "Update layoutlib to match java library changes"

7 years agoMerge "Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b"
Treehugger Robot [Thu, 6 Apr 2017 14:49:17 +0000 (14:49 +0000)]
Merge "Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b"

7 years agoMerge "Canonicalize tz IDs when finding exemplar location"
Treehugger Robot [Thu, 6 Apr 2017 10:12:00 +0000 (10:12 +0000)]
Merge "Canonicalize tz IDs when finding exemplar location"

7 years agoTrack libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b
Przemyslaw Szczepaniak [Wed, 29 Mar 2017 12:59:46 +0000 (13:59 +0100)]
Track libcore change dfd104e99d15d91dc21137b190fb99cab8a1180b

Test: make -j 32
Bug: 36461944
Change-Id: I2075d03c3143d0582a76d91bcbaccd83c193a552

7 years agoConnectivityService: safer locking
Hugo Benichi [Thu, 6 Apr 2017 07:01:44 +0000 (16:01 +0900)]
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

7 years agoAdd an API hint for metered multipath traffic.
Lorenzo Colitti [Tue, 24 Jan 2017 09:08:41 +0000 (18:08 +0900)]
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

7 years ago[CM] Unhide the NetworkSpecifier as object API
Etan Cohen [Wed, 29 Mar 2017 20:57:08 +0000 (13:57 -0700)]
[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

7 years agoAdd RecommendationPlugin for Cloud Print
Philip P. Moltmann [Thu, 6 Apr 2017 02:51:08 +0000 (19:51 -0700)]
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

7 years agoMerge changes I9ad4ce81,I360d539e
Treehugger Robot [Thu, 6 Apr 2017 01:51:34 +0000 (01:51 +0000)]
Merge changes I9ad4ce81,I360d539e

* changes:
  NsdService: minor cleanups
  Nsdmanager/NsdService: add logging

7 years agoMake the NetworkSpecifier a class instead of a string.
Etan Cohen [Mon, 3 Apr 2017 19:17:51 +0000 (12:17 -0700)]
Make the NetworkSpecifier a class instead of a string.

Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: connectivity, wifi, telephony unit tests
Change-Id: Idd9b10a8418c53c8cf386d9ff8252226b076bbf9

7 years agoMerge "Document the fact that StatFs.restat() and ctor can throw."
Tobias Thierer [Wed, 5 Apr 2017 20:53:46 +0000 (20:53 +0000)]
Merge "Document the fact that StatFs.restat() and ctor can throw."

7 years agoDocument the fact that StatFs.restat() and ctor can throw.
Tobias Thierer [Tue, 2 Aug 2016 15:41:11 +0000 (16:41 +0100)]
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

7 years agoMerge "Query geo description in worker thread to prevent ANR"
Hall Liu [Wed, 5 Apr 2017 19:23:29 +0000 (19:23 +0000)]
Merge "Query geo description in worker thread to prevent ANR"

7 years agoCanonicalize tz IDs when finding exemplar location
Neil Fuller [Tue, 4 Apr 2017 16:47:05 +0000 (17:47 +0100)]
Canonicalize tz IDs when finding exemplar location

Canonicalize time zone IDs when looking up exemplar location.

ICU's canonical IDs are not guaranteed the same as IANA's.
Various data files (e.g. timezones.xml, tzdata,
time_zones_by_country.xml) are using IANA IDs. ICU's IDs
are often the same, but because they are guaranteed not to
change and IANAs are not there is some drift.

This fixes an issue with the settings picker for ICU IDs:

America/Buenos_Aires
Asia/Rangoon
Asia/Katmandu
Asia/Calcutta

Which are IANA's:

America/Argentina/Buenos_Aires
Asia/Yangon
Asia/Kathmandu
Asia/Kolkata

introduced by commit b4d003da66.

It could also influence some display names for
automatically-selected time zones outside of this list.

The issues was particularly noticeable in locales that
use non-ASCII scripts; ICU performs a fallback if the ID
isn't canonical and would transform and return the last
part of the ID (e.g. Buenos Aires, Yangon, Kathmandu,
Kolkata).

Bug: 36469833
Test: Manual testing in Japanese
Merged-In: I2febdbee58e474d251d0a33f2c8335664a74581f
Change-Id: Id6598fcf048e924a75db7550d1143ecaa8062e8a

7 years agoNsdService: minor cleanups
Hugo Benichi [Wed, 5 Apr 2017 05:43:29 +0000 (14:43 +0900)]
NsdService: minor cleanups

Minor cleanups in switches of processMessage and handleNativeEvent.

Test: no functional changes
Bug: 33074219
Change-Id: I9ad4ce812c0d2c02a671a7a871ad427e4ce29b4a

7 years agoNsdmanager/NsdService: add logging
Hugo Benichi [Wed, 5 Apr 2017 05:06:11 +0000 (14:06 +0900)]
Nsdmanager/NsdService: add logging

This patch adds basic logging to NsdManager and NsdService, and improves
the facilities for pretty printing the event ids defined in NsdManager.

It also includes a few minor cleanups:
  - adding 'final' on effectively final instance variables of NsdManager
  and NsdService.
  - similarly, adding 'static' on effectively static class fields.
  - regrouping instance variables together.

Test: no functional changes
Bug: 33074219
Change-Id: I360d539e73cc8e4b45d4e0d20b2e345455fdb10c

7 years agoMerge "Add @TestApi annotations to CS-side RTT APIs for CTS"
Hall Liu [Tue, 4 Apr 2017 23:31:37 +0000 (23:31 +0000)]
Merge "Add @TestApi annotations to CS-side RTT APIs for CTS"

7 years agoAdd p2 option in openLogicalChannel.
Ajay Nambi [Fri, 4 Dec 2015 22:37:49 +0000 (14:37 -0800)]
Add p2 option in openLogicalChannel.

- Add support for iccOpenLogicalChannelWithP2.
- Needed to support OMAPI 3.0 defined
by SIM Alliance.
- Deprecate iccOpenLogicalChannel(String) API and
pass down an invalid p2 value to keep original behavior

Bug: 27360148
Change-Id: I2ab6cfb7a54c451f32936df51b8298f35a6dc67f

7 years agoMerge "Add api to retrieve call creation time."
Tyler Gunn [Tue, 4 Apr 2017 21:35:26 +0000 (21:35 +0000)]
Merge "Add api to retrieve call creation time."

7 years agoMerge "IMS: RTT interface changes"
Hall Liu [Tue, 4 Apr 2017 21:21:16 +0000 (21:21 +0000)]
Merge "IMS: RTT interface changes"

7 years agoMerge "Protect CANCEL_HANDOVER_TRANSFER broadcast"
Treehugger Robot [Tue, 4 Apr 2017 20:57:53 +0000 (20:57 +0000)]
Merge "Protect CANCEL_HANDOVER_TRANSFER broadcast"

7 years agoProtect CANCEL_HANDOVER_TRANSFER broadcast
Hiroki Yamamoto [Tue, 28 Mar 2017 02:45:13 +0000 (11:45 +0900)]
Protect CANCEL_HANDOVER_TRANSFER broadcast

Bug: 36662809
Test: cancel AndroidBeam and check if the error log is not shown
Change-Id: Ic442753aacf97f7f5a7e449685c2b1414e77e957

7 years agoMerge "Make some intents public in SubscriptionManager."
Sanket Padawe [Tue, 4 Apr 2017 16:59:13 +0000 (16:59 +0000)]
Merge "Make some intents public in SubscriptionManager."
am: 35e9a94dee

Change-Id: Ic9812badf9368b1398110e446956641d27e6e2ff

7 years agoMerge "Make some intents public in SubscriptionManager."
Treehugger Robot [Tue, 4 Apr 2017 16:48:32 +0000 (16:48 +0000)]
Merge "Make some intents public in SubscriptionManager."

7 years agoMerge "Update to latest tzdata / switch back to zones.tab"
Neil Fuller [Tue, 4 Apr 2017 16:47:37 +0000 (16:47 +0000)]
Merge "Update to latest tzdata / switch back to zones.tab"
am: 44aeecc869

Change-Id: I1300ba5bbcca2d6add11ba980dcf211e8d79b4a1

7 years agoMerge "Update to latest tzdata / switch back to zones.tab"
Neil Fuller [Tue, 4 Apr 2017 16:39:56 +0000 (16:39 +0000)]
Merge "Update to latest tzdata / switch back to zones.tab"

7 years agoMerge "Make sure that the device name is not null before returning it"
Ajay Panicker [Tue, 4 Apr 2017 01:27:41 +0000 (01:27 +0000)]
Merge "Make sure that the device name is not null before returning it"
am: d4963e8035

Change-Id: Ia9f3baa2e1c78bb1ebde2be9a412d96f76e5a225

7 years agoMerge "Make sure that the device name is not null before returning it"
Treehugger Robot [Tue, 4 Apr 2017 01:11:07 +0000 (01:11 +0000)]
Merge "Make sure that the device name is not null before returning it"

7 years agoMake some intents public in SubscriptionManager.
Sanket Padawe [Mon, 3 Apr 2017 18:17:22 +0000 (11:17 -0700)]
Make some intents public in SubscriptionManager.

+ As per https://docs.google.com/document/d/1K8C7Ly8YVu032FQlwEdkv3ovcTYQCTvy0PaMax5PmZI/edit#heading=h.g6rt8vhyfjj1

Bug: 36572866
Test: Builds successfully.
Change-Id: Ibb1d1faae9a002ccb530446e24897955c12076e1
Merged-in: Ibb1d1faae9a002ccb530446e24897955c12076e1

7 years agoMake sure that the device name is not null before returning it
Ajay Panicker [Mon, 3 Apr 2017 19:15:54 +0000 (12:15 -0700)]
Make sure that the device name is not null before returning it

Bug: 30948380
Test: Pair a device
Change-Id: I1b5610c85d6e74cec89fab0db3db281938a05a8c

7 years agoMerge "Add test coverage for NetworkSpecifiers."
Lorenzo Colitti [Mon, 3 Apr 2017 10:45:22 +0000 (10:45 +0000)]
Merge "Add test coverage for NetworkSpecifiers."
am: 9a029b5262

Change-Id: Ia328b945af4c4f55ef560b33b00fa861b8f81b0d

7 years agoMerge "Add test coverage for NetworkSpecifiers."
Treehugger Robot [Mon, 3 Apr 2017 10:37:00 +0000 (10:37 +0000)]
Merge "Add test coverage for NetworkSpecifiers."

7 years agoMerge "ConnectivityService: simplify WakeLock management"
Hugo Benichi [Mon, 3 Apr 2017 09:03:13 +0000 (09:03 +0000)]
Merge "ConnectivityService: simplify WakeLock management"
am: c98db5caa2

Change-Id: I1e0ae930cd7a329febf21ff3fc83ad2d0a3be69b

7 years agoMerge "ConnectivityService: simplify WakeLock management"
Hugo Benichi [Mon, 3 Apr 2017 08:56:23 +0000 (08:56 +0000)]
Merge "ConnectivityService: simplify WakeLock management"

7 years agoAdd test coverage for NetworkSpecifiers.
Lorenzo Colitti [Mon, 3 Apr 2017 08:46:35 +0000 (17:46 +0900)]
Add test coverage for NetworkSpecifiers.

Tests various combinations of empty / non-empty NetworkSpecifiers
and changing specifiers on the fly.

Test: ConnectivityServiceTest passes
Bug: 27533960
Change-Id: Ibd6b4efc861dc51689e46f3882ba859223411bf0

7 years agoMerge "Import translations. DO NOT MERGE" into stage-aosp-master
TreeHugger Robot [Mon, 3 Apr 2017 02:11:39 +0000 (02:11 +0000)]
Merge "Import translations. DO NOT MERGE" into stage-aosp-master

7 years agoConnectivityService: simplify WakeLock management
Hugo Benichi [Thu, 30 Mar 2017 14:18:10 +0000 (23:18 +0900)]
ConnectivityService: simplify WakeLock management

This patch simplifies wakelock management by acknowledging that only one
acquisition at most is in flight at any time. This allows to remove the
serial number associated with wakelock acquisition and to avoid double
release when regaining a default network.

Example of $ adb shell dumpsys connectivity logs:
  NetTransition WakeLock activity (most recent first):
    03-31 00:15:13.816 - RELEASE (EVENT_CLEAR_NET_TRANSITION_WAKELOCK)
    03-31 00:14:59.216 - ACQUIRE for NetworkAgentInfo [WIFI () - 101]
    03-31 00:09:05.799 - RELEASE (EVENT_EXPIRE_NET_TRANSITION_WAKELOCK)
    03-31 00:08:05.738 - ACQUIRE for NetworkAgentInfo [WIFI () - 100]

Test: watched wakelock section $ adb shell dumpsys connectivity while
      turning on and off Wifi (with no other network).
Bug: 36703718
Change-Id: I899b0816c0e41b3991d9540e9b9a604914ff673a

7 years agoMerge "ConnectivityService: log wakelock activity in dumps"
Hugo Benichi [Sun, 2 Apr 2017 23:47:15 +0000 (23:47 +0000)]
Merge "ConnectivityService: log wakelock activity in dumps"
am: db104b2367

Change-Id: If08e0088ab25f1494aaf3a339a38e7a8e343d910

7 years agoMerge "ConnectivityService: log wakelock activity in dumps"
Hugo Benichi [Sun, 2 Apr 2017 23:40:25 +0000 (23:40 +0000)]
Merge "ConnectivityService: log wakelock activity in dumps"