Commit Graph

8275 Commits

Author SHA1 Message Date
Benedict Wong
3fdeb4e59f Merge "Automatically set IPsec tunnel interface as up" am: 57b8e50ad5 am: da13bf31e9
Change-Id: Iea78d37e17961a755194e42a85fe7ab92c20c4fb
2020-03-25 05:01:42 +00:00
Benedict Wong
da13bf31e9 Merge "Automatically set IPsec tunnel interface as up" am: 57b8e50ad5
Change-Id: I068814590192decaf353cdd8c46cc7f65badc746
2020-03-25 04:35:03 +00:00
Benedict Wong
57b8e50ad5 Merge "Automatically set IPsec tunnel interface as up" 2020-03-25 04:18:50 +00:00
Chalard Jean
bbb823ac32 Merge "Expose netId by adding getter API" am: cb1c9fcc50 am: 361845839b
Change-Id: I45a3b531454d7555ece5483846047cfdb6aefc17
2020-03-25 02:59:32 +00:00
Chalard Jean
361845839b Merge "Expose netId by adding getter API" am: cb1c9fcc50
Change-Id: Iab3bae76255fb4096aa3b2c9da8d6f12bb588d3e
2020-03-25 02:44:04 +00:00
Chalard Jean
cb1c9fcc50 Merge "Expose netId by adding getter API" 2020-03-25 02:23:03 +00:00
markchien
dee287219f Expose netId by adding getter API
Bug: 151156820
Test: m
      atest TetetheringTests

Clean CP from ag/10747732

Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
Merged-In: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
2020-03-24 09:19:26 +00:00
Treehugger Robot
014f855013 Merge "Fix addRoute replace default route unexpectedly" am: 7a1edfc7e6 am: beb47f1d53
Change-Id: I62f5226f92948414838b332610262d9f6f395570
2020-03-24 06:15:19 +00:00
Treehugger Robot
beb47f1d53 Merge "Fix addRoute replace default route unexpectedly" am: 7a1edfc7e6
Change-Id: I43e953159c33c267a5fd7f6359ed8ee8d683affb
2020-03-24 06:03:10 +00:00
Treehugger Robot
7a1edfc7e6 Merge "Fix addRoute replace default route unexpectedly" 2020-03-24 05:51:30 +00:00
junyulai
21c26dae4e 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
79ace6a36f Merge "Refactor Network's use of mUrlConnectionFactory." am: 57de4563f4 am: 14898d7091
Change-Id: I9634a6830d2436c3ba105a4ba61aeba4c1c68f06
2020-03-23 12:08:39 +00:00
Tobias Thierer
14898d7091 Merge "Refactor Network's use of mUrlConnectionFactory." am: 57de4563f4
Change-Id: I3ad8fd8479e91bc34b21297b7953a38372431a8c
2020-03-23 11:52:22 +00:00
Tobias Thierer
57de4563f4 Merge "Refactor Network's use of mUrlConnectionFactory." 2020-03-23 11:34:43 +00:00
Tobias Thierer
d109bbbbe4 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
cdcad00697 Merge changes from topic "netstack_constant_cherrypick" am: 94c93edbaf am: 0630b49126
Change-Id: I393d8cc8ace27aaeed9ff6cb26bc52551628b8a1
2020-03-23 04:04:33 +00:00
Remi NGUYEN VAN
0630b49126 Merge changes from topic "netstack_constant_cherrypick" am: 94c93edbaf
Change-Id: I4fa3f771fe93e9b6024828d9c725502629c1ccff
2020-03-23 03:48:08 +00:00
Remi NGUYEN VAN
94c93edbaf 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
f2fed038c3 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
12621ef0d5 Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master" into stage-aosp-master am: c95a961a0b
Change-Id: I90bb2d5c1feb7f74f3677828454599a7f7bb2e88
2020-03-20 18:33:07 +00:00
Xin Li
859cb502e8 DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp@6304901 into stage-aosp-master am: 1d4d52c88f
Change-Id: Ief9788fe26220b3f31d99c46a38aa6992e41d56e
2020-03-20 18:32:31 +00:00
TreeHugger Robot
c95a961a0b 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
Cody Kesting
11aef2dd0e Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." am: 3cde0f0c33 am: a0ead5987f
Change-Id: Ice55919cad6bde67e09ff0fc97d10daa392d80f5
2020-03-19 18:41:57 +00:00
Cody Kesting
a0ead5987f Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." am: 3cde0f0c33
Change-Id: I4f0c145c08a1e4fef7badcd6476d4a69808f15c1
2020-03-19 18:23:29 +00:00
Cody Kesting
3cde0f0c33 Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." 2020-03-19 18:09:26 +00:00
Xin Li
1d4d52c88f 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
117628e376 Merge "TetheringManager API clean up" am: ffe3a0c6ca am: 20df994471
Change-Id: I07131e5179d6232a71cf734b428ba627597e6cb9
2020-03-19 16:29:42 +00:00
Treehugger Robot
619fddbcb8 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: 0497d8bbf3 am: 5dcef6a912
Change-Id: I5bb2668555313716cb04ccf2ddb13fce7b56b5ad
2020-03-19 16:29:14 +00:00
Mark Chien
20df994471 Merge "TetheringManager API clean up" am: ffe3a0c6ca
Change-Id: I93e9bb5f596fff27de236b56cf21f9edb3c0204a
2020-03-19 16:17:27 +00:00
Treehugger Robot
5dcef6a912 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: 0497d8bbf3
Change-Id: If0000228b44b9f379c6e1499d7d86d7738889ee2
2020-03-19 16:16:58 +00:00
Mark Chien
ffe3a0c6ca Merge "TetheringManager API clean up" 2020-03-19 16:09:21 +00:00
Treehugger Robot
0497d8bbf3 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" 2020-03-19 15:51:32 +00:00
Lorenzo Colitti
f3bec56aba Merge "Make Ethernet interfaces more testable." am: a2f1af1e17 am: 5ddf168050
Change-Id: I4b262fb9cf66a7e1f859e03c7df0fd337658c376
2020-03-19 11:47:03 +00:00
markchien
eddbe2be24 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
19336c2fe0 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
5ddf168050 Merge "Make Ethernet interfaces more testable." am: a2f1af1e17
Change-Id: I456acb05d548b3d0281e500cfd91d888441d7f94
2020-03-19 11:30:33 +00:00
Lorenzo Colitti
a2f1af1e17 Merge "Make Ethernet interfaces more testable." 2020-03-19 11:12:09 +00:00
Junyu Lai
20d4f1fa3a Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f am: b3c511d028 am: 124a03a96f
Change-Id: If5e59645f5f5754b40da5a3cb945d34a14605062
2020-03-19 09:40:56 +00:00
junyulai
dcf245e730 [SM07] Make combine subtype configurable from Settings am: 4e63e42a57 am: 53651df7f8
Change-Id: I65470e2ce4aae26308a395ce1e5465ac27914f60
2020-03-19 09:40:53 +00:00
junyulai
190b4018cd [SM05] Enable record mobile network stats by collapsed rat type am: a04a1ed597 am: 6f5673043a
Change-Id: Ie23c2131349412d9dae04db122d7b3d14047b87f
2020-03-19 09:40:51 +00:00
Junyu Lai
124a03a96f Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f am: b3c511d028
Change-Id: I091c93ba6b0001253e2b0679eee48293b4e51afc
2020-03-19 09:31:08 +00:00
junyulai
53651df7f8 [SM07] Make combine subtype configurable from Settings am: 4e63e42a57
Change-Id: I0c3f4a02f16eb6a4d9e48fa775bf456707d2b1bb
2020-03-19 09:31:02 +00:00
junyulai
6f5673043a [SM05] Enable record mobile network stats by collapsed rat type am: a04a1ed597
Change-Id: If4bcfaefd2244be67449066ef54a6bdc0c00eb86
2020-03-19 09:31:00 +00:00
junyulai
29b2aa1375 [SM08] Add NetworkTemplate unit test for fetching mobile data usage
Test: atest NetworkTemplateTest
Bug: 129082217

Change-Id: I7eaca623adf93f9b8d53c2e5857ecae90ea572ab
Merged-In: I7eaca623adf93f9b8d53c2e5857ecae90ea572ab
(cherry picked from commit d63ba64c52)
2020-03-19 10:10:07 +08:00
junyulai
4e63e42a57 [SM07] Make combine subtype configurable from Settings
Note that enabling/disabling would not take effect until device
reboot. This will be addressed in follow-up patch.

Test: 1. atest NetworkStatsServieTest SettingsBackupTest
      2. adb shell settings put global netstats_combine_subtype_enabled 1|0
Bug: 146415925

Change-Id: Ic94da540afa479ed18f1b6fbda4ae3216c37476b
Merged-In: Ic94da540afa479ed18f1b6fbda4ae3216c37476b
(cherry picked from commit 8e0fc53cfe and
 fix merge conflict in SettingsBackupTest)
2020-03-19 10:10:07 +08:00
junyulai
a04a1ed597 [SM05] Enable record mobile network stats by collapsed rat type
Switch on the recording in device side. Metrics will be
collected in follow-up patches which can be independently
enabled/disabled.

This change also fix the fail in NetworkStatsCollectionTest
which caused by enabling this feature, where the rounding
problem happened when records are distributed into smaller
buckets and categorized into more NetworkIdentity.

Test: atest FrameworksNetTests
Bug: 129082217
Change-Id: If330e85330a4ff713dd420c98d42fa741eabd90a
Merged-In: If330e85330a4ff713dd420c98d42fa741eabd90a
(cherry picked from commit a7117e41a2)
2020-03-19 10:10:07 +08:00
Paul Hu
378694e966 Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" am: 8afd953975 am: 5401b69c64
Change-Id: Id52a6936a84d5ee1181dea78227eb8fface1fd33
2020-03-19 01:45:19 +00:00
Paul Hu
5401b69c64 Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" am: 8afd953975
Change-Id: I823ae84ac6f522400297d174ebfad5e61d4a6cd9
2020-03-19 01:30:58 +00:00
Paul Hu
8afd953975 Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" 2020-03-19 01:10:55 +00:00
Lorenzo Colitti
4c17972cb2 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
2020-03-19 09:46:37 +09:00