Relies on events sent from netd in aosp/578162.
Test: Added tests to ConnectivityServiceTest. Added a new test
class DnsManagerTest. Built a simple app that appears to
receive onLinkProperties events correctly upon manual changes
to the private DNS settings on a Pixel.
Bug: 71828272
Change-Id: I68665aaf74b7d59182cc6f9586b80b55b0dfe427
This required advancing the IpManager to IpClient refactoring
(Bluetooth used IpManager and friends). Most importantly, the
Bluetooth code used WaitForProvisioningCallback, so this is
moved into IpClient proper now. Also: some more renaming
cleanup.
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
Bug: 62476366
Bug: 72663849
Change-Id: I9eee2a9d5c31cdd48a054a7edc3403584efb1864
Registering for carrier config changes can deliver a sticky broadcast
and can cause Tethering to think something has changed and reevaluate
provisioning status, even though this has been checked before it
entered tethering mode alive state.
Additionally, move the provisioning_app{,no_ui} resources into the
TetheringConfiguration, if for no other reason than now we can log
it in .toString().
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net passes
- manual USB tethering toward WiFi works
Bug: 69565814
Change-Id: Ib8b2620ce44c55e5eb0afd3f00f3f5aa4fc8a593
Moves this out of ConnectivityService and into each NetworkMonitor
(where it's more self-contained).
Test: as follows
- builds, flashes, boots
- runtest frameworks-net passes
- manual testing with working and non-working hostnames behaves
somewhat (but not entirely) as expected, and not always quickly
Bug: 64133961
Bug: 72345192
Bug: 73872000
Bug: 77140445
Change-Id: Ic4322af3cb49149f2d975cb31f54b2ac7927f907
Also disable the flag for split APKs.
Bug: 72696798
Test: manual
(cherry picked from commit a9c343386d5505d7111aee3c1ffec409c9730f21)
Merged-In: I25007500e221744a218b165dde41ca9db19b1832
Change-Id: I1dc3137307834d948b52af18205ca47dc8dc7e67
This change comprises the following parts:
[1] android.net.dns.ResolvUtil, containing methods that encapsulate the
use of the high bit in netids used in DNS resolution contexts.
[2] Updates to captive portal apps to call the ResolvUtil method that
enables DNS-over-TLS bypass for the captive portal app process.
Test: as follows
- builds
- flashes
- boots
- runtest frameworks-net passes
Bug: 64133961
Bug: 72345192
Change-Id: I2072c1f68d6978fa0d7e9d8693135a2c51bb0f87
Some WiFi hotspots send excessive multicast IPv6 ping requests which
cause considerable power drain. Thus, drop all multicast ICMPv6 ping
requests while the device is in doze mode.
Bug: 66930077
Test: runtest -x tests/net/java/android/net/apf/ApfTest.java
Test: manual - compared generated APF bytecode using apf_disassembler
Test: manual - force idle mode while sending multicast pings to device
Change-Id: I25dbf99985cf4413b4d0e3920d281fe6d663197a
Tethering currently wants access to complex isTetheringSupported
logic that is only available in ConnectivityService. Instead of
trying to access that via ConnectivityManager, pass this capability
in to Tethering directly, in the TetheringDependencies object.
Also:
- ConnectivityManager is only a source of static constants now,
so "import static" all the constants that are actually used.
Test: as follows
- built
- flashed
- booted
- runtest frameworks-net works
- manual USB towards WiFi tethering works
Bug: 68951715
Change-Id: Ia64faaadefb4a5d84a50da98bdebd544b6fda101
Instead of requiring an *exact* version, we now require a minimum
version. This is necessary if we wish to upgrade the APF interpreter in
vendor firmware independently of the framework code. Adding new opcodes
without changing the semantics of the old ones is always possible and
usually easy, so we can at least have a backwards-compatibility horizon
wider than a single version.
Change-Id: I4f1ed661afb2ede193188eb8086fbf2a8b45b33d
Test: Change extracted from aosp/647079 and tested there
Knowing why we compiled a package will make some investigations easier.
Test: adb shell dumpsys package dexopt
Bug: 76425903
Change-Id: I67b5bc980d198340aa52affb24fb3ce7e3080d67
In evaluating whether "most" of the addressing space is
covered, the list of routes are obtained from a third-party
app, so it's possbile the system service stalls unless
some limit is enforced on how much work it has to do.
This change limits the number of routes to 400, as determined
by time measurement on various devices.
Bug: 74176086
Test: runtest framework-net
Change-Id: Ie4a96098bc044ade87b188839586f14dd101c100
Disallow the allocation of SPIs in the range
reserved for future use by RFC 4303.
Bug: 77205120
Test: runtest frameworks-net
Change-Id: I05e26ed34b5871f1a07d5bd7b58b79a64cd74b67
A colon appears in the type signature of a field, so is not safe to use in
this context.
Test: m
Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test: > Landroid/app/Activity;->mResumed:Z,Landroid/view/RemoteAnimationDefinition\\\;
Bug: 73337509
Change-Id: Ia9171fecc9c3ed265b87921b31458de25304486e
Usage stats corrections for 464xlat in NetworkStatsFactory are not applied
to tethered traffic. Add adjustments in NetworkStatsService. After
migrating external callers off NetworkStatsFactory, we will be able to
only apply adjustments in NetworkStatsService and remove stacked
interface tracking from NetworkStatsFactory.
Bug: 72107146
Fixes: 72107146
Test: runtest frameworks-net & manual - checked corrected network usage
Change-Id: I5ce450e616b4fddf21f2a491fe5d0c9e9f969bda
This change updates the getSocket() methods for IPsec to improve clarity
of the return types, both for public APIs, and internal-only methods.
Bug: 72473753
Test: APIs updated, CTS + unit tests ran.
Change-Id: I0afebd432c5d04c47c93daa1ce616d712aa323d7
When the background dexopt job times out, tell the scheduler to
reschedule it, as we have more work to do.
Bug: 76425903
Test: m
Test: manual
Change-Id: Ibbdb979bceb1ff0a25f8aed2b3cc26a7f30057e2
Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.
Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.
Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test: Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509
Change-Id: Ib1245b69da4dac50c6968f1be62f1a74591dc433
Also refactoring some Tethering and TetherInterfaceStateMachine calls
to address testability issues.
This is in preparation of other work to have IPv6-only or 464xlat
tethering working.
Test: runtest frameworks-net
Bug: 38218697
Bug: 64382985
Bug: 64976379
Bug: 64995262
Change-Id: I721aca4789ddfbee5a97316aae0b378d79ee2107
This CL adds the basics to set black, dark gray or light gray list
enforcement, rather than just black as before. It's not possible to
actually set the policy per-package yet.
PackageDexOptimizer still uses a single bit, for API checks on/off, rather
than the new enum. It assumes blacklist enforcement internally. This can
be improved in a follow up CL.
(cherry-picked from commit e52130ae4cf3b046b38a09fc7cc7712f5b7fb83d)
Test: m
Test: Boot device
BUG: 73337509
Change-Id: Ic0d5b8fa631c2bd583b6fc52b2ee3708c8113f59
Merged-In: Idd73c9938592c5c4d67cfb9efefdffed0dd5f262
tombstoned prunes based on both age and number of files. Until we can
fully switch over to tombstoned, emulate that here too.
Bug: http://b/73140330
Test: ran tests
Change-Id: I824034019e91d541fc7b7ba49d152e1ceaf37621
This reverts commit 46850eb3d2180d29751a18056ae094965e840827.
Reason for revert: The dummy StatsLog class was merged into stage-aosp-master and oc-mr1-dev-plus-aosp, which were the branches that broke initially.
Change-Id: Iab9bac487d845db0ba70b2622679523604b4944e
This will let ConnectivityService send the right callbacks to the
relevant apps.
Test: manual with apps
runtest frameworks-net
cts
new tests for this functionality
Bug: 67408339
Change-Id: I6f08efd9e73c7e191f833d7f307a3bf4c9e2f0b4
Useful for clients such as BatteryStats which currently rely
on NetworkStatsFactory. Data at that stage is incomplete as
it does not account for tethering, VT data and corresponding
464xlat corrections.
Test: runtest frameworks-net, CTS tests pass.
Change-Id: I763b77f601c827fd2963204694fb5b45425cc791
This reverts commit f336d1e9cf8b48fe73ad8527365d5286d673ffba.
Reason for revert: Reverting this CL as it causes several build breakages in git_stage-aosp-master
Change-Id: I4a29f7313857a561452c01fb331accbf59c64a72