If NetworkMonitor detects partial connectivity before
EVENT_PROMPT_UNVALIDATED arrives, show the partial
connectivity notification immediately. Re-notify
partial connectivity silently if no internet
notification already there.
Bug: 130683832
Bug: 130766237
Test: atest com.android.server.ConnectivityServiceTest
Change-Id: I7d4eddc643ec795c3961097dc1bdd314d168f6c7
[Problem]
NullPointerException occurs in ConnectivityService when boot up.
[Root Cause]
When ConnectivityService starts up, isTetheringSupported may access
UserManager that has not been created yet. Therefore,
NullPointerException occurs.
[Solution]
Changed to create UserManager before makeTethering().
Bug: 134351774
Test: ConnectivityServiceTest
Change-Id: I299ecfa6af7295c1f3922f37d90eb5d3ab0d0286
am: 4b5b1f6f71 -s ours
am skip reason: change_id Ib9a15fececd8579fc5b139fe0341275a45512e0f with SHA1 6edf86cd9c is in history
Change-Id: Icbc02f3e68f813f889d0c91950ea489cb46b17fa
am: 3d7da92f91 -s ours
am skip reason: change_id Ib9a15fececd8579fc5b139fe0341275a45512e0f with SHA1 6edf86cd9c is in history
Change-Id: Icc72ee8aa8a51abe3072c3dabed450cef094e418
am: f4a435aca0 -s ours
am skip reason: change_id Ib9a15fececd8579fc5b139fe0341275a45512e0f with SHA1 6edf86cd9c is in history
Change-Id: I2aa4637ae7a48afbf7b4ad953837762262bd94b8
When the network stack crashes, the system will rebind to it.
Existing references are no longer useful (they just throw
RemoteException) but if the system is still up, then the user
can at least recover the situation by taking actions such as
going into airplane mode, toggling wifi, etc.
This CL stops ConnectivityService from crashing the system when
it cannot talk to NetworkMonitor. This is arguably better than
crashing the system, because crashing the system is disruptive
and carries the serious risk of a bootloop from which it is not
possible to recover.
NetworkStackClient already contains code to crash the system
when the network stack crashes. This change help ensure that
if a crash occurs, it is the result of an explicit decision by
that code instead of an unchecked exception in one of the callers
of the network stack.
Bug: 133725814
Test: builds, boots
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Ib9a15fececd8579fc5b139fe0341275a45512e0f
Merged-In: Ib9a15fececd8579fc5b139fe0341275a45512e0f
(cherry picked from commit ac29a97d10fe8ea0720763f4ca4657cac85732a1)
When the network stack crashes, the system will rebind to it.
Existing references are no longer useful (they just throw
RemoteException) but if the system is still up, then the user
can at least recover the situation by taking actions such as
going into airplane mode, toggling wifi, etc.
This CL stops ConnectivityService from crashing the system when
it cannot talk to NetworkMonitor. This is arguably better than
crashing the system, because crashing the system is disruptive
and carries the serious risk of a bootloop from which it is not
possible to recover.
NetworkStackClient already contains code to crash the system
when the network stack crashes. This change help ensure that
if a crash occurs, it is the result of an explicit decision by
that code instead of an unchecked exception in one of the callers
of the network stack.
Bug: 133725814
Test: builds, boots
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: Ib9a15fececd8579fc5b139fe0341275a45512e0f
am: 929210b213 -s ours
am skip reason: change_id Ide2428dab3fcd6d7cd00aa2a9fd99d6c99b815a4 with SHA1 7284daa96e is in history
Change-Id: Ibc28983759c80ae21756e7a3c03b9db7aae285d8
am: f304c9d67e -s ours
am skip reason: change_id Ide2428dab3fcd6d7cd00aa2a9fd99d6c99b815a4 with SHA1 7284daa96e is in history
Change-Id: I165b03e552cfacd2eaa694094834a081234d2e73
am: f3eaec257a -s ours
am skip reason: change_id Ide2428dab3fcd6d7cd00aa2a9fd99d6c99b815a4 with SHA1 7284daa96e is in history
Change-Id: I08e37b4458b3c6242a1cca8aab913b09642a9e53
am: 35dff8c0b9 -s ours
am skip reason: change_id Iffd3f95fc2e11d311691a797b010edb38d2ef3c6 with SHA1 20204cdf6a is in history
Change-Id: I982ce55558624e26531695abf09e3108b2463780
am: 9561790069 -s ours
am skip reason: change_id Iffd3f95fc2e11d311691a797b010edb38d2ef3c6 with SHA1 20204cdf6a is in history
Change-Id: I86c99de74590e3ad54055a16b5c349b6ba3659ab
am: d5e1830ff2 -s ours
am skip reason: change_id I004e78a33689e2208918d4316bcf9a8f50a0bac3 with SHA1 66cc78d6ab is in history
Change-Id: I94d2289bf8a7d8487490b3cf587b55b27ca910a6
am: be8bca1997 -s ours
am skip reason: change_id I004e78a33689e2208918d4316bcf9a8f50a0bac3 with SHA1 66cc78d6ab is in history
Change-Id: Ia244e081e6e135c578275db1405c3b5b4d23b877
am: c7028a4757 -s ours
am skip reason: change_id I262ca41fe0225660551c9a421562405366b6acac with SHA1 318feaf1ed is in history
Change-Id: I6ab350671e08b74e5c181866f819607d0c2078f3
am: 053f8b300e -s ours
am skip reason: change_id I262ca41fe0225660551c9a421562405366b6acac with SHA1 318feaf1ed is in history
Change-Id: I11d02ceddf42a5102d7d45ec9b986c6e68e235ab
am: db8cd0ac3e -s ours
am skip reason: change_id I004e78a33689e2208918d4316bcf9a8f50a0bac3 with SHA1 66cc78d6ab is in history
Change-Id: I11daaf075229a2891eb2d8b3df54a91a285d52fb
am: bc16cf3d72 -s ours
am skip reason: change_id I262ca41fe0225660551c9a421562405366b6acac with SHA1 318feaf1ed is in history
Change-Id: I367d5afaa5ee254064d61f7f807af838b37583fe
(cherry picked from commit 20204cdf6a)
Covers the case where the majority of traffic through the VPN is
caused by the VPN app itself, and ensures that that traffic is
correctly attributed to the VPN app as opposed to spread between
the other apps that use the VPN.
Bug: 120145746
Test: atest NetworkStatsServiceTest
Change-Id: Ibd7646dc088fa4180abd696e89c3148ff34ce190
Merged-In: Iffd3f95fc2e11d311691a797b010edb38d2ef3c6
(cherry picked from commit 78d5ac4f8f)
Note, that its in a separate CL so we could cherry-pick this CL to aosp.
http://ag/7700679 is already in aosp (http://aosp/865073).
Bug: 113122541
Bug: 120145746
Test: atest FrameworksNetTests
Change-Id: Ic1767bc8bf1460e4223f86465fc72344428e6055
Merged-In: I7cfda226b4ed11b67002b83b38fba0f5caf96718
System server | NetworkStack
|
NetworkMonitorCallbacks ←----|--- NetworkMonitorCallbacks$Stub$Proxy
↓ | ↑
NetworkAgentInfo | NetworkMonitor
↓ | ↑
NetworkMonitor$Stub$Proxy ----|---→ NetworkMonitorImpl
Bug: b/133174607
Test: Manual. The simplest artifact is observed by watching the output of
adb shell dumpsys meminfo -d com.android.networkstack | grep 'Proxy Binders'
while connecting and disconnecting multiple times to any network.
This will display the number of binder proxies. Before this, the binder
proxy count increases by 1 with each connection and never goes down (there
is some noise, as proxy objects are sometimes created for other reasons,
and get GC'd eventually). After this, the binder proxy count is always
eventually stable at 27 + connected network count.
See the bug for the complete analysis.
Merged-In: Ide2428dab3fcd6d7cd00aa2a9fd99d6c99b815a4
Change-Id: I6b74cf12bdbc72c0593d2a4d6f39c895d1ef3534
(cherry picked from commit eb43884fee35102a7fc886750d6a7e891a82ce33)
1. Previously, getDnsNetId doesn't handle all the cases.
Fix it with cosidering bypass private DNS flag.
2. Make getDnsNetId return Network instead of netId,
and change name from getDnsNetId to getDnsNetwork
Bug: 129530368
Test: atest DnsResolverTest DnsUtilsTest
Merged-In: Ibb5080acd3c296650d56532fc7da525e9fa95e8f
(cherry picked from commit 3854966dc9499e39187835606397b16367e5e27b)
Change-Id: I37353642088bcc17da0cf17f78a5ed9efc9aefc3
No internet notification may be prompted before partial
connectivity being detected. Partial connectivity status will
be set into NAI and prompted in the Setting. Behavior is not
aligned between Setting and notification. Thus, update
notification again if partial connectivity is detected.
Also, sliently show the updated notification if no internet
notification has already been shown to user to prevent alerting
user in short time.
Bug: 130683832
Test: Verified with simulated partial connectivity
Test: atest FrameworksNetTests
Change-Id: Ie16a8ce6e0fa437048e8c1eea240314ca30e9520
Merged-In: I004e78a33689e2208918d4316bcf9a8f50a0bac3
Merged-In: I14385a39d99a45c4a6a50a665f456f589c2f4da3
(cherry picked from commit a5c68348d89f256cb5f42283d983d05834c7e36c)
Split-tunnel VPN (which are the only ones affected by this change)
always fall through to the default network for routes they don't
handle, and even if the underlying network(s) don't provide access
this may be a pinhole that can actually reach the broader network.
In practice this behaves like the original release of P and is the
safest thing to do for Q. In R we should evaluate giving the VPN
app the ability to simply tell the network stack whether it does
provide Internet access or not.
Bug: 119216095
Test: FrameworksNetTests NetworkStackTests
Change-Id: I262ca41fe0225660551c9a421562405366b6acac
Merged-In: I262ca41fe0225660551c9a421562405366b6acac
(cherry picked from commit 6d5a4a3b1d1c69eb8a542fecf5e8a306822c19b7)
No internet notification may be prompted before partial
connectivity being detected. Partial connectivity status will
be set into NAI and prompted in the Setting. Behavior is not
aligned between Setting and notification. Thus, update
notification again if partial connectivity is detected.
Also, sliently show the updated notification if no internet
notification has already been shown to user to prevent alerting
user in short time.
Bug: 130683832
Test: Verified with simulated partial connectivity
Test: atest FrameworksNetTests
Change-Id: Ie16a8ce6e0fa437048e8c1eea240314ca30e9520
System server | NetworkStack
|
NetworkMonitorCallbacks ←----|--- NetworkMonitorCallbacks$Stub$Proxy
↓ | ↑
NetworkAgentInfo | NetworkMonitor
↓ | ↑
NetworkMonitor$Stub$Proxy ----|---→ NetworkMonitorImpl
Bug: b/133174607
Test: Manual. The simplest artifact is observed by watching the output of
adb shell dumpsys meminfo -d com.android.networkstack | grep 'Proxy Binders'
while connecting and disconnecting multiple times to any network.
This will display the number of binder proxies. Before this, the binder
proxy count increases by 1 with each connection and never goes down (there
is some noise, as proxy objects are sometimes created for other reasons,
and get GC'd eventually). After this, the binder proxy count is always
eventually stable at 27 + connected network count.
See the bug for the complete analysis.
Change-Id: Ide2428dab3fcd6d7cd00aa2a9fd99d6c99b815a4