Commit Graph

8987 Commits

Author SHA1 Message Date
Treehugger Robot
c73de276e3 Merge "Fix addRoute replace default route unexpectedly" am: 56d39d3251 am: c6a56b7678
Change-Id: I59759bb5241f24f5b0a3359c9c9bdb089b1b9515
2020-03-24 06:15:24 +00:00
Treehugger Robot
c6a56b7678 Merge "Fix addRoute replace default route unexpectedly" am: 56d39d3251
Change-Id: I43e953159c33c267a5fd7f6359ed8ee8d683affb
2020-03-24 06:03:10 +00:00
Treehugger Robot
56d39d3251 Merge "Fix addRoute replace default route unexpectedly" 2020-03-24 05:51:30 +00:00
junyulai
a1493a52d0 Fix addRoute replace default route unexpectedly
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
2020-03-24 10:27:01 +08:00
Tobias Thierer
d8dff567fa Merge "Refactor Network's use of mUrlConnectionFactory." am: f06634ae70 am: a831fdfb1f
Change-Id: I7ce77a1735521cc10ee16a4c6f45e59c0a87585a
2020-03-23 12:08:11 +00:00
Tobias Thierer
a831fdfb1f Merge "Refactor Network's use of mUrlConnectionFactory." am: f06634ae70
Change-Id: I3ad8fd8479e91bc34b21297b7953a38372431a8c
2020-03-23 11:52:22 +00:00
Tobias Thierer
f06634ae70 Merge "Refactor Network's use of mUrlConnectionFactory." 2020-03-23 11:34:43 +00:00
Tobias Thierer
47c0d852da Refactor Network's use of mUrlConnectionFactory.
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
2020-03-23 11:34:32 +00:00
Remi NGUYEN VAN
2015ebbef6 [automerger skipped] Merge changes from topic "netstack_constant_cherrypick" am: 10adc9a7b9 am: 4a2454f475 -s ours
am skip reason: Change-Id I7855090bffbe895c8349ad4903b8f2eb55515f0b with SHA-1 aa5dfd816a is in history

Change-Id: I278c197256ccd394636c8283a5988ad57b5d7bfe
2020-03-23 04:04:40 +00:00
Remi NGUYEN VAN
4a2454f475 Merge changes from topic "netstack_constant_cherrypick" am: 10adc9a7b9
Change-Id: I4fa3f771fe93e9b6024828d9c725502629c1ccff
2020-03-23 03:48:08 +00:00
Remi NGUYEN VAN
10adc9a7b9 Merge changes from topic "netstack_constant_cherrypick"
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant
2020-03-23 03:33:58 +00:00
Remi NGUYEN VAN
fbb0836bc6 Remove usage of Context.NETWORK_STACK_SERVICE
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
2020-03-23 11:29:06 +09:00
TreeHugger Robot
d163385d42 [automerger skipped] Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master" into stage-aosp-master am: a49dc47a50 -s ours
am skip reason: subject contains skip directive

Change-Id: Ia1f95f590e25c34b4bb6dcf91c06f46a1494c523
2020-03-20 18:31:59 +00:00
TreeHugger Robot
a49dc47a50 Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master" into stage-aosp-master 2020-03-20 18:15:02 +00:00
Aaron Huang
4a92f0ce93 Merge "API review: access field by method" into rvc-dev am: de4c7dcda4
Change-Id: If07f22d62b3fcc341063aaf98130da9c90f7d953
2020-03-20 11:24:32 +00:00
Junyu Lai
0f58b3f374 Merge "Create a builder for NetworkCapabilities." into rvc-dev am: 7049aa6816
Change-Id: Ia2b117da5d9331d63a9b4814ae8d26dbbdf3275f
2020-03-20 11:23:57 +00:00
Junyu Lai
f5098d2040 Merge "Expose netId by adding getter API" into rvc-dev am: ad76cd9864
Change-Id: I826f8a561b2bd0f456302247f90d26ffc42c42df
2020-03-20 11:23:27 +00:00
Aaron Huang
3cfac75f49 API review: access field by method am: 410236b92e
Change-Id: I5128f2865406e0f35fb30af102dc9957ceac29ed
2020-03-20 11:22:39 +00:00
Aaron Huang
de4c7dcda4 Merge "API review: access field by method" into rvc-dev 2020-03-20 11:09:43 +00:00
Chalard Jean
52ce44e5b6 Create a builder for NetworkCapabilities. am: d7d24015a5
Change-Id: I3d7a595d25b65ff4f5762c83a3dfc82c0f5ddc2d
2020-03-20 11:08:52 +00:00
Junyu Lai
7049aa6816 Merge "Create a builder for NetworkCapabilities." into rvc-dev 2020-03-20 11:03:47 +00:00
Junyu Lai
ad76cd9864 Merge "Expose netId by adding getter API" into rvc-dev 2020-03-20 11:03:05 +00:00
Cody Kesting
529cf12178 [automerger skipped] Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." am: 1a78f835eb am: 190b93583e -s ours
am skip reason: Change-Id I2652a5b0f276b8944454af5cb4b1383a3e054cfa with SHA-1 46a0db809f is in history

Change-Id: Id841d62573000973c6f97d94e583f16b4bf94f53
2020-03-19 18:41:38 +00:00
Cody Kesting
190b93583e Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." am: 1a78f835eb
Change-Id: I4f0c145c08a1e4fef7badcd6476d4a69808f15c1
2020-03-19 18:23:29 +00:00
Cody Kesting
1a78f835eb Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." 2020-03-19 18:09:26 +00:00
Xin Li
68fa07d352 DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master
Bug: 151763422
Change-Id: I62d3293f617f630d3d2a3d5f67b764bf272769bf
2020-03-19 10:10:35 -07:00
Mark Chien
189b6ca880 [automerger skipped] Merge "TetheringManager API clean up" am: bc91f858e6 am: 41e19fd231 -s ours
am skip reason: Change-Id Idd041f0fbeca411ea23e49786a50dd7feb77ef45 with SHA-1 4129ed1f13 is in history

Change-Id: I3b914d7ea26dacf4e7cbebd0494d4c4c0b520c8c
2020-03-19 16:28:38 +00:00
Treehugger Robot
bf84dcc3e9 [automerger skipped] Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: f0da719ed1 am: 775a5930cd -s ours
am skip reason: Change-Id I87ef1d451eefa6998b9793c4eacabae978376d24 with SHA-1 38ef330e46 is in history

Change-Id: Ie5db8cb976a15fa9f16a8cc76a43f7d9a0ba9761
2020-03-19 16:28:12 +00:00
Mark Chien
41e19fd231 Merge "TetheringManager API clean up" am: bc91f858e6
Change-Id: I93e9bb5f596fff27de236b56cf21f9edb3c0204a
2020-03-19 16:17:27 +00:00
Treehugger Robot
775a5930cd Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: f0da719ed1
Change-Id: If0000228b44b9f379c6e1499d7d86d7738889ee2
2020-03-19 16:16:58 +00:00
Mark Chien
bc91f858e6 Merge "TetheringManager API clean up" 2020-03-19 16:09:21 +00:00
Treehugger Robot
f0da719ed1 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" 2020-03-19 15:51:32 +00:00
Lorenzo Colitti
624f4a2461 [automerger skipped] Merge "Make Ethernet interfaces more testable." into rvc-dev am: 3577796e6a -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 4574935dca is in history

Change-Id: Ibd50e97ac990992af5d9d5ac30cad12f2a28a324
2020-03-19 14:45:06 +00:00
Lorenzo Colitti
93d45b5d34 [automerger skipped] Make Ethernet interfaces more testable. am: 4574935dca -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 965434afab is in history

Change-Id: I3673d68d69670828a6ecb96073a0d9d2c3d7eca1
2020-03-19 14:44:23 +00:00
Lorenzo Colitti
3577796e6a Merge "Make Ethernet interfaces more testable." into rvc-dev 2020-03-19 14:31:57 +00:00
TreeHugger Robot
678b6ddb65 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev am: 3eb3c377b8
Change-Id: I03fd96ffe141f5cf5c2448390aba5be9c28fc96a
2020-03-19 13:52:20 +00:00
TreeHugger Robot
3eb3c377b8 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev 2020-03-19 13:40:51 +00:00
Chalard Jean
d7d24015a5 Create a builder for NetworkCapabilities.
Bug: 151322799
Test: FrameworksWifiTests
Change-Id: I06eb97e50d5583579b3c26d1365d2dbaec8bfc99
2020-03-19 21:55:57 +09:00
Lorenzo Colitti
4574935dca Make Ethernet interfaces more testable.
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)
2020-03-19 12:30:39 +00:00
Mark Chien
0a28218eee Merge "TetheringManager API clean up" into rvc-dev am: cca0c6192e
Change-Id: Id093ec8add4777f1d4a2c3d0890378acdc7ceaed
2020-03-19 12:07:18 +00:00
Mark Chien
cca0c6192e Merge "TetheringManager API clean up" into rvc-dev 2020-03-19 12:04:05 +00:00
Lorenzo Colitti
5a82f3c4ad Merge "Make Ethernet interfaces more testable." am: cabe5e5615 am: 5b7eccf20d
Change-Id: I5a73dc5ad6576573bcac6c7ac6f1270dfbb97470
2020-03-19 11:46:55 +00:00
markchien
fac84a2be1 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
Merged-In: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 11:36:07 +00:00
markchien
f47d83448c TetheringManager API clean up
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
2020-03-19 19:32:50 +08:00
Lorenzo Colitti
5b7eccf20d Merge "Make Ethernet interfaces more testable." am: cabe5e5615
Change-Id: I456acb05d548b3d0281e500cfd91d888441d7f94
2020-03-19 11:30:33 +00:00
Lorenzo Colitti
cabe5e5615 Merge "Make Ethernet interfaces more testable." 2020-03-19 11:12:09 +00:00
markchien
38ef330e46 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 19:10:23 +08:00
Paul Hu
b45f655988 [automerger skipped] Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" into rvc-dev am: b1b08a0d45 -s ours
am skip reason: Change-Id Ie9e5127742beba04f1c191e894e8a29fe1e704bb with SHA-1 27ca44913a is in history

Change-Id: Ic800ee63613d55ddd604c29057a9ea138e27c0de
2020-03-19 10:20:26 +00:00
Junyu Lai
60d9466770 [automerger skipped] Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f am: b3c511d028 am: 4a0f9fa336 -s ours
am skip reason: Change-Id I7eaca623adf93f9b8d53c2e5857ecae90ea572ab with SHA-1 92e995d9cd is in history

Change-Id: Id0224efe75304500cbbb83a551727aa3b09c47f7
2020-03-19 09:40:03 +00:00
junyulai
d325cd764b [automerger skipped] [SM07] Make combine subtype configurable from Settings am: 678befa63c am: 5d348ec90f -s ours
am skip reason: Change-Id Ic94da540afa479ed18f1b6fbda4ae3216c37476b with SHA-1 7e6e807bec is in history

Change-Id: Ife89c4526d5e5f79c09fce585b2f124ea06ff28a
2020-03-19 09:40:00 +00:00