Commit Graph

192 Commits

Author SHA1 Message Date
Lorenzo Colitti
462864489a Merge "Prevent SIGN_IN notification pop up several times" into qt-dev 2019-04-08 12:03:10 +00:00
lucaslin
2b14c799b8 Prevent SIGN_IN notification pop up several times
SIGN_IN notification may pop up several times before user
logged in the network if someone trigger
ConnectivityService#reportNetworkConnectivity().
Add a boolean to make sure SIGN_IN notification will only pop up
once to user before user logged in.

Bug: b/122164725
Test: Build pass.
Change-Id: I9c7f1d47fde8e5dfadd6646497023b05f3b0ed88
Merged-In: I9c7f1d47fde8e5dfadd6646497023b05f3b0ed88
2019-04-08 15:47:25 +08:00
Remi NGUYEN VAN
995aada788 Move attach*Filter() and addArpEntry() methods to NetworkStack
The SocketUtils.attach*Filter and SocketUtils.addArpEntry methods
were added there because they could not be added as JNI inside
the NetworkStack. This was not possible because on Go devices,
the NetworkStack was a jar library. But now, Go also uses an APK.
Hence, move these methods to the NetworkStack.

Fixes: 129433183
Merged-In: I66d7b3e4fbfa32bb0bc853e8cf9399031daff8a9
(cherry picked from commit fe71be2b04)

Change-Id: Ice433a41469e784385f19498c154345d7b9c69b5
2019-04-08 01:41:39 +00:00
Yifan Hong
654b1e69bb Fix NetworkStackTests.
NetworkStackTests dlopens library which indirectly
uses libcgrouprc. Add it to jni_libs.

Test: atest
Fixes: 129902619
Change-Id: I0d60d7a317fa60607d6fdaea15f61b458aefd2f0
Merged-In: I0d60d7a317fa60607d6fdaea15f61b458aefd2f0
2019-04-04 13:20:12 -07:00
Chalard Jean
943e7405f2 Straighten AIDL interface for the memory store
Some names were still wrong somehow, and the wrappers were
missing.

Test: NetworkStack & FrameworkNetTests
Change-Id: I475bd011ad9bc714a07021a9dfd85c4876f8e9ad
2019-04-03 15:18:08 +09:00
Paul Hu
d3c115b26a Merge "Make CaptivePortalProbeSpec and CaptivePortalProbeResult as a library" am: 3db9cfe660 am: 2d20cd2378
am: 4bf4e79766

Change-Id: Iccf60b710df5895d8d269b6c918a8b2f252e93a6
2019-04-02 21:19:14 -07:00
paulhu
b0f53b84cc Make CaptivePortalProbeSpec and CaptivePortalProbeResult as a library
These two classes were added to @SystemApi because they are used
both by NetworkMonitor and CaptivePortalLogin. However it turns
out they are not needed in the framework, so having them as a
library sounds better.

Change-Id: Iadf77ec5952b6da8812dc6d006a39bd4e93d2bd9
Fix: 129433264
Test: atest NetworkStackTests FrameworksNetTests
2019-04-02 17:55:42 +08:00
Paul Hu
5428e660ca Merge "[IPMS] Implement regular maintenance" am: 7f10bb1c11 am: c308297bc2
am: 7da31a0cf5

Change-Id: I5be38b1eb3d05d5e7c8fa93094816bb3dab7b5d4
2019-04-01 19:32:54 -07:00
Paul Hu
7f10bb1c11 Merge "[IPMS] Implement regular maintenance" 2019-04-02 01:39:38 +00:00
Remi NGUYEN VAN
073e73a0c1 Merge "Rename NetworkStackPermissionStub" 2019-04-02 01:31:51 +00:00
Chalard Jean
cf7b25e013 Merge "Cleanup SystemReady in the network stack" am: e0ef7ce4f7 am: 4b130e8567
am: aafb4b0576

Change-Id: I0e57236ede9dd176cd30ea034d05205776662c91
2019-04-01 18:13:24 -07:00
Chiachang Wang
ec35d666c1 Merge "Link to android experimental flags API" 2019-04-02 00:51:51 +00:00
Remi NGUYEN VAN
fc6b247d35 Rename NetworkStackPermissionStub
Use NetworkStackPermissionConfig instead.

Bug: 129317412
Test: Flashed, booted, WiFi working
Merged-In: I7bdc058dddfa483823074055ad5c9d7d2efd37b9
Change-Id: I45299c12598cd3b33bfd78ae8698d98b77b18dc0
2019-04-02 00:14:05 +00:00
Remi NGUYEN VAN
1fc0bd6aaa Merge "Rename NetworkStackPermissionStub" 2019-04-02 00:10:19 +00:00
Chalard Jean
e0ef7ce4f7 Merge "Cleanup SystemReady in the network stack" 2019-04-01 23:28:47 +00:00
paulhu
028d7a55fd [IPMS] Implement regular maintenance
Implement regular maintenance of IpMemoryStoreService. Regular
maintenance is scheduled for when the device is idle with access
power and a minimum interval of one day.

Bug: 113554482
Test: atest NetworkStackTests
Change-Id: Id3985e30d12307fc2e9fcbe782caaf97a627cef3
2019-04-01 23:35:36 +08:00
Remi NGUYEN VAN
6ba6b79e51 Merge "Add comment for NetworkStack permissions" am: 154a0d0b38 am: b4493ea049
am: 0737917d03

Change-Id: If9c8d887e04bf173badb6b147d9a4379daf6d93f
2019-04-01 08:13:16 -07:00
Treehugger Robot
154a0d0b38 Merge "Add comment for NetworkStack permissions" 2019-04-01 14:45:18 +00:00
Xiao Ma
60a54acbbf Merge "Add DHCP address lease expiry in IpMemoryStore." am: 17ea70c6d3 am: 23f6cd281a
am: 8e6c80f238

Change-Id: Ib09ee6a702fb25a682d4782a8822237ebb9a0dfb
2019-04-01 06:35:34 -07:00
Xiao Ma
17ea70c6d3 Merge "Add DHCP address lease expiry in IpMemoryStore." 2019-04-01 12:59:20 +00:00
Paul Hu
b2913320cd Merge "Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues." am: f9d61f1c6d am: 96f34c3151
am: bf3e6f5e75

Change-Id: I599dcdb2312a3e1bb1de8e03f349df207c7cc075
2019-04-01 00:52:53 -07:00
Chiachang Wang
ede84b60dd Link to android experimental flags API
Bug: 120013793
Test: Build and atest NetworkStackTests
Change-Id: I5c12b48e886e124025ecaa8548b70f26ebd20263
2019-04-01 15:41:06 +08:00
Paul Hu
f9d61f1c6d Merge "Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues." 2019-04-01 07:20:53 +00:00
Chiachang Wang
5640a8d124 Merge "Provide link to android experimental flags API" am: 9876efdabe am: a94479c120
am: 8724b66c2d

Change-Id: I4045d54066cf1c8270bb6eca030daf0193721723
2019-03-31 22:25:35 -07:00
Chiachang Wang
9876efdabe Merge "Provide link to android experimental flags API" 2019-04-01 04:49:33 +00:00
Remi NGUYEN VAN
b93bfa1d69 Merge "Fix race when starting NetworkMonitor" am: 78454f3c46 am: f75ba075e4
am: 940cbf970a

Change-Id: I595ecdbf0b8e91fec4287c3476239a1e6c9c80a7
2019-03-31 21:35:25 -07:00
Chalard Jean
d74219ba4a Cleanup SystemReady in the network stack
The system server (in SystemServer.java) defines the boot
sequence, during which an event called SystemReady happens.
This corresponds to a time when critical system services
that are depended upon by other components in the system
server are ready to handle requests from their dependencies.
Some system services are listening to this event to defer
initializations that depend on the critical services.

Because the network stack is only started after SystemReady,
there is no way any NetworkMonitor may be started before
SystemReady. Remove the associated mechanism.

Fix: 129376083
Test: FrameworksNetTests
Change-Id: I071eeb10d0b7c4f71af6653d322c7b442b2cc7ee
2019-04-01 13:32:25 +09:00
Remi NGUYEN VAN
e799f84de0 Add comment for NetworkStack permissions
Clarify that permissions must not be in the base package to avoid
crashes on devices using a network stack running in the system server
process.

Test: m
Change-Id: Ib13df84a43e960d01217c208d1c6775d1f81edc4
2019-04-01 04:24:14 +00:00
Remi NGUYEN VAN
95c5375a85 Merge "Move permissions from base to standard manifest" 2019-04-01 04:20:41 +00:00
Remi NGUYEN VAN
78454f3c46 Merge "Fix race when starting NetworkMonitor" 2019-04-01 03:54:03 +00:00
Remi NGUYEN VAN
3962f678c3 Fix race when starting NetworkMonitor
NetworkMonitor obtained LinkProperties and NetworkCapabilities via
synchronous calls to ConnectivityManager after receiving an asynchronous
notification, which is prone to races: the network could be gone before
the LinkProperties/NetworkCapabilities can be fetched.

Fix the race by passing LinkProperties/NetworkCapabilities directly to
NetworkMonitor in the asynchronous notifications.

Test: atest FrameworksNetTests NetworkStackTests
Test: booted, WiFi works
Bug: 129375892
Change-Id: I200ac7ca6ff79590b11c9be705f650c92fd3cb63
2019-04-01 11:33:10 +09:00
paulhu
819e0aff30 Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues.
Fix: 129362082
Fix: 129361362
Fix: 129360330
Fix: 129362379
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I05fbc6f98207d5cf002e3cbc5829040af7d6be52
2019-04-01 10:23:51 +08:00
Chiachang Wang
e027ed6d24 Provide link to android experimental flags API
Add function to link to android experiemental flags API

Bug: 120013793
Test: Build and atest NetworkStackTests
Change-Id: I14b9a6f06f841a9d63e8c1954907447a9e7eb8a5
2019-04-01 09:56:05 +08:00
Remi NGUYEN VAN
2a23dfde16 Move permissions from base to standard manifest
Permissions defined in AndroidManifest_Base.xml would be inherited in
AndroidManifest_InProcess.xml and cause issues on svelte builds, since
privileged permissions are not whitelisted for
com.android.networkstack.inprocess.

The network stack running in the system_server process does not need
these permissions anyway since it has system_server permissions.

(clean cherry-pick from Ica63ce586e701b1f2415a97f63ba27cc25e4830a)

Test: flashed, booted crosshatch_svelte-eng, WiFi works
Test: flashed, booted blueline-eng, WiFi works
Fixes: 129485310
Merged-In: Ica63ce586e701b1f2415a97f63ba27cc25e4830a
Change-Id: Ib4b478fb39f43a2fd4221c7d1f1ea51de04e0fba
2019-04-01 09:54:34 +08:00
Jeff Hamilton
ad2a94770f Set the version code to 0200000000
Bug: 129093117
Change-Id: I6397511874afb47ba9c034f74ad8f748e50e23b9
2019-03-29 14:25:20 -04:00
TreeHugger Robot
60852eab5c Merge "Move permissions from base to standard manifest" 2019-03-29 13:37:20 +00:00
Aaron Huang
1b0b7d406b Merge "apf: Documentation improvements and code optimizations for keepalive filters" am: f5166d5527 am: 3eb37cda43
am: fcf00a95b0

Change-Id: Ic0e693dcdf2033abc1e976d9cc18365792181571
2019-03-29 06:35:21 -07:00
Aaron Huang
f5166d5527 Merge "apf: Documentation improvements and code optimizations for keepalive filters" 2019-03-29 13:03:20 +00:00
Remi NGUYEN VAN
d4cbba8f18 Move permissions from base to standard manifest
Permissions defined in AndroidManifest_Base.xml would be inherited in
AndroidManifest_InProcess.xml and cause issues on svelte builds, since
privileged permissions are not whitelisted for
com.android.networkstack.inprocess.

The network stack running in the system_server process does not need
these permissions anyway since it has system_server permissions.

Test: flashed, booted crosshatch_svelte-eng, WiFi works
Test: flashed, booted blueline-eng, WiFi works
Fixes: 129485310
(clean cherry-pick from aosp/937139)

Change-Id: Ica63ce586e701b1f2415a97f63ba27cc25e4830a
2019-03-29 17:39:58 +09:00
Remi NGUYEN VAN
329c4dadbe Add NetworkStackTests dependency on libdl_android
This fixes tests that were failing because of the unsatisfied
dependency.

Test: atest NetworkStackTests
Bug: 129387775
Change-Id: Ie0c1bc2b292ad7172d144d9e7ad9edeecd2232b7
2019-03-29 17:39:52 +09:00
Xiao Ma
385ccb05c8 Add DHCP address lease expiry in IpMemoryStore.
Bug:122710829
Test: atest FrameworksNetTests
Change-Id: I643fe1231edcd18923514ab66c64a6cf83e69443
2019-03-29 16:51:47 +09:00
Remi NGUYEN VAN
3049d3b682 Merge "Fix message names in dumpsys network_stack" am: 3c776e8793 am: bae08510a2
am: f93d3f9a79

Change-Id: I3caa485fb7bb8713192c6b726bc7f9e541fc7444
2019-03-27 17:49:16 -07:00
Remi NGUYEN VAN
3c776e8793 Merge "Fix message names in dumpsys network_stack" 2019-03-28 00:14:31 +00:00
Lorenzo Colitti
aef32a4811 Merge "Enable more logs for networking" am: f3736d67f8 am: 310609b8be
am: d33e31e27a

Change-Id: Icd81490cabaaf1d164ce77bda76b196b869c8721
2019-03-27 01:34:53 -07:00
Remi NGUYEN VAN
aaa7ecfd3b Fix message names in dumpsys network_stack
Constants were stripped out by ProGuard, so
MessageUtils.findMessageNames would fail to find them.

Test: flashed, dumpsys network_stack shows message names
Fixes: 124619824
Change-Id: I285ce2ab52cdff48f17b422285a635bd34243498
2019-03-27 14:12:18 +09:00
Remi NGUYEN VAN
63b386cd0b Rename NetworkStackPermissionStub
Use NetworkStackPermissionConfig instead.
Also remove the source directory: soong now manages to build the package
without it.

Bug: 129317412
Test: Flashed, booted, WiFi working
(clean cherry-pick of aosp I45299c12598cd3b33bfd78ae8698d98b77b18dc0)

Change-Id: I7bdc058dddfa483823074055ad5c9d7d2efd37b9
2019-03-27 12:04:27 +09:00
Ruoyao Liu
37293308b4 Enable more logs for networking
Sometimes we would encounter problems that happen by chance and
hard to reproduce. So we recommend to enable more logs in ENG and
UESRDEBUG load by default.

Bug: 123256412
Test: android.net.ip.IpClientTest can pass
Change-Id: Ia3363de96966a4e86ab550c768fb70317da005ed
2019-03-26 12:57:17 +08:00
Aaron Huang
75a6043bf1 apf: Documentation improvements and code optimizations for keepalive filters
Optimizing instruction to reduce code size of keepalive filters.

Bug: 123992088
Test: atest NetworkStackTests
Change-Id: I9ae55977c6d6740277ba55603ee957f33a97ecaa
2019-03-25 23:38:41 +08:00
Remi NGUYEN VAN
80ce3a3bf9 Merge "Compile NetworkStack resources only once" am: 963136ce56 am: 4aea56297c
am: b4c9d697f5

Change-Id: Ibbe585e2dd8c9df6ef99cf1aacfb899331f70a80
2019-03-25 01:11:17 -07:00
Remi NGUYEN VAN
963136ce56 Merge "Compile NetworkStack resources only once" 2019-03-25 07:40:33 +00:00