Commit Graph

8818 Commits

Author SHA1 Message Date
junyulai
df950d3cff [SP25] Rename functions that add Entry conditionally am: 8dd5ea04d6
Change-Id: I5f9924cf5b3eccfcdaa6dda991a102b97cebd11a
2020-03-17 23:35:57 +00:00
junyulai
1caeffedc2 [automerger skipped] [SP24] Rename functions that add Entry unconditionally am: 11ad688fc7 -s ours
am skip reason: Change-Id I801ddc49e283a254b9586700c9b597c0adb0d459 with SHA-1 cc38304ad8 is in history

Change-Id: I480e66ff5b65a1ba24ecffb288ba429c2f94219e
2020-03-17 23:35:52 +00:00
junyulai
638e832405 [automerger skipped] [SP21] Address comments for API council review about aosp/1172143 am: 268e185cae -s ours
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 0c88795cb5 is in history

Change-Id: I80ab45b6a34b66f1bed766b3e2fb72926325021e
2020-03-17 23:35:48 +00:00
Automerger Merge Worker
7b15f5a1dc [automerger skipped] Merge "Update ConnectivityDiagnosticsCallback function name." am: 5596ba1619 am: 5767d83c67 -s ours
am skip reason: Change-Id Ieea727ecee6cf358a53a215fd4b06233dfe967ea with SHA-1 22d0bfd7c4 is in history

Change-Id: I593e009d15d961fc44f5433cb8638aa7686d2b16
2020-03-17 19:28:24 +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
7881eb41c5 Merge "Shorten the output of NetworkAgentInfo#toString()." am: d498a01647 am: d268beb59d
Change-Id: I4fb9efa69133ce8f960a37cfbb73264a4bfbf97a
2020-03-17 15:54:48 +00:00
Automerger Merge Worker
85053d5834 [automerger skipped] Merge "Add support for registering test networks with administrators." into rvc-dev am: 13e16c007f -s ours
am skip reason: Change-Id I7a443c368cf1ac470fbe40883ca24bc3143153b0 with SHA-1 a84aee7ad3 is in history

Change-Id: I9b0525df547a8f79b739df90f39c2aad412de2c2
2020-03-17 15:48:50 +00:00
Automerger Merge Worker
9d6b9c91cf [automerger skipped] Merge "Protect ConnectivityService from SecurityException in permission check." into rvc-dev am: e2f56e3d36 -s ours
am skip reason: Change-Id Ibe2874f2a5249432270aa1b9eb7d004bbba35ac2 with SHA-1 a830439b37 is in history

Change-Id: If88006f48fc2f25ca989d830a37d651a75f68448
2020-03-17 15:48:31 +00:00
Automerger Merge Worker
61886cc166 Merge "Update ConnectivityDiagnosticsCallback function name." into rvc-dev am: ed28f2db59
Change-Id: I42c78c2626d1592bd5a0da215579f55bf04dc088
2020-03-17 15:48:00 +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
Cody Kesting
13e16c007f Merge "Add support for registering test networks with administrators." into rvc-dev 2020-03-17 15:31:26 +00:00
Cody Kesting
e2f56e3d36 Merge "Protect ConnectivityService from SecurityException in permission check." into rvc-dev 2020-03-17 15:31:06 +00:00
Cody Kesting
ed28f2db59 Merge "Update ConnectivityDiagnosticsCallback function name." into rvc-dev 2020-03-17 15:29:55 +00:00
Treehugger Robot
d498a01647 Merge "Shorten the output of NetworkAgentInfo#toString()." 2020-03-17 15:29:39 +00:00
junyulai
8dd5ea04d6 [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
2020-03-17 14:59:59 +00:00
junyulai
11ad688fc7 [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)
2020-03-17 14:59:31 +00:00
junyulai
268e185cae [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)
2020-03-17 14:57:59 +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
98d390c72e [automerger skipped] Merge "Removing some of the API don't have to be @SystemApi" am: b0863e0f5b am: 3507c7d8c7 -s ours
am skip reason: Change-Id Ie30efa172f93a7557fb6ef56f4daf80e958c3787 with SHA-1 d884e63e61 is in history

Change-Id: I3f81a90e806947d60fb8fe4f4856491284a43ed0
2020-03-17 13:15:17 +00: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
64b87e0b7c Merge changes I97015365,Ic9db4b9b am: 4d08f370af am: d714cd3f6d
Change-Id: I058fcb4d7dac3ef384c3ccbe5a2cc880c6aed2a3
2020-03-17 10:16:15 +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
e9091054b9 [automerger skipped] Merge "services.net: Add a static library needed by wifi module" am: d7a6ba0cbb am: 98fd86ff4d -s ours
am skip reason: Change-Id Ifde69b579cfe5b813766f676acb10e436e64a44c with SHA-1 1378facba4 is in history

Change-Id: Ia476746bb37fee381245f49a801bf9abb32ba04d
2020-03-17 09:35:52 +00:00
Automerger Merge Worker
247c45e31a [automerger skipped] Merge "services.net: Use the new ModuleNetworkStackClient" am: c35936db0e am: 363ea3e26c -s ours
am skip reason: Change-Id I065525fdbd64b9509ef0f47bb35954d267c65fd2 with SHA-1 58d144f6ed is in history

Change-Id: I25e57f7208899f370a5131daa271dbf40ffcbe49
2020-03-17 09:35:40 +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
f643d0cae0 [automerger skipped] Merge "Add test for NetworkAgentConfig" into rvc-dev am: 6bf269b1b5 -s ours
am skip reason: Change-Id If9158d086bacb0ade94d59898ac223e4c8f4f73a with SHA-1 97ae1a81fa is in history

Change-Id: I28afe6a88dc5972527f1f2949062813ca83295c6
2020-03-17 09:16:01 +00:00
TreeHugger Robot
6bf269b1b5 Merge "Add test for NetworkAgentConfig" into rvc-dev 2020-03-17 09:00:38 +00:00
Automerger Merge Worker
da59e2d258 Add test for NetworkAgentConfig
Bug: 139268426
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkAgentConfigTest
Change-Id: If9158d086bacb0ade94d59898ac223e4c8f4f73a
Merged-In: If9158d086bacb0ade94d59898ac223e4c8f4f73a
(cherry picked from aosp/1253722)
2020-03-17 08:44:38 +00:00
Automerger Merge Worker
2172759ccc Merge "Move sensitive field parceling bool to constructor" am: abc08c2456 am: 594f036a0e
Change-Id: Ice332671a4b97dad595c79c8c42ce47dca52b8e2
2020-03-17 08:17:51 +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
Automerger Merge Worker
8e9e1a0374 Add support for registering test networks with administrators.
CTS testing for ConnectivityDiagnosticsManager requires registering
TestNetworks with the administrator UIDs set. This sets up the CTS
process to be an administrator over the test network, which allows it to
receive ConnectivityDiagnosticsCallback callbacks.

Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Test: atest IpSecManagerTunnelTest
Change-Id: I7a443c368cf1ac470fbe40883ca24bc3143153b0
Merged-In: I7a443c368cf1ac470fbe40883ca24bc3143153b0
(cherry picked from commit 7b105b6194679fad6afe3615f0654b547034be6c)
2020-03-17 00:22:09 -07:00
Automerger Merge Worker
1c7f159f44 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)
2020-03-17 00:21:50 -07:00
Cody Kesting
22d0bfd7c4 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)
2020-03-17 00:16:58 -07: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
7b468810d9 [automerger skipped] Merge "Ensure that NetworkFactory objects cannot be reused." am: 07c7c2aa67 am: 1ab2032d42 -s ours
am skip reason: Change-Id I793436ee0f4b5d778788ad34b8a2575d2ad0ed80 with SHA-1 487b677f3a is in history

Change-Id: I5672bf0133a8fa10a8d8332367d6a6fc046071e8
2020-03-17 05:19:06 +00: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
9dbc3a6536 Merge "Make LinkPropertiesTest backwards compatible" am: 2fad017e86 am: 6d4b9d15dd
Change-Id: Ie1db141b72770490632c3974b904ee9b1438922e
2020-03-17 03:05:25 +00:00
Automerger Merge Worker
6d4b9d15dd Merge "Make LinkPropertiesTest backwards compatible" am: 2fad017e86
Change-Id: Iedcb704eba4a342058a7b6fdea3f1bd83dec4744
2020-03-17 02:48:05 +00:00
Remi NGUYEN VAN
8dd694d1d3 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
2020-03-17 11:42:33 +09:00
Remi NGUYEN VAN
2fad017e86 Merge "Make LinkPropertiesTest backwards compatible" 2020-03-17 02:27:27 +00:00