Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
API review: access field by method am: 410236b92e
Change-Id: I5128f2865406e0f35fb30af102dc9957ceac29ed

Aaron Huang   authored and   Automerger Merge Worker   commited 2020-03-20 11:22:39 +00:00
3cfac75f49
Create a builder for NetworkCapabilities. am: d7d24015a5
Change-Id: I3d7a595d25b65ff4f5762c83a3dfc82c0f5ddc2d

Chalard Jean   authored and   Automerger Merge Worker   commited 2020-03-20 11:08:52 +00:00
52ce44e5b6
Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev am: 3eb3c377b8
Change-Id: I03fd96ffe141f5cf5c2448390aba5be9c28fc96a

TreeHugger Robot   authored and   Automerger Merge Worker   commited 2020-03-19 13:52:20 +00:00
678b6ddb65
Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" into rvc-dev
TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-03-19 13:40:51 +00:00
3eb3c377b8
Create a builder for NetworkCapabilities.
Bug: 151322799
Test: FrameworksWifiTests
Change-Id: I06eb97e50d5583579b3c26d1365d2dbaec8bfc99

Chalard Jean   commited 2020-03-19 21:55:57 +09:00
d7d24015a5
Merge "TetheringManager API clean up" into rvc-dev am: cca0c6192e
Change-Id: Id093ec8add4777f1d4a2c3d0890378acdc7ceaed

Mark Chien   authored and   Automerger Merge Worker   commited 2020-03-19 12:07:18 +00:00
0a28218eee
Merge "TetheringManager API clean up" into rvc-dev
Mark Chien   authored and   Android (Google) Code Review   commited 2020-03-19 12:04:05 +00:00
cca0c6192e
Merge "Make Ethernet interfaces more testable." am: cabe5e5615 am: 5b7eccf20d
Change-Id: I5a73dc5ad6576573bcac6c7ac6f1270dfbb97470

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-03-19 11:46:55 +00:00
5a82f3c4ad
Merge "Make Ethernet interfaces more testable."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-03-19 11:12:09 +00:00
cabe5e5615
Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24

markchien   commited 2020-03-19 19:10:23 +08:00
38ef330e46
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: Idd041f0fbeca411ea23e49786a50dd7feb77ef45

markchien   commited 2020-03-19 16:32:37 +08:00
4129ed1f13
Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL
CONNECTIVITY_ACTION_SUPL is marked as a "temporary hack" and has
never been public. Remove this intent definition since no one is
receiving this intent and should use network callback to know the
connection change.

Bug: 109636544
Test: atest FrameworksNetTests
Change-Id: Ie9e5127742beba04f1c191e894e8a29fe1e704bb
Merged-In: Ie9e5127742beba04f1c191e894e8a29fe1e704bb
(cherry picked from aosp/1224697)

Automerger Merge Worker   authored and   Paul Hu   commited 2020-03-19 06:53:04 +00:00
5637fa73e3
API review: access field by method
- InvalidPacketException, public field should be a method so
  add getter to get error code.
- KeepalivePacketData, public fields should be methods so
   add getter for fields.

Bug: 151322799
Test: atest FrameworksNetTests
      atest FrameworksWifiTests
      atest FrameworksTelephonyTests: some failure in CarrierAppUtilsTest
Change-Id: Id01e6135193716cc21bba11da529bf1507a954f7

Aaron Huang   commited 2020-03-19 11:38:24 +08:00
410236b92e
Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL" am: 57b993bfb5 am: 7ece6bb2be
Change-Id: Icfbcfdcfc5070bf0b4a2c0ead9e5eff1de1d1877

Paul Hu   authored and   Automerger Merge Worker   commited 2020-03-19 01:45:18 +00:00
6f41b14e04
Merge "Move sensitive field parceling bool to constructor" into rvc-dev
Remi NGUYEN VAN   authored and   Android (Google) Code Review   commited 2020-03-19 01:32:48 +00:00
5b601f5132
Merge "Kill ConnectivityManager.CONNECTIVITY_ACTION_SUPL"
Paul Hu   authored and   Gerrit Code Review   commited 2020-03-19 01:10:55 +00:00
57b993bfb5
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
9ab1503877
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

Lorenzo Colitti   commited 2020-03-19 09:46:37 +09:00
965434afab
Change NetworkCapabilities administrator UIDs to be stored as int[]. am: 46a0db809f
Change-Id: I26343fa85d936aa71dbe983341343fd1d74a7a0a

Cody Kesting   authored and   Automerger Merge Worker   commited 2020-03-18 19:56:33 +00:00
363582f051
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
5c6b1f1fd0
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
46a0db809f
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
6ccc8aa265
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
f3777c09f5
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
Merged-In: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03
(cherry picked from commit bf091021d332804e875d7fd3424340e32b896cce)

Change-Id: I98449430ca5b11f5a62ba43683663bd82650e817

Automerger Merge Worker   authored and   Remi NGUYEN VAN   commited 2020-03-18 09:00:34 +00:00
fce6aad2be
Merge "mtu: Add MTU parameter to Routes" am: 9839a4311a am: 1f7c5afe8d
Change-Id: I2164808ef628eb7c12e875f0bde7f5151bf6a5b5

Lorenzo Colitti   authored and   Automerger Merge Worker   commited 2020-03-18 07:52:25 +00:00
22974a9851
Merge "mtu: Add MTU parameter to Routes"
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2020-03-18 07:20:01 +00:00
9839a4311a
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
b05dcda675
Merge "Update ConnectivityDiagnosticsCallback function name."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-17 19:00:39 +00:00
5596ba1619
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
fa1ef5eb1b
Merge "Shorten the output of NetworkAgentInfo#toString()." am: d498a01647 am: d268beb59d
Change-Id: I4fb9efa69133ce8f960a37cfbb73264a4bfbf97a

Automerger Merge Worker   commited 2020-03-17 15:54:48 +00:00
7881eb41c5
Merge "Update ConnectivityDiagnosticsCallback function name." into rvc-dev am: ed28f2db59
Change-Id: I42c78c2626d1592bd5a0da215579f55bf04dc088

Automerger Merge Worker   commited 2020-03-17 15:48:00 +00:00
61886cc166
Merge "Shorten the output of NetworkAgentInfo#toString()."
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-17 15:29:39 +00:00
d498a01647
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
08707366d0
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
b0863e0f5b
Merge changes I97015365,Ic9db4b9b am: 4d08f370af am: d714cd3f6d
Change-Id: I058fcb4d7dac3ef384c3ccbe5a2cc880c6aed2a3

Automerger Merge Worker   commited 2020-03-17 10:16:15 +00:00
64b87e0b7c
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
4d08f370af
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
d7a6ba0cbb
Merge "Move sensitive field parceling bool to constructor" am: abc08c2456 am: 594f036a0e
Change-Id: Ice332671a4b97dad595c79c8c42ce47dca52b8e2

Automerger Merge Worker   commited 2020-03-17 08:17:51 +00:00
2172759ccc
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
5b710612a2
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
8e9e1a0374
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
22d0bfd7c4
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
8dd694d1d3
Merge "Add support for registering test networks with administrators." am: 5ec743bd25 am: 78f4f08bbf
Change-Id: Ib10e5f0e1b564a4dd8e5ae0bd4032741dcd4e2bb

Automerger Merge Worker   commited 2020-03-16 18:32:43 +00:00
013e39e33e
Merge "Add support for registering test networks with administrators."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-03-16 18:02:55 +00:00
5ec743bd25
Merge "Update Javadoc comments for ConnectivityDiagnostics constants." into rvc-dev
Cody Kesting   authored and   Android (Google) Code Review   commited 2020-03-16 15:39:43 +00:00
e80b81a7a4
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

Aaron Huang   commited 2020-03-16 17:39:41 +08:00
b782017f20
Merge "Removing some of the API don't have to be @SystemApi" into rvc-dev am: dda89138cd
Change-Id: I72f00d09e74eb0de1d837a29a2b869a4de45178d

Automerger Merge Worker   commited 2020-03-16 05:53:15 +00:00
dceed35751
Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" into rvc-dev
Paul Hu   authored and   Android (Google) Code Review   commited 2020-03-16 05:48:33 +00:00
132b843b78
Merge "Removing some of the API don't have to be @SystemApi" into rvc-dev
Aaron Huang   authored and   Android (Google) Code Review   commited 2020-03-16 05:47:34 +00:00
dda89138cd
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

Roshan Pius   commited 2020-03-16 00:23:42 +00:00
fae5822946