Commit graph

4,287 commits

Message SHA1
Merge "Fix NPE in NsdServiceTest"
am: c30decbfe8

Change-Id: Ic9b7aaec14066d18247cc1efbdc06be1e6a79f29

Hugo Benichi   authored and   android-build-merger   commited 2017-09-28 12:22:34 +00:00
a9177b3748
Merge "Fix NPE in NsdServiceTest"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-09-28 12:13:18 +00:00
c30decbfe8
Merge "Do not throw on call to isTetheringSupported w/o permission" am: 9f04f7a609 am: 38a3b1cda1
am: f4c8a84039

Change-Id: I076cb752b5d48a2a16abec72a47fe61690e90227

Jean Chalard   authored and   android-build-merger   commited 2017-09-28 07:58:59 +00:00
08e07a308a
Merge "Do not throw on call to isTetheringSupported w/o permission"
am: 9f04f7a609

Change-Id: Ie2ed67525e719104cef1537568f944b77d5f5e4e

Jean Chalard   authored and   android-build-merger   commited 2017-09-28 07:47:30 +00:00
38a3b1cda1
Merge "Do not throw on call to isTetheringSupported w/o permission"
Jean Chalard   authored and   Gerrit Code Review   commited 2017-09-28 07:39:14 +00:00
9f04f7a609
Do not throw on call to isTetheringSupported w/o permission
...just return false instead.

Test: Made an app to test this. Made sure it doesn't have
Test: the required permission. Checked it crashes with
Test: SecurityException without this change. Checked that it
Test: doesn't with it.

Merged-In: Ib5b17a7f68c1327f47fe1f54c0454c51f4226907
Change-Id: Id20d3c240ec5d70d085e0366b92ab3a514f3e7c8
(cherry picked from commit ffacaef813)

Chalard Jean   commited 2017-09-28 16:34:39 +09:00
eb137aebc9
Fix NPE in NsdServiceTest
Continuous test dashboards report that quit() can crash sometimes
due to mThread being null.

This patch adds a null guard in tearDown().

Bug: 32561414
Test: runtest frameworks-net
Change-Id: If66fb47e31e77d25b4741a786f12eb78f0b9102e

Hugo Benichi   commited 2017-09-28 15:22:13 +09:00
210ab83b77
Declare support for Ethernet if the service is running.
am: 2c9dd64d94

Change-Id: I5df25cfc5e5dfe5b04f206842b284011d0d4f8d5

Lorenzo Colitti   authored and   android-build-merger   commited 2017-09-27 11:20:50 +00:00
d4e7800f18
Merge "Delete the legacy framework code for manipulating ND offload." am: 3c0bf71eee am: fc56002707
am: bb21618a86

Change-Id: I07d9753e214af311d3dcab6f8016442f60388700

Lorenzo Colitti   authored and   android-build-merger   commited 2017-09-27 11:05:29 +00:00
f384a58f79
Merge "Adds necessary permissions to system apis" am: efb7b861d3 am: f79e177f1f
am: 19fc73f8dc  -s ours

Change-Id: If082278ab91e01852155afc1748474a937d7faae

Jean Chalard   authored and   android-build-merger   commited 2017-09-27 10:54:58 +00:00
765027efbe
Merge "Delete the legacy framework code for manipulating ND offload."
am: 3c0bf71eee

Change-Id: I060bd7632b809d89224d250c697ac9d2e89d5c2d

Lorenzo Colitti   authored and   android-build-merger   commited 2017-09-27 10:53:05 +00:00
fc56002707
Merge "Delete the legacy framework code for manipulating ND offload."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2017-09-27 10:46:36 +00:00
3c0bf71eee
Merge "Adds necessary permissions to system apis"
am: efb7b861d3

Change-Id: Ifa5d94cdd883c3e1b983c985c0c17fe61e864352

Jean Chalard   authored and   android-build-merger   commited 2017-09-27 09:58:51 +00:00
f79e177f1f
Merge "Adds necessary permissions to system apis"
Jean Chalard   authored and   Gerrit Code Review   commited 2017-09-27 09:50:42 +00:00
efb7b861d3
Merge "Declare support for Ethernet if the service is running." am: 21fcca6818 am: 5b906e1d11
am: a6648cc90b

Change-Id: Iafd9807ab76ce4e4ab1fd506d7b0e2b2b7017751

Lorenzo Colitti   authored and   android-build-merger   commited 2017-09-27 08:51:51 +00:00
d6cc68dab4
Declare support for Ethernet if the service is running.
On some devices, support for TYPE_ETHERNET is not specified in
the networkAttributes config resource, even though the device is
capable of supporting Ethernet (e.g., via USB host adapters).
This leads to Ethernet working but various connectivity APIs
behaving as if it was not - for example, no CONNECTIVITY_ACTION
broadcasts will be issues when it connects or disconnects.

Ensure that ConnectivityService always treats Ethernet as
available if the service is running. Currently the service is
started if the device supports FEATURE_ETHERNET or
FEATURE_USB_HOST.

(cherry picked from commit 7bbe3eee52c08ee92a81b7bed395ca5499554cc4)

Bug: 37359230
Test: bullhead builds, boots
Test: ConnectivityServiceTest passes
Test: Ethernet is available even if removed from networkAttributes resource
Test: ConnectivityManagerTest CTS test passes
Change-Id: I9b6db4edeaf966ee6715011dd92770b9d25dd938
Merged-In: I9b6db4edeaf966ee6715011dd92770b9d25dd938

Lorenzo Colitti   commited 2017-09-27 17:35:06 +09:00
2c9dd64d94
Merge "Declare support for Ethernet if the service is running."
am: 21fcca6818

Change-Id: Ie0a0190da53571c6f4b466840b7878eb54b5e136

Lorenzo Colitti   authored and   android-build-merger   commited 2017-09-27 08:32:43 +00:00
5b906e1d11
Merge "Declare support for Ethernet if the service is running."
Treehugger Robot   authored and   Gerrit Code Review   commited 2017-09-27 08:23:34 +00:00
21fcca6818
Delete the legacy framework code for manipulating ND offload.
This only worked on broadcom devices, and was superseded in
M by a wifi HAL call made by IpManager.

Test: bullhead builds, boots
Change-Id: I711cae7dafe171c2c8b4e84a229adbcad27f3d14

Lorenzo Colitti   commited 2017-09-27 16:47:36 +09:00
19d4cd99f5
Declare support for Ethernet if the service is running.
On some devices, support for TYPE_ETHERNET is not specified in
the networkAttributes config resource, even though the device is
capable of supporting Ethernet (e.g., via USB host adapters).
This leads to Ethernet working but various connectivity APIs
behaving as if it was not - for example, no CONNECTIVITY_ACTION
broadcasts will be issues when it connects or disconnects.

Ensure that ConnectivityService always treats Ethernet as
available if the service is running. Currently the service is
started if the device supports FEATURE_ETHERNET or
FEATURE_USB_HOST.

Bug: 37359230
Test: bullhead builds, boots
Test: ConnectivityServiceTest passes
Test: Ethernet is available even if removed from networkAttributes resource
Test: ConnectivityManagerTest CTS test passes
Change-Id: I58801bf4f0bbdc3ff6345ec6bfdc911ce045c8ab

Lorenzo Colitti   commited 2017-09-27 13:03:10 +09:00
23e9afc702
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

Udam Saini   authored and   Chalard Jean   commited 2017-09-27 12:14:37 +09:00
b4f31a2f56
Merge "Do not throw on call to isTetheringSupported w/o permission" into oc-mr1-dev
am: e545f00e10

Change-Id: Ib5b17a7f68c1327f47fe1f54c0454c51f4226907

Chalard Jean   authored and   android-build-merger   commited 2017-09-27 02:12:24 +00:00
8522ec6dcc
Merge changes Ia47e566b,Ib94d79a9 am: d8eae0de70 am: 53eee16439
am: b91bd88c5e

Change-Id: Ied2b31c9d1219b8aebf5fec085ab598b77bede6e

Hugo Benichi   authored and   android-build-merger   commited 2017-09-26 13:05:41 +00:00
883604a9fd
Merge changes Ia47e566b,Ib94d79a9
am: d8eae0de70

Change-Id: I0cac456f778db78d76d2225b79ce42526a6d2d19

Hugo Benichi   authored and   android-build-merger   commited 2017-09-26 11:46:30 +00:00
53eee16439
Do not throw on call to isTetheringSupported w/o permission
...just return false instead. This will change in P.

Test: Made an app to test this. Made sure it doesn't have
Test: the required permission. Checked it crashes with
Test: SecurityException without this change. Checked it
Test: doesn't with it.

Bug: 65404184

Change-Id: Id20d3c240ec5d70d085e0366b92ab3a514f3e7c8

Chalard Jean   commited 2017-09-26 19:25:48 +09:00
ffacaef813
Merge changes Ia47e566b,Ib94d79a9
* changes:
  Separate connectivity event buffer for bug reports
  Extract RingBuffer class from NetdEventListenerService

Hugo Benichi   authored and   Gerrit Code Review   commited 2017-09-26 09:48:10 +00:00
d8eae0de70
Extract RingBuffer class from NetdEventListenerService
This patch takes out the ring buffer array added for NFLOG wakeup packet
events logging and extract it into its own class for reuse. This new
RingBuffer class has the two minimal useful functions append() and
toArray().

Bug: 65164242
Bug: 65700460
Test: runtest frameworks-net, with new unit test
Change-Id: Ib94d79a93f4e99661b7d0fac67117b91d57af980

Hugo Benichi   commited 2017-09-26 14:14:16 +09:00
bf737c0a6b
Merge "Implement ConnectivityService TODO and fix many race conditions" into oc-mr1-dev
am: ceb405f161

Change-Id: I5729967b3009cb541e586df8117fca3cee860feb

Hugo Benichi   authored and   android-build-merger   commited 2017-09-22 01:07:33 +00:00
b5f621957c
Merge "Implement ConnectivityService TODO and fix many race conditions" into oc-mr1-dev
Hugo Benichi   authored and   Android (Google) Code Review   commited 2017-09-22 00:50:39 +00:00
ceb405f161
Merge "Implement ConnectivityService TODO and fix many race conditions" am: 864746862b am: a25440dfc8
am: 287c334379

Change-Id: Ia59d45f4e95a536d7982f61ac9c9a1bfc5e8ebb8

Hugo Benichi   authored and   android-build-merger   commited 2017-09-21 12:21:04 +00:00
bff2599c5c
Implement ConnectivityService TODO and fix many race conditions
This patch implements an outstanding TODO in ConnectivityService to add
synchronization over the map of network request ids to network agent
info objects.

This structure is accessed from multiple threads:
 - Binder thread on public aidl methods, most notably via
   getDefaultNetwork().
 - Internal handler.

This leads to many race conditions that can crash the system server and
reboot the phone if getDefaultNetwork() is called on a Binder thread to
service a public ConnectivityManager api while the default network state
is being updated on the internal handler after losing the default
network.

Bug: 65911184
Test: runtest frameworks-net
Merged-In: I86c830ebd559e31d4576a7606705a056afb064ac
Merged-In: I2011e23c9f894c079ab66cd7cc5c14af572a956d
Merged-In: Ic70901a6aa22a03e97f494e793920ab07a0fd612
Merged-In: I4a7658e1fa6946063ab86a251269413903841ee8
Merged-In: Ia59d45f4e95a536d7982f61ac9c9a1bfc5e8ebb8

(cherry picked from commit cd95278e55bd0e4935f42214d964f8c6aa52b4ea)

Change-Id: I2e26bef9eddd342f51c02b991632c7ea04fe7e66

Hugo Benichi   commited 2017-09-21 21:15:01 +09:00
f15fc752c5
Merge "Implement ConnectivityService TODO and fix many race conditions"
am: 864746862b

Change-Id: I2011e23c9f894c079ab66cd7cc5c14af572a956d

Hugo Benichi   authored and   android-build-merger   commited 2017-09-21 12:08:45 +00:00
a25440dfc8
Merge "Also support 464xlat on SUSPENDED networks" am: 995a28d334 am: 698b2ee406
am: 1347ac8109

Change-Id: I83ae39a2e36bc036dce419c80dd476d2358b4537

Erik Kline   authored and   android-build-merger   commited 2017-09-21 12:06:05 +00:00
0bbe489393
Merge "Implement ConnectivityService TODO and fix many race conditions"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-09-21 12:00:48 +00:00
864746862b
Merge "Also support 464xlat on SUSPENDED networks"
am: 995a28d334

Change-Id: Iab87bfcb66e7932d61beec38bcbda366262eab46

Erik Kline   authored and   android-build-merger   commited 2017-09-21 11:55:35 +00:00
698b2ee406
Implement ConnectivityService TODO and fix many race conditions
This patch implements an outstanding TODO in ConnectivityService to add
synchronization over the map of network request ids to network agent
info objects.

This structure is accessed from multiple threads:
 - Binder thread on public aidl methods, most notably via
   getDefaultNetwork().
 - Internal handler.

This leads to many race conditions that can crash the system server and
reboot the phone if getDefaultNetwork() is called on a Binder thread to
service a public ConnectivityManager api while the default network state
is being updated on the internal handler after losing the default
network.

Bug: 65911184
Test: runtest frameworks-net
Change-Id: I86c830ebd559e31d4576a7606705a056afb064ac

Hugo Benichi   commited 2017-09-21 18:50:27 +09:00
53e6fd54e6
Also support 464xlat on SUSPENDED networks
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 65684232

Change-Id: I1b10aab01554b1f926ec7157dba78645fdaff90f

Erik Kline   commited 2017-09-21 18:06:29 +09:00
0b01b0f191
Merge changes Ied9d0cec,I3087f446,Ibe706872 into oc-mr1-dev
am: 49289269b1

Change-Id: I34613d4e53c6cc33029e1f8030b0605100cc59fc

Hugo Benichi   authored and   android-build-merger   commited 2017-09-20 01:05:15 +00:00
8f1245607a
Merge changes Ied9d0cec,I3087f446,Ibe706872 into oc-mr1-dev
* changes:
  Wakeup packet events: addressing a few comments
  Connectivity metrics: add WakeupStats events
  Connectivity metrics: collect NFLOG wakeup events

Hugo Benichi   authored and   Android (Google) Code Review   commited 2017-09-20 00:58:35 +00:00
49289269b1
Merge changes from topic "vpn-dialog" am: 85afa50569 am: b692194f38
am: a9f6384b6a

Change-Id: I853f48a75865008ac8b976eec1af56fb1870a1b3

Charles He   authored and   android-build-merger   commited 2017-09-19 08:25:16 +00:00
e25293089d
Merge changes from topic "always-on-vpn" am: 65e8bd2e04 am: 8ee686cac9
am: 01014743c0

Change-Id: Ide329f8e32538f4643e727697b35bfc2b7007f57

Charles He   authored and   android-build-merger   commited 2017-09-19 08:17:12 +00:00
0afa668d91
Merge changes from topic "vpn-dialog"
am: 85afa50569

Change-Id: I168072aa2bfdb9ed7630cf50547cb9732fb29280

Charles He   authored and   android-build-merger   commited 2017-09-19 08:09:45 +00:00
b692194f38
Merge changes from topic "always-on-vpn"
am: 65e8bd2e04

Change-Id: I7391ce7ecab4f8e73912f420d49150ed7210ea6c

Charles He   authored and   android-build-merger   commited 2017-09-19 08:01:45 +00:00
8ee686cac9
Merge changes from topic "vpn-dialog"
* changes:
  Unbreak VPN unit tests.
  Add alert dialog when always-on VPN disconnects.

Charles He   authored and   Gerrit Code Review   commited 2017-09-19 07:56:44 +00:00
85afa50569
Unbreak VPN unit tests.
VpnTest was broken earlier due to a change to always-on VPN
notifications. This CL adds the corresponding mocks to the unit test to
fix it.

Bug: 36650087
Bug: 65439160
Test: runtest frameworks-net
Change-Id: Icff57c7e927c135d75a7d70ff347a579c5d45134
Merged-In: Icff57c7e927c135d75a7d70ff347a579c5d45134
(cherry picked from commit 5da89994b9)

Charles He   commited 2017-09-19 07:56:36 +00:00
ca55d7bda7
Merge changes from topic "always-on-vpn"
* changes:
  Opt-out for always-on VPN: rename API.
  Opt-out for always-on VPN

Charles He   authored and   Gerrit Code Review   commited 2017-09-19 07:50:13 +00:00
65e8bd2e04
Merge "Wakeup packet events: addressing a few comments" am: efd7e6d7a9 am: ca88876b58
am: 19625788a1

Change-Id: I8ca2a01a95acaaca2599563efd6a21e4372d1f95

Hugo Benichi   authored and   android-build-merger   commited 2017-09-19 07:36:12 +00:00
17d5101e99
Merge "Wakeup packet events: addressing a few comments"
am: efd7e6d7a9

Change-Id: I67b2e54d45a39005e2091a46e8b90d8cc75fe079

Hugo Benichi   authored and   android-build-merger   commited 2017-09-19 07:21:12 +00:00
ca88876b58
Wakeup packet events: addressing a few comments
This patch addresses a few post-submit comment for
commits f562ac34a51dc and 60c9f63b66921.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Merged-In: I4abec57e0c6bc869dc57b5eb54582dd977b64c30

(cherry picked from commit 175b574e27daa0d8832b8cc9615a15fce998309a)

Change-Id: Ied9d0cec98685e5a91ed2ca2c81ad88d7ae8d751

Hugo Benichi   commited 2017-09-19 16:14:19 +09:00
6c35b8082c
Merge "Wakeup packet events: addressing a few comments"
Hugo Benichi   authored and   Gerrit Code Review   commited 2017-09-19 07:12:03 +00:00
efd7e6d7a9