Commit graph android_packages_modules_Co.../core/java/android
Message SHA1
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
Merge "Add permission check for CaptivePortal#reevaluateNetwork" am: d0f3cb625e
Change-Id: I2f9de2582025c8fc3782870b8c561ce2002abaf8

Automerger Merge Worker   commited 2020-02-13 06:54:50 +00:00
9dd19a4b83
Merge "Add permission check for CaptivePortal#reevaluateNetwork"
Chiachang Wang   authored and   Gerrit Code Review   commited 2020-02-13 06:41:53 +00:00
d0f3cb625e
Add Intdef annotation for eventId in logEvent
Follow API guide.

Bug: 148379628
Test: make test-api-stubs-docs-update-current-api \
      system-api-stubs-docs-update-current-api

Change-Id: I410ef06b2fa82d8ef35513086733b0fc2cf0fe06

Chiachang Wang   commited 2020-02-13 06:26:35 +00:00
2520c650cd
Merge "Add permission check for CaptivePortal#reevaluateNetwork"
Chiachang Wang   authored and   Android (Google) Code Review   commited 2020-02-13 06:25:32 +00:00
c3c1334243
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   commited 2020-02-12 16:58:36 -08:00
08c94fb8a9
Merge "Revert "NetworkRequest: Embed requestor uid & packageName"" am: 948f0f9878
Change-Id: I00dd341f699d2a22cc3d190b43314a49bee9062a

Automerger Merge Worker   commited 2020-02-12 23:55:00 +00:00
9e1c910fff
Merge "Revert "NetworkRequest: Embed requestor uid & packageName""
Roshan Pius   authored and   Gerrit Code Review   commited 2020-02-12 23:36:13 +00:00
948f0f9878
Revert "NetworkRequest: Embed requestor uid & packageName"
This reverts commit d499517306.

Reason for revert: b/149425896
Bug: b/149425896

Change-Id: I9fe31509c040cc421ccb00ea60f15e6f199e8bc6

Roshan Pius   commited 2020-02-12 23:33:43 +00:00
d85de75bfa
Merge "NetworkRequest: Embed requestor uid & packageName" am: 7b59ec507c
Change-Id: Ic4f9247e18a9d1cc22b26500b47da1af2d9b011d

Automerger Merge Worker   commited 2020-02-12 18:51:59 +00:00
e6f588ab90
Merge "NetworkRequest: Embed requestor uid & packageName"
Qingxi Li   authored and   Gerrit Code Review   commited 2020-02-12 18:43:32 +00:00
7b59ec507c
Merge "Include NetworkCapabilities and LinkProperties in DataStallReport." am: 287c4adbc9 am: d876b4ef76 am: c4cf86b9ad
Change-Id: Iae8c37ceeae1616b2b0edc43248e72f3de082f20

Automerger Merge Worker   commited 2020-02-12 17:50:39 +00:00
9a0752cc57
Merge "Include NetworkCapabilities and LinkProperties in DataStallReport."
am: 287c4adbc9

Change-Id: If2157b0dd7d62560c77318b76e0d7d2a66c09644

Cody Kesting   authored and   android-build-merger   commited 2020-02-12 09:16:41 -08:00
d876b4ef76
Merge "Include NetworkCapabilities and LinkProperties in DataStallReport."
Cody Kesting   authored and   Gerrit Code Review   commited 2020-02-12 16:38:38 +00:00
287c4adbc9
Add permission check for CaptivePortal#reevaluateNetwork
CaptivePortal#reevaluateNetwork is added as a system API which
requires a proper permission check.

Bug: 148379628
Test: Manually check with captive portal
Test: atest FrameworksNetTests
Test: make test-api-stubs-docs-update-current-api \
      system-api-stubs-docs-update-current-api

Change-Id: I3f974339d5bd53a6f6ecb0842c02a8264dc3a5f9
Merged-In: I559d42089aeb09801d14c251c5165fca793c3cb3

Chiachang Wang   commited 2020-02-12 11:29:24 +00:00
f7a0f125db
Add permission check for CaptivePortal#reevaluateNetwork
CaptivePortal#reevaluateNetwork is added as a system API which
requires a proper permission check.

Bug: 148379628
Test: Manually check with captive portal
Test: atest FrameworksNetTests
Test: make test-api-stubs-docs-update-current-api \
      system-api-stubs-docs-update-current-api

Change-Id: I559d42089aeb09801d14c251c5165fca793c3cb3

Chiachang Wang   commited 2020-02-12 11:28:55 +00:00
ca2105f597
Merge changes Ibc9b1965,I288ea32f am: 7fa63afe6d
Change-Id: I6eb675ddfa609dcc3031e916ce49959e42cf53f6

Automerger Merge Worker   commited 2020-02-12 06:25:49 +00:00
54a520d22f
Add a systemapi constructor for NetworkAgent am: 0900154ef5
Change-Id: I3fa3ec32d3c580ba0b7f2d515e08d27dd6af5bcd

Automerger Merge Worker   commited 2020-02-12 06:25:42 +00:00
1021194560
Fix invalid usage of javadoc
CP from ag/10125651

Test: this change removes invalid usage
Change-Id: Ibc9b1965ec7aa545c0dae71d741c3802d3a9fa12
Merged-In: I35fc4a814238635fa95981649c27230dda319afa

Aaron Huang   authored and   Chalard Jean   commited 2020-02-12 06:10:10 +00:00
c2b200e46b
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
Change-Id: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529
Merged-In: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529

Roshan Pius   authored and   Qingxi Li   commited 2020-02-12 04:42:58 +00:00
d499517306