Commit graph android_packages_modules_Co.../tests/net
Message SHA1
Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" am: 8afd953975 am: 5401b69c64
Change-Id: Icfbcfdcfc5070bf0b4a2c0ead9e5eff1de1d1877

Paul Hu   authored and   Automerger Merge Worker   commited 2020-03-19 01:45:18 +00:00
18f3326b4b
Merge changes from topic "netstack_api_review" into rvc-dev am: 799e84ed01
Change-Id: Iddd40677121e331eb50b74aa379dabaf4632219d

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2020-03-19 01:30:57 +00:00
c83000d3c2
Merge changes from topic "netstack_api_review" into rvc-dev
* changes:
  Remove usage of Context.NETWORK_STACK_SERVICE
  Remove NETWORK_STACK_SERVICE constant

Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-03-19 01:21:29 +00:00
799e84ed01
Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL"
Paul Hu   authored and   Gerrit Code Review   commited 2020-03-19 01:10:55 +00:00
8afd953975
Merge "mtu: Add MTU parameter to Routes" into rvc-dev
Lorenzo Colitti   authored and   Android (Google) Code Review   commited 2020-03-19 00:50:57 +00:00
27247d1f5d
Merge "Restrict VPN Diagnostics callbacks to underlying networks." am: 034480fb36 am: 0d3efcb097
Change-Id: Iae4aa40b2232171f241d99a81ec84cbbac1fd64d

Cody Kesting   authored and   Automerger Merge Worker   commited 2020-03-18 20:26:46 +00:00
63d73e70be
Merge "Restrict VPN Diagnostics callbacks to underlying networks."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-18 20:07:52 +00:00
034480fb36
Change NetworkCapabilities administrator UIDs to be stored as int[]. am: 1043927267
Change-Id: I26343fa85d936aa71dbe983341343fd1d74a7a0a

Cody Kesting   authored and   Automerger Merge Worker   commited 2020-03-18 19:56:33 +00:00
a5195fd1cb
Merge "Change NetworkCapabilities administrator UIDs to be stored as int[]." into rvc-dev
Cody Kesting   authored and   Android (Google) Code Review   commited 2020-03-18 19:40:39 +00:00
cb9847691f
Change NetworkCapabilities administrator UIDs to be stored as int[].
NetworkCapabilities#mAdministratorUids is used to track the UIDs that
are administrators of the given Network. This value was previously
stored as List<Integer>. However, general Android API Council guidelines
recommend using Arrays for primitive values. In order to be consistent
with the guidelines, updating the field to use an Array.

Bug: 147903575
Test: atest FrameworksNetTests
Change-Id: I2652a5b0f276b8944454af5cb4b1383a3e054cfa

Cody Kesting   commited 2020-03-18 17:40:24 +00:00
1043927267
Merge "Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-03-18 11:49:09 +00:00
1d204ac218
mtu: Add MTU parameter to Routes
- Change route to update existing route
- MTU parameter added to AddRoute

Bug: 142892223
Test: unit test
Change-Id: I2164808ef628eb7c12e875f0bde7f5151bf6a5b5
Merged-In: Ie339d0cee5be12c2232a4631fed61219a0facc64
(cherry picked from commit e521f07e8b03102f1b510a3fb401993513d9c127)

Lorenzo Colitti   commited 2020-03-18 11:18:37 +00:00
7d505a6436
Merge changes I97015365,Ic9db4b9b into rvc-dev
* changes:
  Add NattKeepalivePacketDataTest
  Add KeepalivePacketDataTest

Chiachang Wang   authored and   Android (Google) Code Review   commited 2020-03-18 10:15:15 +00:00
13097923fa
Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister
Test: atest ConnectivityServiceTest#testNetworkFactoryUnregister \
      --geneate-new-metrics 100
Bug: 151792032

Change-Id: I1ee7a26186885d3a79a32ec9e45f5bcd656a6680
Merged-In: I1ee7a26186885d3a79a32ec9e45f5bcd656a6680
Merged-In: Iece9e8ad5c51170cd404ac995d0005392d37fe0c
(cherry picked from commit 31c26cdbeb35a6fd6a53a1c25cce6d36b825bf41)

Junyu Lai   commited 2020-03-18 10:09:44 +00:00
6d4e01e422
Remove usage of Context.NETWORK_STACK_SERVICE
The NetworkStack.getService() API should be used instead.

Bug: 151243982
Test: atest FrameworksNetTests TetheringTests
      Manual tethering test
Change-Id: I7855090bffbe895c8349ad4903b8f2eb55515f0b

Remi NGUYEN VAN   commited 2020-03-18 18:31:39 +09:00
ccea0bb385
Merge "Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister" am: e9e871ef83 am: ef43214f03
Change-Id: I941bdbd6877dbf5e269ee4e49fd3947681025961

Junyu Lai   authored and   Automerger Merge Worker   commited 2020-03-18 09:02:12 +00:00
0851670d30
Merge "mtu: Add MTU parameter to Routes" am: b76fc089d7 am: aa3afd9d64
Change-Id: I2164808ef628eb7c12e875f0bde7f5151bf6a5b5

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-03-18 07:52:25 +00:00
b7dbb0b230
Fix flaky ConnectivityServiceTest#testNetworkFactoryUnregister
Test: atest ConnectivityServiceTest#testNetworkFactoryUnregister \
      --geneate-new-metrics 100
Bug: 151792032
Change-Id: Iece9e8ad5c51170cd404ac995d0005392d37fe0c

junyulai   commited 2020-03-18 15:22:54 +08:00
7bd2a24dab
Merge "mtu: Add MTU parameter to Routes"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-03-18 07:20:01 +00:00
b76fc089d7
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
Merged-In: I97015365604be1846e3ecbaf60ac99e334705565

Chiachang Wang   commited 2020-03-18 05:44:26 +00:00
30a0107d13
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
Merged-In: Ic9db4b9b83ff96c87f41c5f381763c3ee8dd27c8

Chiachang Wang   commited 2020-03-18 05:43:42 +00:00
62de8657e2
Merge "Add version check to prevent test fail on Android Q" am: 96da9cf154 am: ed930bec98
Change-Id: I1985c4cfe6ff1712f2d181a151bfee0160fc96bf

Lucas Lin   authored and   Automerger Merge Worker   commited 2020-03-18 04:23:00 +00:00
ad691b3e04
Merge "Add version check to prevent test fail on Android Q"
Lucas Lin   authored and   Gerrit Code Review   commited 2020-03-18 03:56:37 +00:00
96da9cf154
Merge "[SP25] Rename functions that add Entry conditionally"
Junyu Lai   authored and   Gerrit Code Review   commited 2020-03-18 03:16:41 +00:00
6fa3bc3460
[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)

junyulai   authored and   Junyu Lai   commited 2020-03-18 00:29:15 +00:00
175c770f1c
[SP25] Rename functions that add Entry conditionally am: 5d89df732b
Change-Id: I5f9924cf5b3eccfcdaa6dda991a102b97cebd11a

junyulai   authored and   Automerger Merge Worker   commited 2020-03-17 23:35:57 +00:00
0dbffa4ad5
Merge changes from topics "am-ad04c8ad832c4674be35bfc5fe4280dd-rvc-dev", "sp21-api-review-feedback", "sp25-networkstats-rename" into rvc-dev
* changes:
  [SP25] Rename functions that add Entry conditionally
  [SP24] Rename functions that add Entry unconditionally
  [SP23] Address misc API review comment about NetworkStats
  [SP21] Address comments for API council review about aosp/1172143
  [SP20] Check signature permission when accessing network stats provider

Junyu Lai   authored and   Android (Google) Code Review   commited 2020-03-17 23:11:34 +00:00
3e09da5d5d
Merge "Update ConnectivityDiagnosticsCallback function name."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-17 19:00:39 +00:00
ff5be42146
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

Cody Kesting   commited 2020-03-17 17:10:38 +00:00
e4d2df5726
Merge "Update ConnectivityDiagnosticsCallback function name." into rvc-dev am: b0dc78e311
Change-Id: I42c78c2626d1592bd5a0da215579f55bf04dc088

Automerger Merge Worker   commited 2020-03-17 15:48:00 +00:00
ba4aecf53c
Merge "Protect ConnectivityService from SecurityException in permission check." into rvc-dev
Cody Kesting   authored and   Android (Google) Code Review   commited 2020-03-17 15:31:06 +00:00
6e0d458d63
Merge "Update ConnectivityDiagnosticsCallback function name." into rvc-dev
Cody Kesting   authored and   Android (Google) Code Review   commited 2020-03-17 15:29:55 +00:00
b0dc78e311
[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

junyulai   authored and   Junyu Lai   commited 2020-03-17 14:59:59 +00:00
5d89df732b
[SP24] Rename functions that add Entry unconditionally
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 unconditionally,
name them insertEntry.
  setIfaceValues -> insertEntry
  addEntry -> insertEntry

Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: I801ddc49e283a254b9586700c9b597c0adb0d459
Merged-In: I801ddc49e283a254b9586700c9b597c0adb0d459
(cherry picked from aosp/1256352)

junyulai   authored and   Junyu Lai   commited 2020-03-17 14:59:31 +00:00
9f288e6990
[SP21] Address comments for API council review about aosp/1172143
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest
Test: atest TetheringTests NetworkStackTests
Test: m doc-comment-check-docs
Fix: 148552904

Change-Id: I141393f229e772d2eb9f7c156849e379bd71b845
Merged-In: I141393f229e772d2eb9f7c156849e379bd71b845
(cherry picked from aosp/1253717)

junyulai   authored and   Junyu Lai   commited 2020-03-17 14:57:59 +00:00
2cb4c9359a
Merge changes I97015365,Ic9db4b9b am: d080a4a32d am: 1c25e4ff44
Change-Id: I058fcb4d7dac3ef384c3ccbe5a2cc880c6aed2a3

Automerger Merge Worker   commited 2020-03-17 10:16:15 +00:00
ba33556f86
Merge changes I97015365,Ic9db4b9b
* changes:
  Add NattKeepalivePacketDataTest
  Add KeepalivePacketDataTest

Chiachang Wang   authored and   Gerrit Code Review   commited 2020-03-17 09:38:41 +00:00
d080a4a32d
Merge "services.net: Use the new ModuleNetworkStackClient"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-03-17 09:21:40 +00:00
bcd6edb9d6
Merge "Add test for NetworkAgentConfig" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-03-17 09:00:38 +00:00
b8f5f43f67
Add test for NetworkAgentConfig
Bug: 139268426
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkAgentConfigTest
Change-Id: If9158d086bacb0ade94d59898ac223e4c8f4f73a
Merged-In: If9158d086bacb0ade94d59898ac223e4c8f4f73a
(cherry picked from aosp/1253722)

Automerger Merge Worker   authored and   Aaron Huang   commited 2020-03-17 08:44:38 +00:00
a97418446e
Merge "Move sensitive field parceling bool to constructor" am: 9e2a0cb322 am: 82280b8bb9
Change-Id: Ice332671a4b97dad595c79c8c42ce47dca52b8e2

Automerger Merge Worker   commited 2020-03-17 08:17:51 +00:00
91a66f29ac
Merge "Move sensitive field parceling bool to constructor"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-03-17 07:49:38 +00:00
9e2a0cb322
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

Chiachang Wang   commited 2020-03-17 15:48:02 +08:00
fd007f01ef
Protect ConnectivityService from SecurityException in permission check.
ConnectivityService currently calls
LocationPermissionChecker#checkLocationPermission. This method call
throws a SecurityException if the given package name and UID do not
match. This permission check is made from the ConnectivityService
Thread, so any Exception being thrown will crash the SystemServer. This
is not acceptable, so surround the permission check in a try-catch in
case any SecurityExceptions are thrown.

Bug: 149119324
Test: atest ConnectivityServiceTest
Change-Id: Ibe2874f2a5249432270aa1b9eb7d004bbba35ac2
Merged-In: Ibe2874f2a5249432270aa1b9eb7d004bbba35ac2
(cherry picked from commit 9eacc855b63b36f5b937e703b20d4b0bb077ab75)

Automerger Merge Worker   authored and   Cody Kesting   commited 2020-03-17 00:21:50 -07:00
30762e1e07
Update ConnectivityDiagnosticsCallback function name.
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.

Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
(cherry picked from commit 324b224cc48fcb12125bd1727be70ad2effbfce3)

Cody Kesting   commited 2020-03-17 00:16:58 -07:00
b5411218f8
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

Chiachang Wang   commited 2020-03-17 14:24:50 +08:00
13c97ebd73
Merge "Ensure that NetworkFactory objects cannot be reused."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-03-17 04:35:01 +00:00
3b2d608aa8
Merge "Make LinkPropertiesTest backwards compatible" am: 167478a027 am: 5955798254
Change-Id: Ie1db141b72770490632c3974b904ee9b1438922e

Automerger Merge Worker   commited 2020-03-17 03:05:25 +00:00
40524fdcc6
Move sensitive field parceling bool to constructor
This addresses API review comments recommending to use a copy
constructor with additional parameters instead of a dedicated method.
makeSensitiveFieldsParcelingCopy becomes LinkProperties(base, true).

Bug: 150877475
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Change-Id: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03

Remi NGUYEN VAN   commited 2020-03-17 11:42:33 +09:00
c38954692a
Merge "Make LinkPropertiesTest backwards compatible"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2020-03-17 02:27:27 +00:00
167478a027