In aosp/1203789, if two routes are with the same destination,
it will be replaced instead of added when calling addRoute.
This breaks scenarios which rely on the ability to add multiple
default routes, such as multiple IPv6 default routes learned
via address autoconfiguration.
This change treats the route is an update if the destination
and nexthop are the same, but different in other properties.
Test: atest OffloadControllerTest#testSetUpstreamLinkPropertiesWorking
Test: atest LinkPropertiesUtilsTest#testLinkPropertiesIdenticalEqual
Test: atest ConnectivityServiceTest#testStackedLinkProperties
Test: atest ConnectivityServiceTest#testRouteAddDeleteUpdate
(only directly related tests are listed)
Fix: 152170074
Fix: 151911339
Bug: 142892223
Change-Id: I7153ec9866f14a109ba8155c905e5d9e4f85eb64
Connectivity Diagnostics included an unnecessary try-catch for verifying
that the permissions check for invoking ConnectivityDiagnosticsCallbacks
doesn't throw when the uid and package name do not match.
Bug: 149119324
Test: atest FrameworksNetTests
Change-Id: Ie302b1f4f437e819fdd15ec28adb0b56750c2c53
Merged-In: Ie302b1f4f437e819fdd15ec28adb0b56750c2c53
(cherry picked from commit 66b5e081b785a3b7e2a032342d4d424905581cf9)
ConnectivityDiagnosticsCallbacks should only be invoked for the
underlying networks declared by active VPNs. This encourages VPN apps to
declare their underlying networks.
The previous permission model for VPNs allowed active VPNs to receive
callbacks on any network.
Bug: 148903617
Test: atest FrameworksNetTests
Change-Id: Ic08cdd2e2532580fda0fd3034e2bdff27e0ff84b
Merged-In: Ic08cdd2e2532580fda0fd3034e2bdff27e0ff84b
(cherry picked from commit e1f0c56f74593d3781bfa4ee4871a5efbabe303c)
1.) Replace maybeInitUrlConnectionFactory() with a static method
createUrlConnectionFactory(Dns) and move the logic to acquire
the lock and initialize mUrlConnectionFactory out into
openConnection. This makes it a bit clearer that the lock
is acquired during openConnection().
2.) Use @GuardedBy("mLock") rather than a human readable comment
on mUrlConnectionFactory.
3.) Make mUrlConnectionFactory non-volatile (since it's guarded by
mLock), as recommended by Narayan on the review thread for
http://r.android.com/370652
Alternatively, the field could have remained volatile
and we could have used double-checked locking to avoid
acquiring the lock in the common case.
The lock is only acquired during getSocketFactory() and
openConnection(), so it shouldn't usually be contended.
This CL is a pure refactoring that shouldn't have any observable
behavior change.
Bug: 38311512
Test: Treehugger
Exempt-From-Owner-Approval: refactoring only, owner didn't respond in time
Change-Id: I1cf6075dc7cd994657b11d6a82de3ec63235fb1e
am skip reason: Change-Id I7855090bffbe895c8349ad4903b8f2eb55515f0b with SHA-1 aa5dfd816a is in history
Change-Id: I278c197256ccd394636c8283a5988ad57b5d7bfe
The NetworkStack.getService() API should be used instead.
Bug: 151243982
Test: atest FrameworksNetTests TetheringTests
Manual tethering test
Merged-In: I7855090bffbe895c8349ad4903b8f2eb55515f0b
(clean cherry-pick from internal branch)
Change-Id: If4af2846a82605e828287a9a4680d5547b76b802
am skip reason: Change-Id I2652a5b0f276b8944454af5cb4b1383a3e054cfa with SHA-1 46a0db809f is in history
Change-Id: Id841d62573000973c6f97d94e583f16b4bf94f53
am skip reason: Change-Id Idd041f0fbeca411ea23e49786a50dd7feb77ef45 with SHA-1 4129ed1f13 is in history
Change-Id: I3b914d7ea26dacf4e7cbebd0494d4c4c0b520c8c
am skip reason: Change-Id I87ef1d451eefa6998b9793c4eacabae978376d24 with SHA-1 38ef330e46 is in history
Change-Id: Ie5db8cb976a15fa9f16a8cc76a43f7d9a0ba9761
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 4574935dca is in history
Change-Id: Ibd50e97ac990992af5d9d5ac30cad12f2a28a324
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 965434afab is in history
Change-Id: I3673d68d69670828a6ecb96073a0d9d2c3d7eca1
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.
Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
Merged-In: I86eef7a93267f800dbfc8eafd307effa76a344ca
(cherry picked from commit 3410fb0aa92bbd4f9d7dc031e89f6f528ff34245)
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.
Also rename some constants for easier to understand.
Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
atest TetheringTests
Change-Id: I45cb21d5bc919f6d32c42650326597d5173ea028
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
am skip reason: Change-Id Ie9e5127742beba04f1c191e894e8a29fe1e704bb with SHA-1 27ca44913a is in history
Change-Id: Ic800ee63613d55ddd604c29057a9ea138e27c0de
am skip reason: Change-Id I7eaca623adf93f9b8d53c2e5857ecae90ea572ab with SHA-1 92e995d9cd is in history
Change-Id: Id0224efe75304500cbbb83a551727aa3b09c47f7
am skip reason: Change-Id Ic94da540afa479ed18f1b6fbda4ae3216c37476b with SHA-1 7e6e807bec is in history
Change-Id: Ife89c4526d5e5f79c09fce585b2f124ea06ff28a
am skip reason: Change-Id If330e85330a4ff713dd420c98d42fa741eabd90a with SHA-1 56b6a95256 is in history
Change-Id: I5f7e58d16e30eae69c45a505ea2ee9e4a9802d91