Commit Graph

8923 Commits

Author SHA1 Message Date
Junyu Lai
bfe619c187 Merge "Create a builder for NetworkCapabilities." into rvc-dev am: 448b243f52
Change-Id: Ia2b117da5d9331d63a9b4814ae8d26dbbdf3275f
2020-03-20 11:23:57 +00:00
Junyu Lai
d7ecebfa74 Merge "Expose netId by adding getter API" into rvc-dev am: 21da2b6432
Change-Id: I826f8a561b2bd0f456302247f90d26ffc42c42df
2020-03-20 11:23:27 +00:00
Aaron Huang
21074c87aa API review: access field by method am: c3e9562525
Change-Id: I5128f2865406e0f35fb30af102dc9957ceac29ed
2020-03-20 11:22:39 +00:00
Chalard Jean
d2c09529a9 Create a builder for NetworkCapabilities. am: dfcbc07b3e
Change-Id: I3d7a595d25b65ff4f5762c83a3dfc82c0f5ddc2d
2020-03-20 11:08:52 +00:00
Junyu Lai
448b243f52 Merge "Create a builder for NetworkCapabilities." into rvc-dev 2020-03-20 11:03:47 +00:00
Junyu Lai
21da2b6432 Merge "Expose netId by adding getter API" into rvc-dev 2020-03-20 11:03:05 +00:00
Cody Kesting
5a288ee4d0 [automerger skipped] Merge "Change NetworkCapabilties administrator UIDs to be stored as int[]." am: 3cde0f0c33 am: a0ead5987f -s ours
am skip reason: Change-Id I2652a5b0f276b8944454af5cb4b1383a3e054cfa with SHA-1 1043927267 is in history

Change-Id: Id841d62573000973c6f97d94e583f16b4bf94f53
2020-03-19 18:41:38 +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
Mark Chien
39d71ae258 [automerger skipped] Merge "TetheringManager API clean up" am: ffe3a0c6ca am: 20df994471 -s ours
am skip reason: Change-Id Idd041f0fbeca411ea23e49786a50dd7feb77ef45 with SHA-1 68b6784942 is in history

Change-Id: I3b914d7ea26dacf4e7cbebd0494d4c4c0b520c8c
2020-03-19 16:28:38 +00:00
Treehugger Robot
15970917ea [automerger skipped] Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" am: 0497d8bbf3 am: 5dcef6a912 -s ours
am skip reason: Change-Id I87ef1d451eefa6998b9793c4eacabae978376d24 with SHA-1 0fe1140651 is in history

Change-Id: Ie5db8cb976a15fa9f16a8cc76a43f7d9a0ba9761
2020-03-19 16:28:12 +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
78ff620264 [automerger skipped] Merge "Make Ethernet interfaces more testable." into rvc-dev am: 7f11f2d84f -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 8687436656 is in history

Change-Id: Ibd50e97ac990992af5d9d5ac30cad12f2a28a324
2020-03-19 14:45:06 +00:00
Lorenzo Colitti
94a71998ec [automerger skipped] Make Ethernet interfaces more testable. am: 8687436656 -s ours
am skip reason: Change-Id I86eef7a93267f800dbfc8eafd307effa76a344ca with SHA-1 4c17972cb2 is in history

Change-Id: I3673d68d69670828a6ecb96073a0d9d2c3d7eca1
2020-03-19 14:44:23 +00:00
Lorenzo Colitti
7f11f2d84f Merge "Make Ethernet interfaces more testable." into rvc-dev 2020-03-19 14:31:57 +00:00
TreeHugger Robot
0707fd71bd Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev am: b6c84e985d
Change-Id: I03fd96ffe141f5cf5c2448390aba5be9c28fc96a
2020-03-19 13:52:20 +00:00
TreeHugger Robot
b6c84e985d Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev 2020-03-19 13:40:51 +00:00
Chalard Jean
dfcbc07b3e Create a builder for NetworkCapabilities.
Bug: 151322799
Test: FrameworksWifiTests
Change-Id: I06eb97e50d5583579b3c26d1365d2dbaec8bfc99
2020-03-19 21:55:57 +09:00
Lorenzo Colitti
8687436656 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
c3582b3e7b Merge "TetheringManager API clean up" into rvc-dev am: 3da1e71044
Change-Id: Id093ec8add4777f1d4a2c3d0890378acdc7ceaed
2020-03-19 12:07:18 +00:00
Mark Chien
3da1e71044 Merge "TetheringManager API clean up" into rvc-dev 2020-03-19 12:04:05 +00:00
Lorenzo Colitti
fd27e89164 Merge "Make Ethernet interfaces more testable." am: a2f1af1e17 am: 5ddf168050
Change-Id: I5a73dc5ad6576573bcac6c7ac6f1270dfbb97470
2020-03-19 11:46:55 +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
markchien
0fe1140651 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
d88cca52db [automerger skipped] Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" into rvc-dev am: b1b08a0d45 -s ours
am skip reason: Change-Id Ie9e5127742beba04f1c191e894e8a29fe1e704bb with SHA-1 d9ce33f980 is in history

Change-Id: Ic800ee63613d55ddd604c29057a9ea138e27c0de
2020-03-19 10:20:26 +00:00
Junyu Lai
36f6e4300f [automerger skipped] Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f am: b3c511d028 am: 124a03a96f -s ours
am skip reason: Change-Id I7eaca623adf93f9b8d53c2e5857ecae90ea572ab with SHA-1 e36b07b902 is in history

Change-Id: Id0224efe75304500cbbb83a551727aa3b09c47f7
2020-03-19 09:40:03 +00:00
junyulai
ad104f711c [automerger skipped] [SM07] Make combine subtype configurable from Settings am: 4e63e42a57 am: 53651df7f8 -s ours
am skip reason: Change-Id Ic94da540afa479ed18f1b6fbda4ae3216c37476b with SHA-1 8c526ea1bf is in history

Change-Id: Ife89c4526d5e5f79c09fce585b2f124ea06ff28a
2020-03-19 09:40:00 +00:00
junyulai
6d655984a1 [automerger skipped] [SM05] Enable record mobile network stats by collapsed rat type am: a04a1ed597 am: 6f5673043a -s ours
am skip reason: Change-Id If330e85330a4ff713dd420c98d42fa741eabd90a with SHA-1 6d3c4ef6ee is in history

Change-Id: I5f7e58d16e30eae69c45a505ea2ee9e4a9802d91
2020-03-19 09:39:55 +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
markchien
68b6784942 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: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 16:32:37 +08:00
markchien
d069cf9367 Expose netId by adding getter API
Bug: 151156820
Test: m
      atest TetetheringTests
Change-Id: Ieb1483c146aa2f7d8f251157e6e81d71c44ae899
(cherry picked from commit 8831c4b54178753013d568c0b76bbf7487db8122)
2020-03-19 15:57:31 +09:00
Automerger Merge Worker
b5255d439e Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL
CONNECTIVITY_ACTION_SUPL is marked as a "temporary hack" and has
never been public. Remove this intent definition since no one is
receiving this intent and should use network callback to know the
connection change.

Bug: 109636544
Test: atest FrameworksNetTests
Change-Id: Ie9e5127742beba04f1c191e894e8a29fe1e704bb
Merged-In: Ie9e5127742beba04f1c191e894e8a29fe1e704bb
(cherry picked from aosp/1224697)
2020-03-19 06:53:04 +00:00
Junyu Lai
7271067aaf Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f into rvc-dev am: 7d06b09387
Change-Id: Ic8899a08eb93c8bafbe1bbc1201c2171534fdfb2
2020-03-19 06:38:05 +00:00
junyulai
0355c834d7 [SM07] Make combine subtype configurable from Settings am: 8c526ea1bf
Change-Id: Ic8426ae36b5aaadfdd3292a3b70fc9b290443d5c
2020-03-19 06:37:59 +00:00
junyulai
1b1caafa14 [SM05] Enable record mobile network stats by collapsed rat type am: 6d3c4ef6ee
Change-Id: I492dd32dc6b6af061da02a450c8c6abff0e8bf5e
2020-03-19 06:37:56 +00:00
Junyu Lai
7d06b09387 Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f into rvc-dev
* changes:
  [SM08] Add NetworkTemplate unit test for fetching mobile data usage
  [SM07] Make combine subtype configurable from Settings
  [SM05] Enable record mobile network stats by collapsed rat type
  [SM04] Support fetching data with NetworkTemplate with subType
  [SM02] Support record mobile network stats by collapsed rat type
2020-03-19 06:29:38 +00:00
Aaron Huang
c3e9562525 API review: access field by method
- InvalidPacketException, public field should be a method so
  add getter to get error code.
- KeepalivePacketData, public fields should be methods so
   add getter for fields.

Bug: 151322799
Test: atest FrameworksNetTests
      atest FrameworksWifiTests
      atest FrameworksTelephonyTests: some failure in CarrierAppUtilsTest
Change-Id: Id01e6135193716cc21bba11da529bf1507a954f7
2020-03-19 11:38:24 +08:00
Lucas Lin
475298d47e [automerger skipped] Merge "Add version check to prevent test fail on Android Q" into rvc-dev am: f425a3103a -s ours
am skip reason: Change-Id I73ef7eececec757a6e9683b231bf73fcd8d49f8d with SHA-1 f5ef6765d5 is in history

Change-Id: I44e001c8f140d121ede32bc581792cb8de66b54c
2020-03-19 03:16:57 +00:00
Lucas Lin
f425a3103a Merge "Add version check to prevent test fail on Android Q" into rvc-dev 2020-03-19 03:09:46 +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