Commit Graph

8106 Commits

Author SHA1 Message Date
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
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
Junyu Lai
4a0f9fa336 Merge changes I7eaca623,Ic94da540,If330e853,Ie2d229be,Ic6b2f10f am: b3c511d028
Change-Id: I091c93ba6b0001253e2b0679eee48293b4e51afc
2020-03-19 09:31:08 +00:00
junyulai
5d348ec90f [SM07] Make combine subtype configurable from Settings am: 678befa63c
Change-Id: I0c3f4a02f16eb6a4d9e48fa775bf456707d2b1bb
2020-03-19 09:31:02 +00:00
junyulai
3b1ca8dbac [SM05] Enable record mobile network stats by collapsed rat type am: 2632681cf0
Change-Id: If4bcfaefd2244be67449066ef54a6bdc0c00eb86
2020-03-19 09:31:00 +00:00
junyulai
b767c0b024 [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 4670baace6c8dafe3a30330596c333d6b2389e4d)
2020-03-19 10:10:07 +08:00
junyulai
678befa63c [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 c4f77ac90bf2e48a655ad19b162fe74a23bf3fb0 and
 fix merge conflict in SettingsBackupTest)
2020-03-19 10:10:07 +08:00
junyulai
2632681cf0 [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 2d4fa2c0fae8c2d79a25093d9f732a33c2f91dd4)
2020-03-19 10:10:07 +08:00
Paul Hu
7ece6bb2be Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" am: 57b993bfb5
Change-Id: I823ae84ac6f522400297d174ebfad5e61d4a6cd9
2020-03-19 01:30:58 +00:00
Paul Hu
57b993bfb5 Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" 2020-03-19 01:10:55 +00:00
Lorenzo Colitti
965434afab 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
Cody Kesting
d48978e6b6 Merge "Restrict VPN Diagnostics callbacks to underlying networks." am: 4074c2d181
Change-Id: Ia163abffdacf74218f37db9c67372867c6fe1143
2020-03-18 20:14:44 +00:00
Cody Kesting
4074c2d181 Merge "Restrict VPN Diagnostics callbacks to underlying networks." 2020-03-18 20:07:52 +00:00
Junyu Lai
8262d74f5c Merge "Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister" am: cc227f1df5
Change-Id: I93da1059a21adcf14f8c036c17963a07b1db964d
2020-03-18 08:55:01 +00:00
Junyu Lai
cc227f1df5 Merge "Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister" 2020-03-18 08:41:08 +00:00
Lorenzo Colitti
1f7c5afe8d Merge "mtu: Add MTU parameter to Routes" am: 9839a4311a
Change-Id: I3c730b35133c62db6723a58835e7f9d3874c124b
2020-03-18 07:34:11 +00:00
junyulai
80bf34b2af Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister
Test: atest ConnectivityServiceTest#testNetworkFactoryUnregister \
      --geneate-new-metrics 100
Bug: 151792032
Change-Id: Iece9e8ad5c51170cd404ac995d0005392d37fe0c
2020-03-18 15:22:54 +08:00
Lorenzo Colitti
9839a4311a Merge "mtu: Add MTU parameter to Routes" 2020-03-18 07:20:01 +00:00
Lucas Lin
58d17c3196 Merge "Add version check to prevent test fail on Android Q" am: 30faad6d0f
Change-Id: I61546d3dc488326a32386a7d6f4c87d857b29fbd
2020-03-18 04:10:21 +00:00
Lucas Lin
30faad6d0f Merge "Add version check to prevent test fail on Android Q" 2020-03-18 03:56:37 +00:00
Junyu Lai
f672bdac52 Merge "[SP25] Rename functions that add Entry conditionally" am: 52ee59fb03
Change-Id: I7e0698f0e60d4c26864ceb728b74a265351a8506
2020-03-18 03:45:41 +00:00
Junyu Lai
52ee59fb03 Merge "[SP25] Rename functions that add Entry conditionally" 2020-03-18 03:16:41 +00:00
junyulai
a896436ef2 [SP25] Rename functions that add Entry conditionally
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.

Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record conditionally,
name them addEntry.
  addValues -> addEntry

Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Fix: 148895143
Change-Id: I9495a198cf247e6c79100f7ac1edcea370b071de
Merged-In: I9495a198cf247e6c79100f7ac1edcea370b071de
(cherry picked from ag/10700816)
2020-03-18 00:29:15 +00:00
Automerger Merge Worker
5767d83c67 Merge "Update ConnectivityDiagnosticsCallback function name." am: 5596ba1619
Change-Id: I51d625ac3c086aceba9c06be7585e0e4f5022f1a
2020-03-17 19:13:39 +00:00
Cody Kesting
5596ba1619 Merge "Update ConnectivityDiagnosticsCallback function name." 2020-03-17 19:00:39 +00:00
Cody Kesting
fa1ef5eb1b Update ConnectivityDiagnosticsCallback function name.
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.

Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
Merged-In: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
2020-03-17 17:10:38 +00:00
Automerger Merge Worker
d268beb59d Merge "Shorten the output of NetworkAgentInfo#toString()." am: d498a01647
Change-Id: I73e47e19588a758fbee07ae96670b126251a9b56
2020-03-17 15:42:42 +00:00
Treehugger Robot
d498a01647 Merge "Shorten the output of NetworkAgentInfo#toString()." 2020-03-17 15:29:39 +00:00
Lorenzo Colitti
08707366d0 Shorten the output of NetworkAgentInfo#toString().
Currently, printing a NetworkAgentInfo results in a very long
string. Make it a bit shorter by:

- Not printing a number of fields in NetworkInfo that are no
  longer used.
- Instead of printing flags regardless of whether they are true
  false, only print ones that are true. For example, this changes
    everCaptivePortalDetected{true} lastCaptivePortalDetected{false} captivePortalValidationPending{false}
  to:
    everCaptivePortalDetected
- Only printing clat information if clatd is started.

Also, put the long and variable-length fields lp and nc at the
end of the output.

Test: manual
Change-Id: I3312286be307ef1762890cbc6b717f12ce5b2b92
2020-03-17 22:29:37 +09:00
Automerger Merge Worker
3507c7d8c7 Merge "Removing some of the API don't have to be @SystemApi" am: b0863e0f5b
Change-Id: I6687ba646982ea924feae7d8da6732a04184321e
2020-03-17 13:04:11 +00:00
Treehugger Robot
b0863e0f5b Merge "Removing some of the API don't have to be @SystemApi" 2020-03-17 12:51:25 +00:00
Automerger Merge Worker
d714cd3f6d Merge changes I97015365,Ic9db4b9b am: 4d08f370af
Change-Id: Ic99385f58c7a0ee246d7dfeb12eb1723fda65c4b
2020-03-17 09:54:53 +00:00
Chiachang Wang
4d08f370af Merge changes I97015365,Ic9db4b9b
* changes:
  Add NattKeepalivePacketDataTest
  Add KeepalivePacketDataTest
2020-03-17 09:38:41 +00:00
Automerger Merge Worker
98fd86ff4d Merge "services.net: Add a static library needed by wifi module" am: d7a6ba0cbb
Change-Id: I9088ccdec461145b16597d50834d231c9ea771d5
2020-03-17 09:28:23 +00:00
Automerger Merge Worker
363ea3e26c Merge "services.net: Use the new ModuleNetworkStackClient" am: c35936db0e
Change-Id: I97918b59b98a76267935680ceae19881f5f42e7b
2020-03-17 09:27:07 +00:00
Treehugger Robot
d7a6ba0cbb Merge "services.net: Add a static library needed by wifi module" 2020-03-17 09:22:12 +00:00
Remi NGUYEN VAN
c35936db0e Merge "services.net: Use the new ModuleNetworkStackClient" 2020-03-17 09:21:40 +00:00
Automerger Merge Worker
594f036a0e Merge "Move sensitive field parceling bool to constructor" am: abc08c2456
Change-Id: Ib5619a2173d838e81091415fe6323370f61c9461
2020-03-17 08:05:40 +00:00
Remi NGUYEN VAN
abc08c2456 Merge "Move sensitive field parceling bool to constructor" 2020-03-17 07:49:38 +00:00
Chiachang Wang
5b710612a2 Add NattKeepalivePacketDataTest
Add test for constructor and parcel

Test: atest CtsNetTestCasesLatestSdk:android.net.NattKeepalivePacketDataTest
      on both Q and R devices
Bug: 151402211
Change-Id: I97015365604be1846e3ecbaf60ac99e334705565
2020-03-17 15:48:02 +08:00
Chiachang Wang
c780d27eda Add KeepalivePacketDataTest
Add test for constructor of KeepalivePacketData and
InvalidPacketException

Bug: 151109466
Test: atest CtsNetTestCasesLatestSdk:android.net.KeepalivePacketDataTest
      on both Q and R devices
Change-Id: Ic9db4b9b83ff96c87f41c5f381763c3ee8dd27c8
2020-03-17 14:24:50 +08:00
Automerger Merge Worker
1ab2032d42 Merge "Ensure that NetworkFactory objects cannot be reused." am: 07c7c2aa67
Change-Id: Ifc5cac306f1558c8560f1829eea538fe9a395b26
2020-03-17 04:55:06 +00:00
Lorenzo Colitti
07c7c2aa67 Merge "Ensure that NetworkFactory objects cannot be reused." 2020-03-17 04:35:01 +00:00
Automerger Merge Worker
6d4b9d15dd Merge "Make LinkPropertiesTest backwards compatible" am: 2fad017e86
Change-Id: Iedcb704eba4a342058a7b6fdea3f1bd83dec4744
2020-03-17 02:48:05 +00:00