Commit Graph

8082 Commits

Author SHA1 Message Date
Lorenzo Colitti
1f7c5afe8d Merge "mtu: Add MTU parameter to Routes" am: 9839a4311a
Change-Id: I3c730b35133c62db6723a58835e7f9d3874c124b
2020-03-18 07:34:11 +00: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
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
Remi NGUYEN VAN
3994e73b75 Make LinkPropertiesTest backwards compatible
LinkPropertiesTest must be backwards compatible with Q for CTS.

In Q 4 fields were added: DhcpServerAddress, WakeOnLanSupported,
CaptivePortalApiUrl, CaptivePortalData. The new test only tests these
fields on R and above.
testLinkPropertiesParcelable_Q still verifies that there are 14 fields
on Q, so the 4 extra fields can be ignored.

The changes use androidx.core.os.BuildCompat.isAtLeastR(), so
androidx.core_core is added as a dependency to FrameworksNetCommonTests.

Test: atest CtsNetTestCasesLatestSdk:android.net.LinkPropertiesTest
        on Q and R devices
Bug: 150918852
Change-Id: I570efa4eb483a717d4204a18473d02653a69f46d
2020-03-17 11:23:13 +09:00
Automerger Merge Worker
fb08471764 Merge "Clean up unit testing for ConnectivityDiagnostics." am: 3fef3af249
Change-Id: Idb4019968a3b3689f1aaddb5e59f3c609890104e
2020-03-16 19:52:06 +00:00
Cody Kesting
3fef3af249 Merge "Clean up unit testing for ConnectivityDiagnostics." 2020-03-16 19:33:33 +00:00
Automerger Merge Worker
78f4f08bbf Merge "Add support for registering test networks with administrators." am: 5ec743bd25
Change-Id: Ic6251b26fbbce029063d3f83c4fa6dbc4d01df40
2020-03-16 18:18:59 +00:00
Cody Kesting
5ec743bd25 Merge "Add support for registering test networks with administrators." 2020-03-16 18:02:55 +00:00
Automerger Merge Worker
ad7408a4e6 Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" am: b303fc5222
Change-Id: Ibcfc11f90c8caa34954db73f668ca35a34c50e8d
2020-03-16 17:27:39 +00:00
Cody Kesting
b303fc5222 Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-03-16 17:11:54 +00:00
Lorenzo Colitti
2c74e66034 Ensure that NetworkFactory objects cannot be reused.
NetworkFactory is turning into a one-time object that cannot be
re-used. Check for this in ConnectivityService.

Bug: 148635501
Test: test continues to pass
Change-Id: I793436ee0f4b5d778788ad34b8a2575d2ad0ed80
Merged-In: I793436ee0f4b5d778788ad34b8a2575d2ad0ed80
2020-03-17 01:39:23 +09:00
Automerger Merge Worker
26cb0b40bf Merge "Protect ConnectivityService from SecurityException in permission check." am: ed459f5f1a
Change-Id: I30d993e431b9d6486dcaebdc48c525a861301f70
2020-03-16 14:47:49 +00:00
Cody Kesting
ed459f5f1a Merge "Protect ConnectivityService from SecurityException in permission check." 2020-03-16 14:33:25 +00:00
Automerger Merge Worker
dc9aa00cb7 Merge changes I801ddc49,Id1b8f41b am: ba350f4652
Change-Id: I604bcfab22d7b26b84bf126d02d9be612fcb6d29
2020-03-16 11:41:19 +00:00
Aaron Huang
b782017f20 Removing some of the API don't have to be @SystemApi
Some of the API we made @SystemApi won't be used by mainline
module. Removing these from the surface.

Bug: 151266974
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      atest FrameworksWifiTests

Change-Id: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
Merged-In: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
2020-03-16 17:39:41 +08:00
junyulai
cc38304ad8 [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
2020-03-16 14:27:45 +08:00
Automerger Merge Worker
c01d9f8266 Merge "[SP21] Address comments for API council review about aosp/1172143" am: 24ab7411ba
Change-Id: Ief866c87b9e69b892fca435e8555080ffdad4af7
2020-03-16 03:05:06 +00:00
Automerger Merge Worker
1b7fe1b6f7 [SP21] Address comments for API council review about aosp/1172143 am: 0c88795cb5
Change-Id: I8634d6f6ed65ec6b10009a90b147881fe1fc4530
2020-03-16 03:03:51 +00:00
Junyu Lai
24ab7411ba Merge "[SP21] Address comments for API council review about aosp/1172143" 2020-03-16 02:41:19 +00:00
Roshan Pius
fae5822946 services.net: Add a static library needed by wifi module
Add a new static library that compiles against system_current which
includes all the parts needed by the wifi mainline module.

Also,
a) Refactored TcpKeepalivePacketData to use public APIs. The parcel
read/write methods in the base class are @hide and they're not used by
the other child class (NatKeepalivePacketData). So, remove the @hide
method from base class and use it direcly in the child class.

Bug: 145825329
Test: Device boots up & connects to wifi networks.
Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c
Merged-In: Ifde69b579cfe5b813766f676acb10e436e64a44c
2020-03-16 00:23:42 +00:00
Automerger Merge Worker
79a0b0096d Merge "Resolve ambiguous argument." am: 16cad96e9f
Change-Id: I4c03bb6d16127929f4d60aa071aee18e8ac4c669
2020-03-14 03:52:51 +00:00
Chalard Jean
16cad96e9f Merge "Resolve ambiguous argument." 2020-03-14 03:38:01 +00:00
Automerger Merge Worker
438f8bbe71 Merge "Update Javadoc comments for ConnectivityDiagnostics constants." am: 0b6dd36a52
Change-Id: I279519ca5013c4109dee9f6860852d9b3a70776a
2020-03-13 19:34:01 +00:00