Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
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
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 "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
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
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
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
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
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
Merge "Add javadoc for Network#netId" into rvc-dev
Mark Chien   authored and   Android (Google) Code Review   commited 2020-03-15 02:53:29 +00:00
962ea56bd0
Update Javadoc comments for ConnectivityDiagnostics constants.
API Council feedback requested adding documentation for detection method
constants used in DataStallReport to indicate how the Data Stall was
detected.

Bug: 150598997
Test: n/a
Change-Id: Ib08f05562dd4b17973eeee97452d9f56d37e80fe
Merged-In: Ib08f05562dd4b17973eeee97452d9f56d37e80fe
(cherry picked from commit 52d9e61121883945931de533b5cfd44da30c0248)

Automerger Merge Worker   authored and   Cody Kesting   commited 2020-03-13 21:00:31 +00:00
025f73910a
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.
b) Add jar-jar rules for all the statically linked dependencies in wifi
service jar rules.

Exempt-From-Owner-Approval: Minor change on top of owner's approval.
Bug: 145825329
Test: Device boots up & connects to wifi networks.
Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c

Roshan Pius   commited 2020-03-13 14:42:09 +00:00
1378facba4
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

Aaron Huang   commited 2020-03-13 15:08:05 +08:00
d884e63e61
Add javadoc for Network#netId
Bug: 151156820
Test: m doc-comment-check-docs

Change-Id: I18e6022c7b0b8bf132069f33d916d1b16d53d4f0
Merged-In: Iea34a5c58a8b77c83258a39a8a44601e21a482f5
(cherry picked from commit ab23c0fef8c02a9d63b1b48628eb687f589aac72)

Automerger Merge Worker   authored and   Mark Chien   commited 2020-03-13 02:31:30 +00:00
7b4eada7c2
Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider
Registering/Unregistering network provider needs NETWORK_FACTORY
which is signature only permission. But mainline modules can't
grant this permission because it's not signed with platform key.
Hence, these APIs should also accept MAINLINE_NETWORK_STACK
permission that allow mainline module to register/unregister
network provider.

Bug: 150733435
Test: atest FrameworksNetTests
Change-Id: Id22113aa0db01244817b4b008f5573c5e7b317f0
Merged-In: Id22113aa0db01244817b4b008f5573c5e7b317f0
(cherry picked from aosp/1248727)

Automerger Merge Worker   authored and   Paul Hu   commited 2020-03-10 09:38:50 +00:00
6617c9be42
Remove polling of TetheringManager in ConnectivityManager.
Test: manual

Bug: 144742179
Merged-In: I7d88b38eb3d741534e980b7d1e226a411b71fae2
(cherry picked from commit f8a55a19faa938b4e58310f9a90926276b7936ea)

Change-Id: I5cc4231bfb9a0709d677acbb317ee98af31bd041

Automerger Merge Worker   authored and   Remi NGUYEN VAN   commited 2020-03-09 06:29:22 +00:00
de03bda1c3
Remove the NetworkScore class.
This class is useless at this point and introduces overhead.

Bug: 113554781
Test: FrameworksNetTests
Change-Id: Ib5f540070222865260c16c7182cc13c710a243c2
Merged-In: Ib5f540070222865260c16c7182cc13c710a243c2
(cherry picked from commit c3489ad3a6ce98218ce223cea877586781025b98)

Automerger Merge Worker   authored and   Chalard Jean   commited 2020-03-09 03:46:34 +00:00
76eead56aa
Revert "Add public fields to NetworkScore and make it @SystemApi"
This reverts commit 511f7e3792.

Bug: 113554781
Test: FrameworksNetTests FrameworksTelephonyTests FrameworksWifiTests
Change-Id: Ie1e84bd2a16f088307b195f924f4e49335cbe367

Chalard Jean   commited 2020-02-28 06:26:27 +00:00
fdb872c4ed
Merge changes Ia91b3b3c,Id9ecdac5,I4b17d1b1
* changes:
  Revert "[NS D01] Remove candidates that don't satisfy the request."
  Revert "[NS D02] Mix in the ignore on wifi policy."
  Revert "Address comments on ag/10316753"

Chalard Jean   authored and   Android (Google) Code Review   commited 2020-02-21 11:06:55 +00:00
4c2f233f6b
Revert "[NS D02] Mix in the ignore on wifi policy."
This reverts commit 7a56387e2c.

Reason for revert: The feature was punted out of R.

Change-Id: Id9ecdac5292eeddf7c12f2330421248b0f8355a9

Chalard Jean   commited 2020-02-21 09:28:18 +00:00
1d9a206bca
Merge changes from topic "revert-10338939-YCRBMILGZV"
* changes:
  Revert "[NS D03] Migrate the bad wifi avoidance policy"
  Revert "[NS D04] Implement a simple speed comparison between scores."

TreeHugger Robot   authored and   Android (Google) Code Review   commited 2020-02-21 08:51:09 +00:00
7bcd12e7d2
Revert "[NS D04] Implement a simple speed comparison between scores."
Revert submission 10338939

Reason for revert: The feature was punted out of R.
Reverted Changes:
I32c12702c:[NS D04] Implement a simple speed comparison betwe...
I688593cc0:[NS D03] Migrate the bad wifi avoidance policy

Change-Id: I28172721d3f3af82ac79ef2c8f61df39943d997b

Chalard Jean   commited 2020-02-21 06:46:06 +00:00
6f677ac620
Merge "Sanitize owner UID iff owning app does not have location permissions." am: 4d95254cb3 am: aba23b3f43 am: a06f220d24
Change-Id: I9b8fb3ff8d907ecda918a8a926edb133b742c8f1

Automerger Merge Worker   commited 2020-02-20 05:59:35 +00:00
589d8b524e
Merge "Sanitize owner UID iff owning app does not have location permissions." am: 4d95254cb3
Change-Id: Ie5876d063d7440aacc57d48cb4573798303910ea

Automerger Merge Worker   commited 2020-02-20 05:30:20 +00:00
aba23b3f43
Merge "Sanitize owner UID iff owning app does not have location permissions."
Qingxi Li   authored and   Gerrit Code Review   commited 2020-02-20 05:20:27 +00:00
4d95254cb3
Sanitize owner UID iff owning app does not have location permissions.
This change adds permission checking to ensure that the following
conditions are enforced in order for apps to receive the owner UID:
1. The app must be the owner of the network
2. The app must hold the FINE_LOCATION permission/appop
3. The user must have their location toggle enabled.

Bug: 142072839
Test: atest FrameworksNetTests
Change-Id: I7a981a82f1219828ee89c8c96eb9d2efd153377f

Qingxi Li   commited 2020-02-20 01:02:42 +00:00
b274810c34
DO NOT MERGE: RELAND: NetworkRequest: Embed requestor uid & packageName
Add the requestorUid & requestorPackageName fields to
NetworkCapabilities. This is populated by CS when
a new network request is received.
These 2 requestor fields are also optionally used for network
matching. All of the regular app initiated requests will have the
requestor uid and package name set by connectivity service. Network
agents can optionally set the requestorUid and requestorPackageName
to restrict the network created only to the app that requested the network.

This will help removing the necessity for the various specifiers to embed
the uid & package name info in the specifier for network matching.

Note: NetworkSpecifier.assertValidFromUid() is deprecated & removed in
favor of setting the uid/package name on the agent to restrict the
network to a certain app (useful for wifi peer to peer API & wifi aware).

Bug: 144102365
Test: Verified that wifi network request related CTS verifier tests
pass.
Test: Device boots up and connects to wifi networks
Merged-In: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529

Change-Id: I58775e82aa7725aac5aa27ca9d2b5ee8f0be4242

Roshan Pius   authored and   Benedict Wong   commited 2020-02-19 23:12:32 +00:00
bc7e37d0f4
Merge "Use framework-tethering-stub instead of framework-tethering" am: 7fa9971ec6
Change-Id: I2caaa5f804a510bcc18822b784c129e9b058ea03

Automerger Merge Worker   commited 2020-02-19 09:54:51 +00:00
e67473517a
Use framework-tethering-stub instead of framework-tethering
The non-updatable part of the platform now is built with
framework-tethering-stub, which is a stub library of
framework-tethering.

Bug: 147200698
Test: m
Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050
Merged-In: I97ef83f7f9b4c1376f373713036f5256318f1050

markchien   commited 2020-02-19 15:10:44 +08:00
2e6ba526c9
Merge changes I32c12702,I688593cc
* changes:
  [NS D04] Implement a simple speed comparison between scores.
  [NS D03] Migrate the bad wifi avoidance policy

Chalard Jean   authored and   Android (Google) Code Review   commited 2020-02-18 10:51:26 +00:00
333ca0ceec
[NS D04] Implement a simple speed comparison between scores.
This is not used yet to avoid making the change too big to review,
but D05 will use this. Refer to D05 for how this is going to be
used.

Test: ConnectivityServiceTest
Change-Id: I32c12702c8bce959682b02f157946d3f37b12a0c

Chalard Jean   commited 2020-02-18 16:15:22 +09:00
1355c8b255
Merge changes Ide9daebc,Id47ada57 am: d07db8a8da am: 3dbd79190c am: 6ed815786c
Change-Id: Iaacfbe8b221d79e3d06d0d7ea81528db13e4611a

Benedict Wong   commited 2020-02-18 06:35:06 +00:00
ea18b70ca6
Merge "[NS D02] Mix in the ignore on wifi policy."
Chalard Jean   authored and   Android (Google) Code Review   commited 2020-02-18 05:46:33 +00:00
d2f82a2cc3
Merge changes Ide9daebc,Id47ada57 am: d07db8a8da
Change-Id: Ied52fed05566a0d75e82007170210205db7832a8

Benedict Wong   commited 2020-02-17 22:01:24 +00:00
3dbd79190c
[NS D02] Mix in the ignore on wifi policy.
Ultimately ConnectivityService and its satellites should mix in
some measurements to NetworkScore, but in the immediate future
they'll just use this to mix in at the new format the policy it
used to managed in an ad-hoc way.

As a first mix-in, this adds mixing in the IGNORE_ON_WIFI policy,
which so far used to be handled in Connectivity as the avoidBadWifi
bit. Ultimately this should move to Telephony.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I4869d5eb9ea74679e57c087005ed3d9b8119fed2

Chalard Jean   commited 2020-02-17 14:58:31 +09:00
7a56387e2c
Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" am: 50e2cbde28
Change-Id: I5e0b4e50352428ca5886a808b5667daffb4f2e4c

Isabelle Taylor   commited 2020-02-14 13:51:45 +00:00
a4474bd4d0
Merge "Revert "Remove framework code that has moved to frameworks/libs/net""
Isabelle Taylor   authored and   Gerrit Code Review   commited 2020-02-14 13:42:37 +00:00
50e2cbde28
Revert "Remove framework code that has moved to frameworks/libs/net"
Revert "Use createRandomUnicastAddress from MacAddressUtils"

Revert "Add net-utils-framework-net to telephony-common"

Revert submission 1191997-net-utils-framework-net

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_qt-qpr1-dev-plus-aosp&target=aosp_taimen-userdebug&lkgb=6208131&lkbb=6208273&fkbb=6208273, bug b/149551544
Reverted Changes:
Ib1c807d64:Use createRandomUnicastAddress from MacAddressUtil...
I9e0f297e0:Add net-utils-framework-net to telephony-common
Ieb8927f9a:Remove framework code that has moved to frameworks...

Change-Id: I2824f781babd9f7e0bb9df524dadf6b8397dcaa1

Isabelle Taylor   commited 2020-02-14 13:09:16 +00:00
175627fafb
Merge "Remove framework code that has moved to frameworks/libs/net" am: 0122cf102f
Change-Id: I20b8398f1fe410819f18a0afcd8646c75c594fb8

Aaron Huang   commited 2020-02-14 09:53:36 +00:00
2deb148476
Merge "Remove framework code that has moved to frameworks/libs/net"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-02-14 09:42:49 +00:00
0122cf102f
Enforce restricted user, getConnectionOwnerUid checks
This CL adds checks to ensure restricted users cannot change or
start/stop platform VPNs. In addition, this also adds checks to the
ConnectivityManager#getConnectionOwnerUid() to ensure that only
VpnService based VPNs can identify connections

Bug: 148040659
Test: FrameworksNetTests run
Change-Id: Id47ada5766036bfc84f3ba47f66f2d2683af916d

Benedict Wong   commited 2020-02-14 00:09:47 -08:00
0bd4bba07a
Merge "RELAND: NetworkRequest: Embed requestor uid & packageName"
Roshan Pius   authored and   Gerrit Code Review   commited 2020-02-14 01:57:49 +00:00
02d8578fc3
Merge "Add Intdef annotation for eventId in logEvent" am: 2ed536a7b6 am: ef5b92c7d2 am: dd26691339
Change-Id: I7caa207fb35e8088e50de0651a72a6d9628e7ce2

Automerger Merge Worker   commited 2020-02-13 11:24:43 +00:00
3c43c37a44
Merge "Add Intdef annotation for eventId in logEvent" am: 2ed536a7b6
Change-Id: Ic9b5ea605164340d5c2461eb7a1a752bb5b36bad

Automerger Merge Worker   commited 2020-02-13 10:56:35 +00:00
ef5b92c7d2
Merge "Add Intdef annotation for eventId in logEvent"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-02-13 10:44:57 +00:00
2ed536a7b6