Commit Graph

216 Commits

Author SHA1 Message Date
Chiachang Wang
574705c4d1 Merge "Move data stall definitions out from Setting" into qt-dev
am: 6839f419de

Change-Id: I0a2a1e5d3de14ea86556ca471e26064df3481412
2019-04-09 05:30:34 -07:00
Chiachang Wang
6839f419de Merge "Move data stall definitions out from Setting" into qt-dev 2019-04-09 11:52:54 +00:00
TreeHugger Robot
7c0d309886 Merge "Add a mechanism to pass the L2Key and group hint to IpClient" into qt-dev 2019-04-09 10:21:39 +00:00
Chiachang Wang
0b98441205 Move data stall definitions out from Setting
From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack.

Bug:120013793
Test: atest NetworkStackTests SettingsBackupTest
Change-Id: I8e1fb5b47fff3bf624131ba1f5732daabd991e6d
2019-04-09 08:32:55 +00:00
Chalard Jean
d3c34d4c59 Add a mechanism to pass the L2Key and group hint to IpClient
Test: IpClientTest
Bug: 128803828
Change-Id: I399b20ce29a385a74971b7a7248a48cb4d66deb6
(cherry picked from commit 3cab290648)
2019-04-09 07:55:17 +00:00
Remi NGUYEN VAN
8beec384fd Merge "Expose captive portal urls for configuration" am: 7bb487a582
am: 2877796f70

Change-Id: I54050b28bbfb93e0b7e509dbe0e987a0b902b7d9
2019-04-08 23:40:05 -07:00
Lorenzo Colitti
15be2b1a36 Don't leak captive portal broadcast receivers.
Since aosp/937885, mLaunchCaptivePortalAppBroadcastReceiver is
nulled out, but not unregistered, when exiting MaybeNotifyState.
This causes the BroadcastReceiver to be leaked because it is no
longer unregistered when processing CMD_NETWORK_DISCONNECTED.

Fix this by unregistering the receiver in MaybeNotifyState#exit.
Also remove the unregister call in CMD_NETWORK_DISCONNECTED: it
is no longer necessary, because StateMachine, before quitting,
will call the exit method of the current state and all its
parent states.

Bug: 122164725
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I447b3cfd3821dda19482ed962dd59ec61fc5fc9b
Merged-In: I1db24fe05ada8b3a37a9a60aa568b6153bf51ad8
(cherry picked from commit 3a1c0ad3ee)
2019-04-09 06:26:23 +00:00
Remi NGUYEN VAN
7bb487a582 Merge "Expose captive portal urls for configuration" 2019-04-09 04:37:48 +00:00
Lorenzo Colitti
3a1c0ad3ee Merge "Don't leak captive portal broadcast receivers." am: 873badbd1c
am: c097e76769

Change-Id: I1db24fe05ada8b3a37a9a60aa568b6153bf51ad8
2019-04-08 21:35:03 -07:00
Niklas Lindgren
afc5f9bd3d Expose captive portal urls for configuration
Carriers in Mainland China need to customize certain captive portal
urls. The main issue is that google servers are not accessible in
Mainland China.

Added the following captive portal resources to be targeted for overlay.
- config_captive_portal_http_url
- config_captive_portal_https_url
- config_captive_portal_fallback_urls (string-array)
- config_captive_portal_fallback_probe_specs (string-array)

These values can be customized for e g diffent countries

Bug: 111819230
Test: atest FrameworksNetTests NetworkStackTests
Test: Add a product RRO that targets a specific country code,
insert a SIM card that matches that country code and check the log
what URL is used.
Change-Id: I38a294a5e14417f65e96e76235ea153c53c4d7cc
2019-04-09 10:23:53 +09:00
Lorenzo Colitti
ad85847666 Merge "Prevent SIGN_IN notification pop up several times" into qt-dev
am: 462864489a

Change-Id: I19bc873221e1200fd935d7759aa76ec113de4325
2019-04-08 05:15:50 -07:00
Lorenzo Colitti
e35374386b Don't leak captive portal broadcast receivers.
Since aosp/937885, mLaunchCaptivePortalAppBroadcastReceiver is
nulled out, but not unregistered, when exiting MaybeNotifyState.
This causes the BroadcastReceiver to be leaked because it is no
longer unregistered when processing CMD_NETWORK_DISCONNECTED.

Fix this by unregistering the receiver in MaybeNotifyState#exit.
Also remove the unregister call in CMD_NETWORK_DISCONNECTED: it
is no longer necessary, because StateMachine, before quitting,
will call the exit method of the current state and all its
parent states.

Bug: 122164725
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I447b3cfd3821dda19482ed962dd59ec61fc5fc9b
2019-04-08 21:14:23 +09:00
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
Lucas Lin
83152b1e5f Merge "Prevent SIGN_IN notification pop up several times" 2019-04-08 04:37:47 +00:00
lucaslin
04e50f8608 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
2019-04-08 10:52:46 +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
Remi NGUYEN VAN
35487f959a 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
(cherry picked from commit 329c4dadbe)
2019-04-06 11:20:38 +02:00
Remi NGUYEN VAN
d0fe9b1a9d Merge "Add a mechanism to pass the L2Key and group hint to IpClient" am: 66d744ba74
am: 47c803e334

Change-Id: I5dc4c3f4a31e65409e86f059c727abe665708b3b
2019-04-05 03:47:33 -07:00
Remi NGUYEN VAN
5059e03eb6 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" am: 1ddf974859
am: 6652f5242a

Change-Id: If5c236c85585a440bfb645cff9d3cb0bb4e11102
2019-04-05 03:31:36 -07:00
Remi NGUYEN VAN
66d744ba74 Merge "Add a mechanism to pass the L2Key and group hint to IpClient" 2019-04-05 07:30:02 +00:00
Remi NGUYEN VAN
1ddf974859 Merge "Move attach*Filter() and addArpEntry() methods to NetworkStack" 2019-04-05 06:38:08 +00:00
Chalard Jean
3cab290648 Add a mechanism to pass the L2Key and group hint to IpClient
Test: IpClientTest
Change-Id: I399b20ce29a385a74971b7a7248a48cb4d66deb6
2019-04-05 12:51:04 +09: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
Yifan Hong
f6e7cb2caf Merge "Fix NetworkStackTests." am: e4d640b3a8
am: ab98e503be

Change-Id: Id80883c77518d8e144ee0c3f591e6467c02a203e
2019-04-04 01:20:06 -07:00
Yifan Hong
e4d640b3a8 Merge "Fix NetworkStackTests." 2019-04-04 01:21:34 +00:00
Yifan Hong
0e5459731f Fix NetworkStackTests.
NetworkStackTests dlopens library which indirectly
uses libcgrouprc. Add it to jni_libs.

Test: atest
Fixes: 129902619
Change-Id: I0d60d7a317fa60607d6fdaea15f61b458aefd2f0
2019-04-03 18:15:22 -07:00
paulhu
931cdd273f 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.

Change-Id: I1d88a0f0be23f2b15d5103fa092b9bf982329d7c
Fix: 129433183
Test: atest NetworkStackTests FrameworksNetTests
2019-04-03 17:49:36 +08: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