Commit graph

8,818 commits

Message SHA1
[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
[automerger skipped] [SP24] Rename functions that add Entry unconditionally am: 9f288e6990 -s ours
am skip reason: Change-Id I801ddc49e283a254b9586700c9b597c0adb0d459 with SHA-1 2521ad7386 is in history

Change-Id: I480e66ff5b65a1ba24ecffb288ba429c2f94219e

junyulai   authored and   Automerger Merge Worker   commited 2020-03-17 23:35:52 +00:00
08da9375a6
[automerger skipped] [SP21] Address comments for API council review about aosp/1172143 am: 2cb4c9359a -s ours
am skip reason: Change-Id I141393f229e772d2eb9f7c156849e379bd71b845 with SHA-1 f8660076c0 is in history

Change-Id: I80ab45b6a34b66f1bed766b3e2fb72926325021e

junyulai   authored and   Automerger Merge Worker   commited 2020-03-17 23:35:48 +00:00
180557c20a
[automerger skipped] Merge "Update ConnectivityDiagnosticsCallback function name." am: ff5be42146 am: a076070c56 -s ours
am skip reason: Change-Id Ieea727ecee6cf358a53a215fd4b06233dfe967ea with SHA-1 b5411218f8 is in history

Change-Id: I593e009d15d961fc44f5433cb8638aa7686d2b16

Automerger Merge Worker   commited 2020-03-17 19:28:24 +00:00
35175b3239
Merge "Update ConnectivityDiagnosticsCallback function name." am: ff5be42146
Change-Id: I51d625ac3c086aceba9c06be7585e0e4f5022f1a

Automerger Merge Worker   commited 2020-03-17 19:13:39 +00:00
a076070c56
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 "Shorten the output of NetworkAgentInfo#toString()." am: 5d089181a8 am: c2dcb2f8e5
Change-Id: I4fb9efa69133ce8f960a37cfbb73264a4bfbf97a

Automerger Merge Worker   commited 2020-03-17 15:54:48 +00:00
22e22c3b3e
[automerger skipped] Merge "Add support for registering test networks with administrators." into rvc-dev am: d95e6de42f -s ours
am skip reason: Change-Id I7a443c368cf1ac470fbe40883ca24bc3143153b0 with SHA-1 c5941bb7a3 is in history

Change-Id: I9b0525df547a8f79b739df90f39c2aad412de2c2

Automerger Merge Worker   commited 2020-03-17 15:48:50 +00:00
1ae67980c2
[automerger skipped] Merge "Protect ConnectivityService from SecurityException in permission check." into rvc-dev am: 6e0d458d63 -s ours
am skip reason: Change-Id Ibe2874f2a5249432270aa1b9eb7d004bbba35ac2 with SHA-1 5df8e985df is in history

Change-Id: If88006f48fc2f25ca989d830a37d651a75f68448

Automerger Merge Worker   commited 2020-03-17 15:48:31 +00:00
27d2d10b8b
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 "Shorten the output of NetworkAgentInfo#toString()." am: 5d089181a8
Change-Id: I73e47e19588a758fbee07ae96670b126251a9b56

Automerger Merge Worker   commited 2020-03-17 15:42:42 +00:00
c2dcb2f8e5
Merge "Add support for registering test networks with administrators." into rvc-dev
Cody Kesting   authored and   Android (Google) Code Review   commited 2020-03-17 15:31:26 +00:00
d95e6de42f
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
Merge "Shorten the output of NetworkAgentInfo#toString()."
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 15:29:39 +00:00
5d089181a8
[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
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

Lorenzo Colitti   commited 2020-03-17 22:29:37 +09:00
924fb4c08e
[automerger skipped] Merge "Removing some of the API don't have to be @SystemApi" am: c4d6a4f566 am: 86ba38a5ba -s ours
am skip reason: Change-Id Ie30efa172f93a7557fb6ef56f4daf80e958c3787 with SHA-1 e93348f00d is in history

Change-Id: I3f81a90e806947d60fb8fe4f4856491284a43ed0

Automerger Merge Worker   commited 2020-03-17 13:15:17 +00:00
8df9d88504
Merge "Removing some of the API don't have to be @SystemApi" am: c4d6a4f566
Change-Id: I6687ba646982ea924feae7d8da6732a04184321e

Automerger Merge Worker   commited 2020-03-17 13:04:11 +00:00
86ba38a5ba
Merge "Removing some of the API don't have to be @SystemApi"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 12:51:25 +00:00
c4d6a4f566
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 am: d080a4a32d
Change-Id: Ic99385f58c7a0ee246d7dfeb12eb1723fda65c4b

Automerger Merge Worker   commited 2020-03-17 09:54:53 +00:00
1c25e4ff44
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
[automerger skipped] Merge "services.net: Add a static library needed by wifi module" am: a0f5e8f3c2 am: 5cc4a63246 -s ours
am skip reason: Change-Id Ifde69b579cfe5b813766f676acb10e436e64a44c with SHA-1 7cf9cb25e3 is in history

Change-Id: Ia476746bb37fee381245f49a801bf9abb32ba04d

Automerger Merge Worker   commited 2020-03-17 09:35:52 +00:00
56ccf539c3
[automerger skipped] Merge "services.net: Use the new ModuleNetworkStackClient" am: bcd6edb9d6 am: 8ad449dff9 -s ours
am skip reason: Change-Id I065525fdbd64b9509ef0f47bb35954d267c65fd2 with SHA-1 1ce72ca363 is in history

Change-Id: I25e57f7208899f370a5131daa271dbf40ffcbe49

Automerger Merge Worker   commited 2020-03-17 09:35:40 +00:00
8d5189d6fb
Merge "services.net: Add a static library needed by wifi module" am: a0f5e8f3c2
Change-Id: I9088ccdec461145b16597d50834d231c9ea771d5

Automerger Merge Worker   commited 2020-03-17 09:28:23 +00:00
5cc4a63246
Merge "services.net: Use the new ModuleNetworkStackClient" am: bcd6edb9d6
Change-Id: I97918b59b98a76267935680ceae19881f5f42e7b

Automerger Merge Worker   commited 2020-03-17 09:27:07 +00:00
8ad449dff9
Merge "services.net: Add a static library needed by wifi module"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 09:22:12 +00:00
a0f5e8f3c2
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
[automerger skipped] Merge "Add test for NetworkAgentConfig" into rvc-dev am: b8f5f43f67 -s ours
am skip reason: Change-Id If9158d086bacb0ade94d59898ac223e4c8f4f73a with SHA-1 1feaacee76 is in history

Change-Id: I28afe6a88dc5972527f1f2949062813ca83295c6

Automerger Merge Worker   commited 2020-03-17 09:16:01 +00:00
2966ce4bee
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" am: 9e2a0cb322
Change-Id: Ib5619a2173d838e81091415fe6323370f61c9461

Automerger Merge Worker   commited 2020-03-17 08:05:40 +00:00
82280b8bb9
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
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)

Automerger Merge Worker   authored and   Cody Kesting   commited 2020-03-17 00:22:09 -07:00
539cd36a1d
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
[automerger skipped] Merge "Ensure that NetworkFactory objects cannot be reused." am: 3b2d608aa8 am: f95a726ac4 -s ours
am skip reason: Change-Id I793436ee0f4b5d778788ad34b8a2575d2ad0ed80 with SHA-1 62fd0c1ab8 is in history

Change-Id: I5672bf0133a8fa10a8d8332367d6a6fc046071e8

Automerger Merge Worker   commited 2020-03-17 05:19:06 +00:00
6111724f31
Merge "Ensure that NetworkFactory objects cannot be reused." am: 3b2d608aa8
Change-Id: Ifc5cac306f1558c8560f1829eea538fe9a395b26

Automerger Merge Worker   commited 2020-03-17 04:55:06 +00:00
f95a726ac4
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
Merge "Make LinkPropertiesTest backwards compatible" am: 167478a027
Change-Id: Iedcb704eba4a342058a7b6fdea3f1bd83dec4744

Automerger Merge Worker   commited 2020-03-17 02:48:05 +00:00
5955798254
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