Commit Graph

63338 Commits

Author SHA1 Message Date
Jakub Pawlowski
6260ea5ab7 Merge "Bluetooth: document status value in PHY read/update" am: 06abc2c404
am: 3d95c68d2e

Change-Id: I765bbeb4e21ef1102f92c708e93a339f928ee5e3
2017-04-25 19:41:54 +00:00
Jakub Pawlowski
e55c446977 Bluetooth: document status value in PHY read/update
Bug: 37544152
Test: none
Change-Id: I2bac468f833c73cd282b1dac80b6553917996604
2017-04-25 17:46:40 +00:00
Etan Cohen
887fd90742 Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" am: 2fd19ffa06
am: 3c6305cc55

Change-Id: I4e2461f68db983292c167a11746b8cfe47995e77
2017-04-25 13:34:06 +00:00
Etan Cohen
2fd19ffa06 Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" 2017-04-25 13:21:36 +00:00
Jakub Pawlowski
526719a1a2 Merge "Get rid of the IAdvertiserCallabck" am: 7503b11b14
am: 2fb02a252c

Change-Id: Idbdbc555a141b6f231e91cf05525c7812118db49
2017-04-24 19:11:07 +00:00
Hugo Benichi
876ebaa8e1 Merge "Add BitUtils bit packing methods (Connectivity metrics: add transports pretty printing)" am: 10b5024d5e
am: 23d41ee68e

Change-Id: I2eb51c866ad016da0e0e37c71b2e6f1a8875ae36
2017-04-24 18:54:23 +00:00
Robin Lee
8b90758b25 Merge "Remove unused network management RPCs" am: 53a122986d
am: 10ebc1879b

Change-Id: I212537d25c70b3e2c4f895bba2957584f44ea075
2017-04-24 18:39:55 +00:00
Jakub Pawlowski
89e10d3eb4 Get rid of the IAdvertiserCallabck
Bug: 30622771
Test: none
Change-Id: I2c55f96e71cd3be67f88201ab07c91730cd85971
2017-04-24 15:42:57 +00:00
Hugo Benichi
10b5024d5e Merge "Add BitUtils bit packing methods (Connectivity metrics: add transports pretty printing)" 2017-04-23 23:35:53 +00:00
Robin Lee
53a122986d Merge "Remove unused network management RPCs" 2017-04-22 21:59:57 +00:00
Hugo Benichi
9910dbc682 Add BitUtils bit packing methods (Connectivity metrics: add transports pretty printing)
This patch is a partial cherry-pick from commit
df456e13a1 for the BitUtils and
NetworkCapabilities classes.

Bug: 34901696
Test: none

(cherry picked from commit df456e13a1)

Merged-In: Id04f9080e7f75608deeb49306aec34941e71794c
Change-Id: I64eae49f646365b7cd1683a689315fe03bf0bdd9
2017-04-22 09:58:42 +09:00
Hugo Benichi
d2181235b9 Merge "NsdManager: add unit tests" am: dc54ad7fc3
am: 40ab8401b2

Change-Id: Ie8b30310a8da64e6247472fa17945d003b1894e8
2017-04-22 00:49:19 +00:00
Hugo Benichi
dc54ad7fc3 Merge "NsdManager: add unit tests" 2017-04-22 00:31:28 +00:00
Robert Greenwalt
88a6acb9f6 Merge "Mark Restricted APN connections as restricted." am: b90b2015d3
am: 1778682242

Change-Id: I2300c5e98b8e3339825bfac7ea1f6d514b5ae71f
2017-04-21 23:29:47 +00:00
Treehugger Robot
b90b2015d3 Merge "Mark Restricted APN connections as restricted." 2017-04-21 23:12:52 +00:00
Robert Greenwalt
a7e148a874 Mark Restricted APN connections as restricted.
If anything unrestricted is bundled in the whole thing has to be
unrestricted (we can't restrict based on destination or intent)
but the NOT_METERED flag wasn't taken into account.

This wasn't a problem before because telephony set that statically
and late, but a change caused it to be marked NOT_METERED earlier
which exposed this bug.

bug: 37208956
Merged-In: I7b7a1c38621ce0ecde8cf041e82b1ebb7a9c6f15
Test: new NetworkCapabilitiesTest.  Fails without fix, works with.
Change-Id: I86c1b2854413a94662aa53e697d32380695ab9ac
2017-04-21 22:00:17 +00:00
Jakub Pawlowski
b4be7093da Merge "Bluetooth: improve getLeMaximumAdvertisingDataLength comment" am: c8d5f84fcf
am: e00b92e550

Change-Id: I6805a973e91ac16cfc5d1c30567df04e7ed98ba2
2017-04-21 20:43:55 +00:00
Jakub Pawlowski
4634b5cd27 Bluetooth: improve getLeMaximumAdvertisingDataLength comment
Bug: 37534792
Test: none
Change-Id: Ieff71356aceb0e2a4c6e81d9053f854448e0c927
2017-04-21 20:28:39 +00:00
Etan Cohen
859748f08c [AWARE] Add UID checking to WifiAwareNetworkSpecifier
Wifi Aware networks are per app - i.e. a requestor gets
a dedicated network. Change verifies that the only the
original requestor matches the created network (using UID).

Bug: 36053921
Test: Integration (sl4a) tests
Change-Id: I4ff3994731dd7ccb88e2bea333d1e6905b136f02
2017-04-21 18:47:35 +00:00
Hugo Benichi
db8adb7983 NsdManager: add unit tests
This prepares some refactoring and the addition of a timeout to
resolveService.

Test: new tests pass
Bug: 37013369, 33298084
Change-Id: Ie8277bd5983278507bfa70495b4ce7d13895b24b
2017-04-21 05:16:37 +00:00
Stanley Tng
559f49a4a8 Merge "Allow the Bluetooth MAC address to be updated asynchronously (2/3)" am: c5680c9b05
am: 16609dfe18

Change-Id: I9c9c500bab98168da48d69cc7e4c93a33b8571bd
2017-04-21 01:30:21 +00:00
Stanley Tng
ad4d1d8e28 Allow the Bluetooth MAC address to be updated asynchronously (2/3)
There are intermittent issues where either the returned Bluetooth
MAC address to Java framework is uninitialized or this address update
arrives too late. This fix will do 2 things:
(1) Returns error when MAC address is unavailable in the native code.
(2) Updates the MAC address later by adding a new broadcast event.

Test: Check address for these cases: factory reset, system reboot, and
Bluetooth re-enable.
Bug: 36709382

Change-Id: I09720193e38fdf9139e1bb146f8e1847e2b65b1a
2017-04-20 23:34:20 +00:00
Erik Kline
3fa8908370 Merge "Add local-only hotspot info into tether state change broadcast" am: 4c7a999d79
am: 6af3dd0fc3

Change-Id: Icef7c38313576219b4a55eb10648297b18597ef6
2017-04-20 13:00:52 +00:00
Hugo Benichi
b51307e12e Merge "ConnectivityManager: remove obsolete callback types" am: 458f75ef69
am: 23ee1621c7

Change-Id: Ib7ff014bd0b7729ca2d02956c190f368963ff632
2017-04-20 12:53:22 +00:00
Treehugger Robot
4c7a999d79 Merge "Add local-only hotspot info into tether state change broadcast" 2017-04-20 12:47:55 +00:00
Hugo Benichi
458f75ef69 Merge "ConnectivityManager: remove obsolete callback types" 2017-04-20 12:38:29 +00:00
Erik Kline
8351faa900 Add local-only hotspot info into tether state change broadcast
Test: as follows
    - build
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - manually starting tethering shows Settings and icon updates
Bug: 31466854
Bug: 32163131

Change-Id: I938074587dfeec221c5cdb43a392802ad3fc3589
2017-04-20 19:44:01 +09:00
Erik Kline
d9bfb83d96 Merge "Make tetherChangePermission to be secured for AppOps permission" am: fe86a197a1
am: 0d1f04384f

Change-Id: I8c0d0037bace2b9a3992e78dc0f853b92a8e0484
2017-04-20 04:47:16 +00:00
Hugo Benichi
7bbd03be36 Merge "ConnectivityManager: unify prety printing of callback types." am: 0a4dc6a5d2
am: 3a0e92fada

Change-Id: Ie639f2c9685f19ef00ddb4ac937e6e9576998b80
2017-04-20 04:40:34 +00:00
Erik Kline
fe86a197a1 Merge "Make tetherChangePermission to be secured for AppOps permission" 2017-04-20 04:28:53 +00:00
Hugo Benichi
dba33db572 ConnectivityManager: remove obsolete callback types
This patch also:
  - suppresses callback triggers from ConnectivityService for these
    obsolete callback types.
  - marginally refactors callCallbackForRequest().

Test: runtest frameworks-net
Change-Id: Idfb75640732943c599de4975f252f706d21ad594
2017-04-20 10:42:38 +09:00
Hugo Benichi
a038568676 ConnectivityManager: unify prety printing of callback types.
And also remove some small code duplication (checkNotNull).

Test: built, flashed, runtest frameworks-net
Change-Id: Id6c13bca9d12f70b88806032e0a4fa198efbedc6
2017-04-20 10:42:38 +09:00
Jakub Pawlowski
f3732e2fe2 Merge "Expose LE advertiser address for easier PTS tests (1/6)" am: f2e6988350
am: fc99848b96

Change-Id: Ie3ded1b0237b56bb4c81ad7a51c50b82267bc536
2017-04-19 21:44:50 +00:00
Jakub Pawlowski
4bc4a44100 Expose LE advertiser address for easier PTS tests (1/6)
This patchset adds a hidden method getOwnAddress, that lets app with
BLUETOOTH_PRIVILEGED permission to lear their own addreess. This is done
exclusively for PTS tests.

Bug: 35147497
Test: manual
Change-Id: Iaf0f2fe0613de44b8430ac25e691d66a4ad44f8d
2017-04-19 21:32:57 +00:00
Jakub Pawlowski
8359e191ae Merge "Read by UUID for PTS tests (1/5)" am: 7826c08e21
am: 0c9c0969cc

Change-Id: Ia850b9ad1d0d2e92a2c987c2c1cd24a44f7cfb3f
2017-04-19 16:13:50 +00:00
Tetsutoki Shiozawa
335d2edee2 Make tetherChangePermission to be secured for AppOps permission
Symptom:
AppOps verified the incorrect package of calling tether state
changing API.
It threw SecurityException by mistake.

Solution:
Pass the correct package name to enforceTetherChangePermission.

Bug: 32931147
Change-Id: Ia1167f26f556678b189a24a4a716f1a7e5cb12eb
2017-04-19 16:50:33 +09:00
nharold
6eab2ee093 Merge changes from topic 'ipsec-hide-overloads' am: fe358c6adf
am: 8508bc52d2

Change-Id: I114e0175d72cdbabf47ed230b2971b57a6c210f1
2017-04-18 22:02:48 +00:00
Nathan Harold
7883c5d460 Consistenly Throw IOExceptions from IpSecManager am: 0bfb207532
am: 5db180bbb7

Change-Id: I85ec1413eff50887853f13fa02dcc461071fb210
2017-04-18 22:01:32 +00:00
Jakub Pawlowski
de74891d1c Read by UUID for PTS tests (1/5)
Add a hidden api for reading characteristic by UUID for PTS.

Bug: 35150313
Test: sl4a GattReadTest.byUuid
Change-Id: Ice4076d99e4694d20374ba0fdcae74d5ae841147
2017-04-18 20:47:03 +00:00
Nathan Harold
da18b028f8 Hide Socket+DatagramSocket IpSecTransform methods
These methods do not currently work for IPv4 sockets,
so they need to be hidden until the underlying kernel
code can be made to work properly in a dual-stack
environment.

Bug: 36073210
Test: compilation
Change-Id: Idce367f638a42da374a7f1dc5ebb8931c9555e06
2017-04-17 19:41:08 -07:00
Nathan Harold
0bfb207532 Consistenly Throw IOExceptions from IpSecManager
Bug: 36073210
Test: api-update
Change-Id: Ia3825e85b09b6330f1326a26cf9e1cadf9dacf71
2017-04-17 17:57:41 -07:00
Yifan Hong
ee93d9da20 Merge changes from topic 'vintf_check_compat_native' am: 6d033475b3
am: 4fccec4f81

Change-Id: Ib2691dd7d9b35d20ac71b50a090392e736b51bf7
2017-04-17 18:35:52 +00:00
Yifan Hong
6d033475b3 Merge changes from topic 'vintf_check_compat_native'
* changes:
  Update for removing mount arg to VintfObject::CheckCompatibility
  Add Java API for libvintf.
2017-04-17 18:12:30 +00:00
Hugo Benichi
e505b37ec5 Merge "ConnectivityManager: release all requests mapping to a callback." am: 1a8f04b1b2
am: 4d80366762

Change-Id: I8c5d3fba8aaa19e8ffd1146ddb68c4279140f921
2017-04-14 15:29:09 +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
4479901ff3 Merge "Captive portal: rotate fallback urls" am: 76b3537dfd
am: 605eafe0a5

Change-Id: I456d8a2af20dc2fa1553e0e27ec0280380ae6f38
2017-04-14 07:00:41 +00:00
Yifan Hong
4e01db8c12 Add Java API for libvintf.
android.os.VintfObject has two methods:

- report: return device info that can be reported to OTA server
- verify: verify that metadata for a given OTA package is
          compatible.

Test: pass
Test: adb shell am instrument -w -e class android.os.VintfObjectTest \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 36814503

Change-Id: Iff8fae289eec8ae9cfc327d0d0d36a1cdd5e6800
2017-04-13 18:04:30 -07: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 0908daaaf0, 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
Dave Friedman
27aeab9763 Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb am: 2d642f9e2d
am: f125662db1

Change-Id: I5220c1ef4ac51e876c3461b64e2a3dd54c9e2b48
2017-04-13 17:28:34 +00:00