Commit Graph

3838 Commits

Author SHA1 Message Date
liangweikang@xiaomi.com
23dd228784 Merge "[BUG] java.util.MissingFormatArgumentException: Format specifier '%d'" am: 755c6ea768 am: 81173713d7 am: a900930d58
am: d5aa5a6063

Change-Id: I4b4973570b8a8f1757986b1aa8ee1a6c3496d976
2017-07-03 00:45:49 +00:00
liangweikang@xiaomi.com
d5aa5a6063 Merge "[BUG] java.util.MissingFormatArgumentException: Format specifier '%d'" am: 755c6ea768 am: 81173713d7
am: a900930d58

Change-Id: I180c73a8dc41ea907c1e7fd76624fce0a4b523d3
2017-07-03 00:40:18 +00:00
liangweikang@xiaomi.com
81173713d7 Merge "[BUG] java.util.MissingFormatArgumentException: Format specifier '%d'"
am: 755c6ea768

Change-Id: I1687f90ae7d042db2575ca10b168833e27adc7cb
2017-07-03 00:26:47 +00:00
Treehugger Robot
755c6ea768 Merge "[BUG] java.util.MissingFormatArgumentException: Format specifier '%d'" 2017-07-03 00:17:57 +00:00
liangweikang@xiaomi.com
e3888bb177 [BUG] java.util.MissingFormatArgumentException: Format specifier '%d'
Bug: https://issuetracker.google.com/issues/63121293

Test: null

Change-Id: I2745c415e21a7f26535605cc5bef7eaf2109ae8e
Signed-off-by: liangweikang@xiaomi.com <liangweikang@xiaomi.com>
2017-06-30 01:32:46 +00:00
Udam Saini
f1c244ddf3 Merge "Adds necessary permissions to system apis" 2017-06-27 17:59:21 +00:00
Udam Saini
8f7d6a7ece Adds necessary permissions to system apis
adds privileged permission for getCaptivePortalServerUrl
adds tether privileged permission for
startTethering,isTetheringSupported

bug:62348162

Test: make and manual testing
Change-Id: I8eb8e3c9dcd7201abe9ea303ee57fe99073d67eb
2017-06-26 17:27:36 -07:00
Hugo Benichi
83be1f8817 Merge changes I193297e0,I43beb966 am: c729ff8253 am: 5dec1df23b -s ours
am: 82cd773397

Change-Id: Ic54e19a430fb16732197f289b46e5a3c8669d26f
2017-06-24 00:51:09 +00:00
Hugo Benichi
82cd773397 Merge changes I193297e0,I43beb966 am: c729ff8253
am: 5dec1df23b  -s ours

Change-Id: If036f9c7b4219a20ddb21d5aa1b7f3e3b29bee51
2017-06-24 00:40:48 +00:00
Robert Quattlebaum
b4ddb16892 NetworkCapabilities: Added support for TRANSPORT_LOWPAN
This change simply adds a new constant, `TRANSPORT_LOWPAN`, for
identifying low-power wireless networks like Thread.

Bug: b/33073713
Merged-In: Ie4aa77496f8ff466fa1a5fbc556e9c029457a689

(cherry pick from commit 103292d0b7)

Change-Id: I21f9b41b8b31c63ceeb1bc9c965f6da2614c356a

Test: runtest frameworks-net (not in original commit message)
2017-06-23 16:08:45 +09:00
Hugo Benichi
cbe178fa80 Connectivity metrics: serialize networkId, transports, ifname
This patch adds translation from ConnectivityMetricsEvent to
IpConnectivityEvent of recently added fields:
 - top-level network id
 - top-level ifname
 - transports

Also adds inference of link layer from transports or ifname.

At the moment these new fields are not populated in
ConnectivityMetricsEvent. Follow-up patches will fill this gap for
the events of the android.net.metrics package.

Test: new unit tests, $ runtest frameworks-net passes
Bug: 34901696
Merged-In: I563a6a3183470bdfaabb7c781a1beaf6b1058bf0

(partial cherry pick from commit 45f6ef836d)

Change-Id: I6a00270e73a1bd07f23c367f2394d90a43ced47a

Test: runtest frameworks-net (not in original commit message)
2017-06-23 16:07:38 +09:00
Hugo Benichi
dd05bd6dbe Merge "ConnectivityManager: fix style issue" am: e74f3adba5 am: ec54a40339
am: 84e0cbf218

Change-Id: Iecf5399d77ae742cc66ac7a3cab4570464c4e95f
2017-06-22 19:46:28 +00:00
Hugo Benichi
84e0cbf218 Merge "ConnectivityManager: fix style issue" am: e74f3adba5
am: ec54a40339

Change-Id: I5a420534268a0daec19f1f0677dcfe7abd8faf73
2017-06-22 08:03:46 +00:00
Hugo Benichi
7300842496 Merge changes I4d2be5d9,I34706201 into oc-dr1-dev
am: c649a9978a  -s ours

Change-Id: I576c2ff37bcf2885f0b126b9d66a3d3d23974146
2017-06-20 08:45:56 +00:00
Hugo Benichi
c436380ebf Merge "Better errors from unregisterNetworkCallback" am: 04e89ad631 am: ca6ebb0f39
am: 3ff91f42c1

Change-Id: Ia959388c875c22e56f5f2867f33a7329ce4b3535
2017-06-20 05:26:40 +00:00
Hugo Benichi
3ff91f42c1 Merge "Better errors from unregisterNetworkCallback" am: 04e89ad631
am: ca6ebb0f39

Change-Id: Ib380ee7c3fc85db353682ee7abfe97842eaeeb29
2017-06-20 05:19:46 +00:00
Hugo Benichi
7ab07a36c9 ConnectivityManager: fix style issue
Simple style fix flagged by linter.

Test: no functional change.
Change-Id: I2cb19912cba149eeaffdd157616d210259d42959
2017-06-20 14:11:57 +09:00
Hugo Benichi
412a2ee8a1 Better errors from unregisterNetworkCallback
This patch changes the validation of unregisterNetworkCallback in
ConnectivityManager so that the caller can better distinguish the case
of a callback that was never registered from the case of a callback that
has already been unregistered.

Bug: 62497809
Test: runtest frameworks-net passes
Merged-In: I58eda22725dd4e67dc4b64207e38cf482032df10

(cherry picked from commit 605b295011be74c786a2eef586d31ccb07160422)

Change-Id: I4d2be5d9037cfec03218b702d707f50808ee0694
2017-06-20 10:06:44 +09:00
Hugo Benichi
bee30fe597 Better errors from unregisterNetworkCallback
This patch changes the validation of unregisterNetworkCallback in
ConnectivityManager so that the caller can better distinguish the case
of a callback that was never registered from the case of a callback that
has already been unregistered.

Bug: 62497809
Test: runtest frameworks-net passes
Change-Id: I58eda22725dd4e67dc4b64207e38cf482032df10
2017-06-19 22:11:50 +09:00
Android Build Merger (Role)
8a822d3269 Merge "Update captive portal notif for Android TV am: e8e9dbcc23 am: e7ad4b1828" into oc-dr1-dev-plus-aosp 2017-06-10 07:36:23 +00:00
Rhiannon Malia
ea766e295b Update captive portal notif for Android TV am: e8e9dbcc23
am: 7ae4669125

Change-Id: I258a24b9069f5ded14c3cec53be3039086cbf0ba
2017-06-10 07:32:47 +00:00
Rhiannon Malia
e7ad4b1828 Update captive portal notif for Android TV
am: e8e9dbcc23

Change-Id: I60a67b0f22aa186e8b738b8a9ee002b2b5b04e42
2017-06-10 07:26:51 +00:00
Rhiannon Malia
7ae4669125 Update captive portal notif for Android TV
am: e8e9dbcc23

Change-Id: I2096324e76770fee698507c2681d9c2fd92165b9
2017-06-10 07:26:46 +00:00
Rhiannon Malia
e8e9dbcc23 Update captive portal notif for Android TV
Test: Connect to captive portal, notification appears in side panel

BUG:38453402
Change-Id: I39baf90897f2f3d67b8b03c31dd74fa1d39d39de
2017-06-10 05:22:42 +00:00
Robert Quattlebaum
103292d0b7 NetworkCapabilities: Added support for TRANSPORT_LOWPAN
This change simply adds a new constant, `TRANSPORT_LOWPAN`, for
identifying low-power wireless networks like Thread.

Bug: b/33073713
Change-Id: Ie4aa77496f8ff466fa1a5fbc556e9c029457a689
2017-06-06 18:38:31 +00:00
Jeff Sharkey
2cb5aedc15 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 53d8c2b663

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
53d8c2b663 Merge "Annotate @SystemApi with required permissions." into oc-dev
am: c1406978a4

Change-Id: I305967cad945a807c3f8234efabaad0ef8b591d1
2017-06-05 22:28:21 +00:00
Jeff Sharkey
9b39e9abdb Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Hugo Benichi
76fab4b83c Merge "Fix race condition in NsdManagerTest" am: f2383db747 am: 2dfb494827 am: ba82d646a6
am: ac7ad05464

Change-Id: Ia9237e9be9db7447985726be06a3d9020ab72087
2017-05-31 13:34:20 +00:00
Hugo Benichi
ac7ad05464 Merge "Fix race condition in NsdManagerTest" am: f2383db747 am: 2dfb494827
am: ba82d646a6

Change-Id: I7efa4f92838428f69a6a7a9fa767fefa47246f69
2017-05-31 13:25:53 +00:00
Hugo Benichi
986eaa7b76 Fix race condition in NsdManagerTest
NsdManagerTest relies on the lastMessage variable to assert the
connection of a client to the service. The asserts in test are done on a
different thread, although the variable was not qualified volatile,
which creates the chance to read a stale value. This patch fixes this
race by marking the variable volatile.

Bug: 32561414
Bug: 62044295
Test: NsdManagerTest works
Change-Id: I0bc2cd8059c6ff8b78a2dda0ba8d6bc7e13ef951
2017-05-31 15:35:54 +09:00
Hugo Benichi
a8731d3470 Merge "ConnectivityServiceTest: more tweaks to testRequestBenchmark" am: 76efbb30f5 am: 5f046cb614 am: 7bbdfcd8eb
am: bbdcd7c4a4

Change-Id: I78cfc9306ae8c240f10e991a5de51d09237257af
2017-05-31 04:20:16 +00:00
Hugo Benichi
bbdcd7c4a4 Merge "ConnectivityServiceTest: more tweaks to testRequestBenchmark" am: 76efbb30f5 am: 5f046cb614
am: 7bbdfcd8eb

Change-Id: I96c39ca1899768d039a108426fb04655aaf8d55f
2017-05-31 04:10:03 +00:00
Hugo Benichi
4d7887a2fa ConnectivityServiceTest: more tweaks to testRequestBenchmark
Recent continuous testing runs indicates that commit 79614aee did not
completely fixed the issue with testRequestBenchmark.

This patch changes the name of the test to not include "test" and
removes @SmallTest annotation, which should do the job of @Ignore while
ConnectivityServiceTest still extends AndroidTestCase.

In addition timeouts are adjusted to take into account recent failures
observed.

This is the last pending action before turning on FrameworksNetTests on
presubmits.

Bug: 32561414
Test: no functional change
Change-Id: I56ef334e19e99e5a3483418330e5f0ccd6eb31bb
2017-05-31 10:23:42 +09:00
Erik Kline
cd5c213d8b Merge "Support "dumpsys connectivity tethering"" am: df8b274a65 am: 06e6033327 am: ff8b93f815
am: 1794c97316

Change-Id: I222bf3363de805dd21e1cd62c056a292a5bd9f90
2017-05-30 14:07:51 +00:00
Joel Scherpelz
4da1522446 Merge "Support requesting and receiving wakeup events" am: 10a2e83a7e am: 4971745cf4 am: 880974f111
am: 0d727b6f6e

Change-Id: Ieebf469339b2c3ccc928a342e5e182f7c8c00480
2017-05-30 14:05:09 +00:00
Erik Kline
1794c97316 Merge "Support "dumpsys connectivity tethering"" am: df8b274a65 am: 06e6033327
am: ff8b93f815

Change-Id: I68ff0810e4109c52e1d594a4b75fc768570ef59d
2017-05-29 08:55:13 +00:00
Erik Kline
df8b274a65 Merge "Support "dumpsys connectivity tethering"" 2017-05-29 08:33:10 +00:00
Joel Scherpelz
0d727b6f6e Merge "Support requesting and receiving wakeup events" am: 10a2e83a7e am: 4971745cf4
am: 880974f111

Change-Id: I98aa768cf47938aa0996ddabbbc9feb9dae96f1e
2017-05-29 03:51:25 +00:00
Joel Scherpelz
10a2e83a7e Merge "Support requesting and receiving wakeup events" 2017-05-29 03:28:02 +00:00
Erik Kline
91b6cca3ff Support "dumpsys connectivity tethering"
Also print current upstream interface in tethering dump output.

Test: as follows
    - build
    - flashed
    - booted
    - runtest frameworks-net passes
    - "dumpsys connectivity tethering" shows just tethering info
Bug: 32163131
Bug: 36504926
Bug: 36988090
Bug: 38152109
Bug: 38186915
Bug: 38218697
Change-Id: I7f185fd71946a032e7f815207016294892df135d
2017-05-29 11:51:28 +09:00
Joel Scherpelz
a235a8199f Support requesting and receiving wakeup events
Test: as follows
    - built
    - flashed
    - booted
    - ConnectivityServiceTest passes
Bug: 28806131

Change-Id: Ifc45260d5315479393da2c859ba4afed4e0e8c85
2017-05-29 11:19:16 +09:00
Hugo Benichi
f1b07ce2a5 Merge changes If4deb106,Ib25d7658 am: 0388f0e47b am: 41a57af66a am: ae278410f5
am: 7cabb60411

Change-Id: Id592d287a92c89320a682d660792b9b6c67e7563
2017-05-26 01:04:44 +00:00
Hugo Benichi
7cabb60411 Merge changes If4deb106,Ib25d7658 am: 0388f0e47b am: 41a57af66a
am: ae278410f5

Change-Id: I4fa34b647e7b2408d4493cfb148ae7d8c24bd6e8
2017-05-26 00:58:27 +00:00
Hugo Benichi
79614aee12 @Ignore ConnectivityServiceTest#testRequestBenchmark
Ignore the last remaining test in ConnectivityServiceTest with spurious
failures. testRequestBenchmark has some intrinsic chances of failure due
to the fact it attempts to assert elapsed time durations against a
reference target.

Bug: 32561414
Test: no functional change
Change-Id: Ib25d76581b47997b2ef84df3e6a9fd9224b85d92
2017-05-26 07:18:15 +09:00
Erik Kline
7c05d6abdb Merge "Expand logging capabilities of Tethering subsystem" into oc-dev am: fc6e6d1372 -s ours
am: c3d0beaf2e  -s ours

Change-Id: If3bc370e618ebbda7ec21b26c2701f65e8935914
2017-05-25 09:22:58 +00:00
Erik Kline
c3d0beaf2e Merge "Expand logging capabilities of Tethering subsystem" into oc-dev
am: fc6e6d1372  -s ours

Change-Id: I44c8ac70d0d3c53e52807697e62c40474d5fa356
2017-05-25 09:14:17 +00:00
Hugo Benichi
e0cabcd698 Merge "NsdServiceInfo: move test to tests/net" am: 48859e01d5 am: 1b0f4bf606 am: e8c2700519
am: 6cd853a362

Change-Id: I11af75ab8ebc4081cc90d29b83d8a1742f00a3ab
2017-05-25 01:18:45 +00:00
Hugo Benichi
6cd853a362 Merge "NsdServiceInfo: move test to tests/net" am: 48859e01d5 am: 1b0f4bf606
am: e8c2700519

Change-Id: I44cae417fcddad72c13938b6fb751de6ed784046
2017-05-25 01:12:51 +00:00
Erik Kline
14ec7c7a2b Expand logging capabilities of Tethering subsystem
Introduce a SharedLog that can be shared among all Tethering
components.  All log entries go to the same log, and each includes
its subsystem name.  Additionally, all entries emitted to the
system log shared the same tag, so can easily be watched.

More subsystems can inherit a SharedLog, but to minimize cherry-pick
conflicts we limit ourselves to these changes only.

Test: as follows
    - built
    - flashed
    - booted
    - log output observed via dumpsys
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36988090
Bug: 38218697
Merged-In: Ia9d15f0dcc49ce070f8684eb8c8481310859faa5
Merged-In: I2644f518304a03da469fb9c2aa01a6d8f1a97901
Change-Id: I1229d4c55987402d84b0d4a2c8a595e0c829aa3e
(cherry picked from commit 7747fd4ce055e8e1f6381062a58b867728f57d85)
2017-05-24 19:52:51 +09:00