Commit Graph

161 Commits

Author SHA1 Message Date
Chiachang Wang
e06af927c9 Merge "Move Setting constants for NetworkStack" am: 587ee7240e
am: a158ee1975

Change-Id: I6820300c412f94989a5fce7bd6c6f2a3b983b96e
2019-04-18 01:10:50 -07:00
Chiachang Wang
587ee7240e Merge "Move Setting constants for NetworkStack" 2019-04-18 07:35:19 +00:00
Chiachang Wang
8b2a8821a9 Move Setting constants for NetworkStack
From mainline perspective, we should use android flag api
instead of using Settings. Thus, move the definitions into
NetworkStack and apply new flag design.

Bug: 123167629
Test: atest NetworkStackTests
Change-Id: I9602263f0bff5d8e942bd652de69ccfcb3034a2f
2019-04-17 17:00:54 +08:00
Chalard Jean
896245a1e2 Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in
a place that is private to the network stack, only with a
range defined in system API.

Bug: 129433383
Test: m
Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086
Merged-In: I4882686a86e7c6d42f4b0619b921d02619ed6d4c
Merged-In: I9b648ed6c687d56db61a54570c7880c51c1bae51
2019-04-17 05:45:40 +00:00
Chalard Jean
c728f75abd Merge "Move TrafficStats tags for the network stack constants" into qt-dev
am: e7ef0a61f2

Change-Id: I9b648ed6c687d56db61a54570c7880c51c1bae51
2019-04-16 15:06:03 -07:00
Chalard Jean
6a76b7e2e4 Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in
a place that is private to the network stack, only with a
range defined in system API.

Bug: 129433383
Test: m
Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086
(cherry picked from commit 79a6330650ca04bd7a08afbd63f8016a3b30bc72)
2019-04-16 00:41:54 +09:00
Remi NGUYEN VAN
d361ff3cb9 Freeze netd AIDL interface (framework)
This freezes the interface as of the latest beta build, although it has
not changed since then.
This change adds the necessary implementations for getInterfaceVersion.

Test: flashed, WiFi working
Bug: 128803828
Merged-In: Ib852b0555f0e20b858f9dd0b16dbd98dbbd22b55
Merged-In: I0c231bdce89474b53603cc15d55787c8c78a809d
(cherry picked from commit fd4eafe8f6)

Change-Id: Idc0e7ea98dbf57e07ee578bc1772c2111af2e563
2019-04-12 03:34:02 +00:00
Chiachang Wang
f5d37ae877 Merge "Address nit in NetworkStackUtils" into qt-dev 2019-04-12 03:15:00 +00:00
Chiachang Wang
fb21fb8724 Merge "Migrate NetworkStack metrics off StatsLog.write" into qt-dev
am: fa124d7bf4

Change-Id: I1bfe856d771bf56fe33790aea22eceae2001921a
2019-04-11 18:26:16 -07:00
Chiachang Wang
44d36f6be3 Address nit in NetworkStackUtils
Follow up commit to fix nit in aosp/937891

Bug: 120013793
Test: Build
Change-Id: I61a6306d3c439a2d72323ab56e2b47771cc60d48
Merged-In: Ide4741305724a9e0d26305f8406c5445f9de12b3
(cherry picked from commit cfb4e06b14)
2019-04-12 01:01:50 +00:00
Xiao Ma
186bf7c679 Merge "provide a resource overlay to configure customized DNS Server." am: 7db7b331ef
am: c116de19c3

Change-Id: Iba867a3b7bda1f5db9dfa1b7521d4a4badbf88e0
2019-04-11 11:27:53 -07:00
Chiachang Wang
ea1a7389d4 Merge "Address nit in NetworkStackUtils" am: 076317a01f
am: df598dc827

Change-Id: Ide4741305724a9e0d26305f8406c5445f9de12b3
2019-04-11 11:21:36 -07:00
Remi NGUYEN VAN
bff270bec1 Merge "Freeze netd AIDL interface (framework)" am: eb8d81ca14
am: e427c17917

Change-Id: Ib852b0555f0e20b858f9dd0b16dbd98dbbd22b55
2019-04-11 10:29:59 -07:00
Chiachang Wang
e512b26913 Migrate NetworkStack metrics off StatsLog.write
Now that the new metrics API can be used, NetworkStack
metrics need to migrate off the legacy StatsLog.write.

Bug: 130323000
Test: Test with ./out/host/linux-x86/bin/statsd_testdrive 121
      to ensure log properly
Test: Ensure NetworkStackStatsLog will be generated as expected
Test: atest NetworkStackTest

Change-Id: I8c70503cf1d9f1d06f30a1936d2d88857d0cff53
2019-04-11 21:24:28 +08:00
Treehugger Robot
7db7b331ef Merge "provide a resource overlay to configure customized DNS Server." 2019-04-11 11:06:51 +00:00
Chiachang Wang
076317a01f Merge "Address nit in NetworkStackUtils" 2019-04-11 10:48:58 +00:00
Xiao Ma
a4d0122048 provide a resource overlay to configure customized DNS Server.
Bug: 122621524
Test:  atest FrameworksNetTests NetworkStackTests
Change-Id: I123b3d4516cc6ba6d17629eb74daf448ba7121eb
2019-04-11 15:30:23 +09:00
Chiachang Wang
b805040fef Address nit in NetworkStackUtils
Follow up commit to fix nit in aosp/937891

Bug: 120013793
Test: Build
Change-Id: I61a6306d3c439a2d72323ab56e2b47771cc60d48
2019-04-11 11:10:51 +08:00
Remi NGUYEN VAN
eb8d81ca14 Merge "Freeze netd AIDL interface (framework)" 2019-04-11 00:13:29 +00:00
Chiachang Wang
e9a39ceb6b Merge "Move data stall definitions out from Setting" 2019-04-10 03:27:19 +00:00
Chiachang Wang
2449e583d8 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
Merged-In: I8e1fb5b47fff3bf624131ba1f5732daabd991e6d
Merged-In: I0a2a1e5d3de14ea86556ca471e26064df3481412
2019-04-10 02:37:57 +00:00
Remi NGUYEN VAN
eec0ed4056 Freeze netd AIDL interface (framework)
This freezes the interface as of the latest beta build, although it has
not changed since then.
This change adds the necessary implementations for getInterfaceVersion.

Test: flashed, WiFi working
Bug: 128803828
Change-Id: I43a6a38685d5fbc669cd573c4d7e7f99bd596952
2019-04-10 11:26:25 +09:00
Remi NGUYEN VAN
9ca4c62612 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.

Merged-In: I54050b28bbfb93e0b7e509dbe0e987a0b902b7d9
Merged-In: I1f734c5f864bb2f2bc8ba1a66fe33d3480554f69
(cherry picked from commit 2977a40b1e)

Change-Id: I278f2888851d38edb59157f8623541fbe94549b6
2019-04-10 02:03:27 +00:00
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
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
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
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
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
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