284481 Commits

Author SHA1 Message Date
Hugo Benichi
4d80366762 Merge "ConnectivityManager: release all requests mapping to a callback."
am: 1a8f04b1b2

Change-Id: I30d3790822430d250d6005cc165e7fa10f56649e
2017-04-14 15:22:39 +00:00
Treehugger Robot
1a8f04b1b2 Merge "ConnectivityManager: release all requests mapping to a callback." 2017-04-14 15:10:10 +00:00
Hugo Benichi
dafed3d008 ConnectivityManager: release all requests mapping to a callback.
This patch changes how callback unregistration works in order to be
consistent with undocumented use cases currently de-facto supported
by the API (although in a buggy way):
  - callback recycling: releasing then reregistering a callback again.
  - multiple request registrations with the same callback.

The second use case is not desirable but needs to be taken into account
for now for the purpose of correctly releasing NetworkRequests
registered in ConnectivityService.

In order to support request release in both use cases with minimal
amount of complexity for the time being the following changes are done:
  - request to callback unmapping is done synchronously at callback
    release time.
  - all requests associated to a callback are unmapped at callback
    release time.

This fixes the following issues:
  - a callback stops being triggered as soon as it is released.
    Otherwise when recycling the callback immediately, it is possible
    the previous request associated with it triggers it, confusing the
    app.
  - when a callback is registered multiple times, the requests are not
    leaked.
  - when a callback is registered multiple times and then released, the
    N-1 first registrations do not trigger the callback anymore.

In the future it would be desirable to enforce the intended 1:1 mapping
between callbacks and requests at registration time.

Bug: 35921499, 35955593, 20701525
Test: - added new tests in ConnectivityManagerTest to test releasing,
      recycling, and a disabled test for no multiple regristration.
      - new tests catch regression causing b/35921499, b/35955593.
Change-Id: Ia0917ac322fc049f76adb4743bc745989fed6d26
2017-04-14 22:17:21 +09:00
Hugo Benichi
605eafe0a5 Merge "Captive portal: rotate fallback urls"
am: 76b3537dfd

Change-Id: I5583659f2f79cf5d42e7825dfbda875ce359ddb0
2017-04-14 06:54:10 +00:00
Treehugger Robot
76b3537dfd Merge "Captive portal: rotate fallback urls" 2017-04-14 06:41:08 +00:00
Rebecca Silberstein
6fc5051613 Merge "Add a default SSID prefix for local only hotspot"
am: e98a2942a4

Change-Id: I3981dbbaa2eee7e54e8c8fd2d9825a3c0866bdb2
2017-04-14 04:12:34 +00:00
Rebecca Silberstein
e98a2942a4 Merge "Add a default SSID prefix for local only hotspot" 2017-04-14 04:03:50 +00:00
Hugo Benichi
eef918a66c 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.

(not like commit 0908daaaf00e6b56ebed0a0fce9c3e3fe183a06b, this patch
uses a comma to separate fallback urls, which works as expected with
Java's String.split())

Test: built, flashed, tested manually with various portal networks.
Bug: 36532213
Change-Id: I3c010bfee5b99db03a500776fbf47959a29d0578
2017-04-14 08:19:39 +09:00
Hugo Benichi
4d47eba86a Merge "Revert "Captive portal: rotate fallback urls""
am: 9ea45b6106

Change-Id: Iea6582b4c7f347c24ebccf815256dd7125ab29de
2017-04-13 13:40:04 +00:00
Orion Hodson
0f7294af11 Merge "Unhide MethodHandles.explicitCastArguments()"
am: 891cab55d3

Change-Id: I6406a01c50df40a59e3af5432c1f31309cdb43e5
2017-04-13 13:34:27 +00:00
Hugo Benichi
9ea45b6106 Merge "Revert "Captive portal: rotate fallback urls"" 2017-04-13 13:25:42 +00:00
Treehugger Robot
891cab55d3 Merge "Unhide MethodHandles.explicitCastArguments()" 2017-04-13 13:25:12 +00:00
Hugo Benichi
2e43e45e1e 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
2017-04-13 12:43:49 +00:00
Hugo Benichi
8e5ebd9261 Merge changes Ia15f77e2,Icaa1f95c
am: c923752929

Change-Id: I98b29c91c68a63d6ddeffd03a690b7e841c2b5bc
2017-04-13 09:34:22 +00:00
Treehugger Robot
c923752929 Merge changes Ia15f77e2,Icaa1f95c
* changes:
  Captive portal: regroup hardcoded http response codes.
  Captive portal: rotate fallback urls
2017-04-13 09:24:33 +00:00
Erik Kline
85f5725fb5 Merge "Extract SimChangeListener to its own file"
am: 0ef8df6d52

Change-Id: Ib83aa0acc1cf19c04ed94a198bb8333c7e3a60b8
2017-04-13 08:33:12 +00:00
Treehugger Robot
0ef8df6d52 Merge "Extract SimChangeListener to its own file" 2017-04-13 08:19:07 +00:00
Hugo Benichi
a415870221 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
2017-04-13 16:45:47 +09:00
Hugo Benichi
0908daaaf0 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
2017-04-13 16:45:44 +09:00
Rebecca Silberstein
84b3139de5 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
2017-04-13 00:43:18 -07:00
Erik Kline
1303b8b9ca Merge "Ignore potential SystemProperties errors when setting net.dns"
am: f854c9034c

Change-Id: Ic9ac3a2b1162524369f19b876e91a234e56fdc37
2017-04-13 06:00:37 +00:00
Treehugger Robot
f854c9034c Merge "Ignore potential SystemProperties errors when setting net.dns" 2017-04-13 05:49:31 +00:00
Lorenzo Colitti
67401e25c2 Merge "Move some NetworkStats tests to tests/net."
am: ab3901dc8b

Change-Id: I68214c14658afbb5c92facb018988d2ed27bc351
2017-04-13 05:29:58 +00:00
Lorenzo Colitti
ab3901dc8b Merge "Move some NetworkStats tests to tests/net." 2017-04-13 05:18:47 +00:00
Erik Kline
4edba01eb4 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
2017-04-13 13:16:22 +09:00
Lorenzo Colitti
362bef45d1 Merge changes from topic 'network_specifier'
am: d0f476bdae

Change-Id: I783b2d06f3a5e8b9cd7940f1f1ef0dd951c734f1
2017-04-12 22:43:03 +00:00
Lorenzo Colitti
d0f476bdae Merge changes from topic 'network_specifier'
* changes:
  [CM] Unhide the NetworkSpecifier as object API
  Make the NetworkSpecifier a class instead of a string.
2017-04-12 22:27:37 +00:00
Jakub Pawlowski
d43127865b Merge "Bluetooth 5 PHY simplification"
am: a9acf9db97

Change-Id: Ibd712a7629d946c24640da0e07496c229c35f7ad
2017-04-12 21:35:25 +00:00
Jakub Pawlowski
a9acf9db97 Merge "Bluetooth 5 PHY simplification" 2017-04-12 21:22:29 +00:00
Shuo Qian
40cde7b71f Merge "ECBM SystemProperty cleanup"
am: 4718606368

Change-Id: Ie6b43fd0a0bfa7c813960d1bb53b7b57a4f82721
2017-04-12 21:00:50 +00:00
Shuo Qian
4718606368 Merge "ECBM SystemProperty cleanup" 2017-04-12 20:52:20 +00:00
nharold
176bfb58c6 Merge changes from topic 'ipsec-api-tweaks'
am: fddf677b8b

Change-Id: I0c0812164e8fa4b36fd43f00b7388d4c0cc337f1
2017-04-12 18:29:04 +00:00
Nathan Harold
9c2428ad4d IpSecManager and IpSecAlgorithm API Tweaks
am: 6045429b35

Change-Id: I93d58f64834e5a4c7bc1bf03a5baf2eb5364a36d
2017-04-12 18:27:09 +00:00
nharold
fddf677b8b Merge changes from topic 'ipsec-api-tweaks'
* changes:
  Add FileDescriptor Versions of applyTransportModeTransform()
  IpSecManager and IpSecAlgorithm API Tweaks
2017-04-12 18:13:57 +00:00
Jakub Pawlowski
9e377194e3 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
2017-04-12 10:57:03 -07:00
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
03f9a489cb Merge "Adding 20 free short codes for DCB and other purposes"
am: 70fea2df2a

Change-Id: Ic63e088d49796b6e98dc92bc3b0b261958d73e8c
2017-04-12 15:27:23 +00:00
Robert Greenwalt
70fea2df2a Merge "Adding 20 free short codes for DCB and other purposes" 2017-04-12 15:15:34 +00:00
Orion Hodson
784d3874f6 Unhide MethodHandles.explicitCastArguments()
Bug: 33192564
Test: m -j32
Change-Id: Ic80c9fa8bd81173220f4a1615e35d89b0ed621c2
2017-04-12 14:03:48 +01:00
Hugo Benichi
65fa0676bf Merge "Captive portal: fix probe urls at network creation"
am: 923ef69ae7

Change-Id: I82eb06ee1f9d69a1a3ccb5208947bdfcdbba6d81
2017-04-12 09:50:05 +00:00
Treehugger Robot
923ef69ae7 Merge "Captive portal: fix probe urls at network creation" 2017-04-12 09:38:41 +00:00
Erik Kline
227648f336 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
2017-04-12 15:57:49 +09:00
Mathieu Chartier
f62b12ae31 Merge "Fix some maps to be HEAP_DALVIK_CODE_CACHE instead of HEAP_DALVIK_ACCOUNTING"
am: d269f30d62

Change-Id: I2830356fd9288feef334e19a1281c720c6fd7fca
2017-04-12 00:09:47 +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
5f98be7f11 Merge "jni: isLoggable: adapt to removal of property name size limit"
am: cf39eea407

Change-Id: I225add287a014fa8e2623d1e61456a5c523d5377
2017-04-11 23:25:06 +00:00
Mark Salyzyn
cf39eea407 Merge "jni: isLoggable: adapt to removal of property name size limit" 2017-04-11 23:13:08 +00:00
shuoq
d199113e97 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
2017-04-11 14:59:29 -07:00
Amit Mahajan
7c6fa75512 Merge "Add p2 option in openLogicalChannel."
am: f954f2d5cc

Change-Id: I3437793f39ba6747554fec383ac7ab9f88df9266
2017-04-11 21:34:51 +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