(cherry picked from commit 1419b0b20e4b079bfa66662d042b4dc35fb22d78)
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 a229333986f95e48347fa8b653d7e1776019f84a)
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
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
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
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
Change-Id: Ic8d45b802d72a266f9ec97bfea620c1ede6967e5
See build/soong/README.md for more information.
Bug: 122332340
Test: m RunSettingsRoboTests
Test: atest SettingsLibTests (same failures before and after)
Change-Id: I69b5b2c6c22f93a31ef978710867226cb1ba3db0
Merged-In: I69b5b2c6c22f93a31ef978710867226cb1ba3db0
See build/soong/README.md for more information.
Bug: 122332340
Test: Built and flashed to a Pixel device + TreeHugger
Merged-In: I4ff0577a0c27b8a451e6aca2c62c2437481c2a0c
Change-Id: I4ff0577a0c27b8a451e6aca2c62c2437481c2a0c
This CL reformats Android.bp via the above command line.
Before running it, I first had to "make bpfmt".
Test: Visual inspection / self-review only.
Change-Id: I00857646720198e13f875056793802b2e4350264
Another CL in this topic introduces the metalava feature flag
--replace-documentation <ancestor java packages> <regex> <replacement>
to perform regex replacements in the documentation of some elements.
This CL uses that feature to re-write links in libcore/ojluni/
documentation that previously carried patches.
Since .bp files don't appear to support String literals that are not
(un)escaped, \ and $ occurring in the regexp/replacement parameters
need to be escaped in the .bp file.
Bug: 129765390
Test: Manually checked that this CL topic does not affect the result of
"make ds-docs offline-sdk-docs"
Change-Id: Idb7366530c4ab255c1348cf48881cf2bde31be1e
Migration in preparation for deletion of ByteStringUtils.
This change also fixes some import issues necessary for upload.
Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Already approved internally
Merged-In: I6ee12e9914503a5b628ae6da82a396aa71dd972c
Change-Id: I6ee12e9914503a5b628ae6da82a396aa71dd972c
Captive portal overrides two shouldOverrideUrlLoading methods,
but show certificate logic only be implemented in deprecated one.
Bug: 133714666
Test: -build, flash, boot
-atest FramworksNetTests
-manual test
Change-Id: Ibdcfb814d9552563416fc30b314916559862c361
Force vmSafeMode behaviour on debuggable apps:
- the runtime ignores their compiled code
- they generally have lots of methods that could make the compiler used
run out of memory
Bug: 130828957
Test: manual
Merged-In: I946ce15a18729ec6620aca257c52e5b9e4434265
Change-Id: I946ce15a18729ec6620aca257c52e5b9e4434265
These code failed with kotlinc v1.3.31.
1) Drawable.draw is marked as @NotNull. The declaration in both side
doesn't match.
2) Seems kotlin doesn't recognize getMatrix / setMatrix as a property
now. This is a little weird but may also because of @NotNull annotation
in setMatrix parameter.
Test: build with old and new compiler
Change-Id: Id7f34229e29bbceb6271a0648acf3512c10ed04c
Merged-In: Id5a85c787876248e610cc668f54e7bd40629d4e0
This is the most common test library for Connectivity tests. It is
meant to be usable in framework tests, network stack tests, CTS,
GTS. To achieve that, it can only depend on framework classes.
Bug: none
Test: NetworkMonitorTest
Test: NsdManagerTest
Test: ConnectivityServiceTest
Test: OffloadControllerTest
Test: NetworkStatsObserversTest
Test: NetworkStatsServiceTest
(all the touched classes)
Change-Id: Ic47cbe7ba0e407145fa6bc49bb2adb3c5937dbc4
This test is conitnuely fail in cuttlefish.
Lack of ipv6 default route in cuttlefish caused the test failed.
The reason is that the result of rfc6724Sort depends on on the route in system.
It is not good to expect any route should exists, so remove it.
Bug: 133649648
Test: atest DnsUtilsTest
Change-Id: I91f89782b9b989fa1a49e666bb5ce2df3a0dbbf7
Also :
- Fix testUidFilteringDuringVpnConnectDisconnectAndUidUpdates that
was failing on devices with a first released SDK >= Q
- Add a test actually tests that the system has the permission, as
the test was only testing what's in the mock
Bug: 119770201
Test: New test making sure this stays true
Change-Id: I74cf5f0fa17fcf818f1fed78c7e3e4375c20152e