summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-04-09Move data stall definitions out from SettingChiachang Wang
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-09Add a mechanism to pass the L2Key and group hint to IpClientChalard Jean
Test: IpClientTest Bug: 128803828 Change-Id: I399b20ce29a385a74971b7a7248a48cb4d66deb6 (cherry picked from commit 3cab290648a0a0f6e5f6c64c2225b3661aabba2f)
2019-04-09Don't leak captive portal broadcast receivers.Lorenzo Colitti
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 3a1c0ad3eee7830d808106649052dd7430e34f92)
2019-04-09Merge "Expose captive portal urls for configuration"Remi NGUYEN VAN
2019-04-09Expose captive portal urls for configurationNiklas Lindgren
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-08Don't leak captive portal broadcast receivers.Lorenzo Colitti
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-08Merge "Prevent SIGN_IN notification pop up several times" into qt-devLorenzo Colitti
2019-04-08Prevent SIGN_IN notification pop up several timeslucaslin
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-08Merge "Prevent SIGN_IN notification pop up several times"Lucas Lin
2019-04-08Prevent SIGN_IN notification pop up several timeslucaslin
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-08Move attach*Filter() and addArpEntry() methods to NetworkStackRemi NGUYEN VAN
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 fe71be2b04a3213828dc0347a1dd4a3675d20562) Change-Id: Ice433a41469e784385f19498c154345d7b9c69b5
2019-04-05Merge "Add a mechanism to pass the L2Key and group hint to IpClient"Remi NGUYEN VAN
2019-04-05Add a mechanism to pass the L2Key and group hint to IpClientChalard Jean
Test: IpClientTest Change-Id: I399b20ce29a385a74971b7a7248a48cb4d66deb6
2019-04-03Move attach*Filter() and addArpEntry() methods to NetworkStackpaulhu
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-03Straighten AIDL interface for the memory storeChalard Jean
Some names were still wrong somehow, and the wrappers were missing. Test: NetworkStack & FrameworkNetTests Change-Id: I475bd011ad9bc714a07021a9dfd85c4876f8e9ad
2019-04-01Merge "[IPMS] Implement regular maintenance" am: 7f10bb1c11 am: c308297bc2Paul Hu
am: 7da31a0cf5 Change-Id: I5be38b1eb3d05d5e7c8fa93094816bb3dab7b5d4
2019-04-02Merge "[IPMS] Implement regular maintenance"Paul Hu
2019-04-01Merge "Cleanup SystemReady in the network stack" am: e0ef7ce4f7 am: 4b130e8567Chalard Jean
am: aafb4b0576 Change-Id: I0e57236ede9dd176cd30ea034d05205776662c91
2019-04-02Merge "Link to android experimental flags API"Chiachang Wang
2019-04-01Merge "Cleanup SystemReady in the network stack"Chalard Jean
2019-04-01[IPMS] Implement regular maintenancepaulhu
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-01Merge "Add DHCP address lease expiry in IpMemoryStore." am: 17ea70c6d3 am: ↵Xiao Ma
23f6cd281a am: 8e6c80f238 Change-Id: Ib09ee6a702fb25a682d4782a8822237ebb9a0dfb
2019-04-01Merge "Add DHCP address lease expiry in IpMemoryStore."Xiao Ma
2019-04-01Merge "Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues." ↵Paul Hu
am: f9d61f1c6d am: 96f34c3151 am: bf3e6f5e75 Change-Id: I599dcdb2312a3e1bb1de8e03f349df207c7cc075
2019-04-01Link to android experimental flags APIChiachang Wang
Bug: 120013793 Test: Build and atest NetworkStackTests Change-Id: I5c12b48e886e124025ecaa8548b70f26ebd20263
2019-04-01Merge "Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues."Paul Hu
2019-03-31Merge "Provide link to android experimental flags API" am: 9876efdabe am: ↵Chiachang Wang
a94479c120 am: 8724b66c2d Change-Id: I4045d54066cf1c8270bb6eca030daf0193721723
2019-04-01Merge "Provide link to android experimental flags API"Chiachang Wang
2019-03-31Merge "Fix race when starting NetworkMonitor" am: 78454f3c46 am: f75ba075e4Remi NGUYEN VAN
am: 940cbf970a Change-Id: I595ecdbf0b8e91fec4287c3476239a1e6c9c80a7
2019-04-01Cleanup SystemReady in the network stackChalard Jean
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-01Merge "Fix race when starting NetworkMonitor"Remi NGUYEN VAN
2019-04-01Fix race when starting NetworkMonitorRemi NGUYEN VAN
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-01Fix ApfCapabilities, LinkAddress, RouteInfo, IpPrefix API issues.paulhu
Fix: 129362082 Fix: 129361362 Fix: 129360330 Fix: 129362379 Test: atest FrameworksNetTests NetworkStackTests Change-Id: I05fbc6f98207d5cf002e3cbc5829040af7d6be52
2019-04-01Provide link to android experimental flags APIChiachang Wang
Add function to link to android experiemental flags API Bug: 120013793 Test: Build and atest NetworkStackTests Change-Id: I14b9a6f06f841a9d63e8c1954907447a9e7eb8a5
2019-03-29Merge "apf: Documentation improvements and code optimizations for keepalive ↵Aaron Huang
filters" am: f5166d5527 am: 3eb37cda43 am: fcf00a95b0 Change-Id: Ic0e693dcdf2033abc1e976d9cc18365792181571
2019-03-29Merge "apf: Documentation improvements and code optimizations for keepalive ↵Aaron Huang
filters"
2019-03-29Add DHCP address lease expiry in IpMemoryStore.Xiao Ma
Bug:122710829 Test: atest FrameworksNetTests Change-Id: I643fe1231edcd18923514ab66c64a6cf83e69443
2019-03-27Merge "Fix message names in dumpsys network_stack" am: 3c776e8793 am: bae08510a2Remi NGUYEN VAN
am: f93d3f9a79 Change-Id: I3caa485fb7bb8713192c6b726bc7f9e541fc7444
2019-03-28Merge "Fix message names in dumpsys network_stack"Remi NGUYEN VAN
2019-03-27Merge "Enable more logs for networking" am: f3736d67f8 am: 310609b8beLorenzo Colitti
am: d33e31e27a Change-Id: Icd81490cabaaf1d164ce77bda76b196b869c8721
2019-03-27Fix message names in dumpsys network_stackRemi NGUYEN VAN
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-26Enable more logs for networkingRuoyao Liu
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-25apf: Documentation improvements and code optimizations for keepalive filtersAaron Huang
Optimizing instruction to reduce code size of keepalive filters. Bug: 123992088 Test: atest NetworkStackTests Change-Id: I9ae55977c6d6740277ba55603ee957f33a97ecaa
2019-03-24Merge "Separate NetworkMonitor/framework portal URL" am: bcd3bed561 am: ↵Remi NGUYEN VAN
34198fac89 am: 4d975feb9f Change-Id: I85e744d94d96ecf9ac558e62016418d8199bb98c
2019-03-25Merge "Separate NetworkMonitor/framework portal URL"Remi NGUYEN VAN
2019-03-25Merge "Fix API in CaptivePortal and ConnectivityManager"Treehugger Robot
2019-03-25Fix API in CaptivePortal and ConnectivityManagerRemi NGUYEN VAN
- Remove CaptivePortal constructor from SystemApi. This constructor was added in Q timeframe and ends up being unnecessary since CaptivePortal creation was refactored to ConnectivityService because of visibility issues on ICaptivePortal. - Rename getAvoidBadWifi to shouldAvoidBadWifi - Add permission annotation for shouldAvoidBadWifi (already merged in internal as: I09545c00af3519dbf141dd5951b28f49e37b3e80) Test: flashed, WiFi and captive portal works Bug: 128935314 Bug: 128935673 Merged-In: I09545c00af3519dbf141dd5951b28f49e37b3e80 Change-Id: I7395d4a4db6a64398a827692aee1956c011873e5
2019-03-22Merge "Renamed the variable"Treehugger Robot
2019-03-22Fix API in CaptivePortal and ConnectivityManagerRemi NGUYEN VAN
- Remove CaptivePortal constructor from SystemApi. This constructor was added in Q timeframe and ends up being unnecessary since CaptivePortal creation was refactored to ConnectivityService because of visibility issues on ICaptivePortal. - Rename getAvoidBadWifi to shouldAvoidBadWifi - Add permission annotation for shouldAvoidBadWifi Test: flashed, WiFi and captive portal works Bug: 128935314 Bug: 128935673 (clean cherry-pick of AOSP I7395d4a4db6a64398a827692aee1956c011873e5) Change-Id: I09545c00af3519dbf141dd5951b28f49e37b3e80
2019-03-22Separate NetworkMonitor/framework portal URLRemi NGUYEN VAN
The framework cannot return URLs used by the updatable NetworkStack, which may use configurable URLs, changing URLs, or mechanisms not involving URLs to detect captive portals. NetworkMonitor has already been using random fallback URLs for a while that do not match the value returned by ConnectivityManager#getCaptivePortalServerUrl. With this change, the default value returned by the framework is configured in framework resources as config_networkDefaultCaptivePortalServerUrl. NetworkMonitor behavior may change as it is an updatable component, but the current URL is configured in NetworkMonitor resources as config_captive_portal_http_url. Test: flashed, booted, WiFi and captive portal working Test: ConnectivityManager#getCaptivePortalServerUrl returns correct value. Bug: 127908503 Change-Id: I371dedc5b22efa909d7fd58e1ebe9b8aaced9780