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

paulhu   commited 2020-03-11 22:14:11 +08:00
27ca44913a
Merge "Remove the NetworkScore class."
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-03-08 04:52:26 +00:00
d88d10a100
Remove the NetworkScore class.
This class is useless at this point and introduces overhead.

Bug: 113554781
Test: FrameworksNetTests
Change-Id: Ib6da6c1c7f2a0b97c847d2e64e5ce16dd821e1e7

Chalard Jean   commited 2020-03-06 11:57:53 +09:00
8cdee3a431
Merge "Remove polling of TetheringManager in ConnectivityManager."
Amos Bianchi   authored and   Gerrit Code Review   commited 2020-03-05 18:34:59 +00:00
d43d33333c
Remove polling of TetheringManager in ConnectivityManager.
Test: manual

Bug: 144742179

Change-Id: I196b320788be96c120f771d2fcdf032a73e26b5f

Amos Bianchi   commited 2020-03-05 18:34:14 +00:00
a9b415a49d
Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider" am: 9f1fa12186
Change-Id: I1ab6d47c17992f8630d9aba892bcef29dcb66bfa

Automerger Merge Worker   commited 2020-03-04 10:32:09 +00:00
3c77725b74
Merge "Accept MAINLINE_NETWORK_STACK permission on register/unregister network provider"
Paul Hu   authored and   Gerrit Code Review   commited 2020-03-04 10:15:41 +00:00
9f1fa12186
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

paulhu   commited 2020-03-04 09:43:41 +08:00
b6ba8e84f4
Merge "Update NetworkInfo public API." am: a159122013
Change-Id: I6658d79bd9bda22ed6b8acac90ba94c9ef18c488

Automerger Merge Worker   commited 2020-03-03 09:40:07 +00:00
f500dafbdb
Merge "Update NetworkInfo public API."
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-03 09:16:55 +00:00
a159122013
New NetworkAgentConfig API to replace NetworkInfo WiFi stuff. am: cd457ea5ec
Change-Id: I94e3b25aa202e75338115f82c6db0dd0e41deb48

Automerger Merge Worker   commited 2020-03-03 03:53:58 +00:00
6bef08258f
Merge "Move NetworkAgent#register to a new method." am: 5d61bc285d
Change-Id: I4ca48f4232ad4733da5ce7f265fc911f5ff1a713

Automerger Merge Worker   commited 2020-03-03 03:52:17 +00:00
7c9677256c
Merge changes from topic "del-factory-and-networkagent-wifi"
* changes:
  Delete NetworkFactory from frameworks/base/core.
  New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.

Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-03 03:47:31 +00:00
ea4d07c802
Merge "Move NetworkAgent#register to a new method."
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-03 03:37:07 +00:00
5d61bc285d
Merge "Remove framework code that has moved to frameworks/libs/net"
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-02 06:23:44 +00:00
fcca217a94
Merge "Always set NetworkInfo objects to available." am: e8a5275bc9
Change-Id: I89b53d1a254ca43566286b1309ce88b8a1518c4a

Automerger Merge Worker   commited 2020-03-02 05:10:35 +00:00
9b08eb340a
Merge "Always set NetworkInfo objects to available."
Aaron Huang   authored and   Gerrit Code Review   commited 2020-03-02 04:53:10 +00:00
e8a5275bc9
Merge "Add methods to send connected/disconnected state." am: 40dba07dc3
Change-Id: If69bd650e129dc9f058e47832d48651b9243a3bb

Automerger Merge Worker   commited 2020-02-27 03:23:48 +00:00
f0de11d057
Update NetworkInfo public API.
Wifi needs to create these objects so it can include them
in the broadcasts.

Bug: 135998869
Test: FrameworksWifiTests
Change-Id: Ic50d9b5c65e8771708620badc3bc242a8ffbb5cc
Merged-In: Ic50d9b5c65e8771708620badc3bc242a8ffbb5cc

Chalard Jean   authored and   Aaron Huang   commited 2020-02-24 21:07:08 +08:00
4d5537853a
New NetworkAgentConfig API to replace NetworkInfo WiFi stuff.
Bug: 139268426
Test: FrameworkWifiTests
Change-Id: Id13fcf41e05fd1eb26c86717e2684c724b94e401
Merged-In: Id13fcf41e05fd1eb26c86717e2684c724b94e401

Chalard Jean   authored and   Aaron Huang   commited 2020-02-21 16:08:17 +08:00
cd457ea5ec
Move NetworkAgent#register to a new method.
Calling IPC in a constructor is unusual and confusing, and can be
considered bad form. There are multiple reasons for this :
• Users can't obtain an instance of the class without calling the
  constructor, but they can't always afford an IPC where they need
  this, forcing them to know about the implementation detail and
  sometimes design around it.
• On a related but generalized note, constructors should usually
  be fast for the same range of reasons.
• Having a separate method to register the agent simply gives more
  flexibility to the app.
• It's also a lot easier to test.
But also we can't fix it without an update to the API, so here it is.

Another reason for doing this is consistency with the NetworkProvider
API.

Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I1ee5c7b1353d581e487c8a8a159009bebd781643
Merged-In: I1ee5c7b1353d581e487c8a8a159009bebd781643
(clean cherry-pick from internal branch)

Chalard Jean   authored and   Aaron Huang   commited 2020-02-21 14:54:18 +08:00
5863a71547
Add methods to send connected/disconnected state.
Also add methods to set the legacy subtype and the APN name.
These have to be added together because they have to be used
together.

Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: Ie90b8d290eab490061d5cb066744b67d597b9469
Merged-In: Ie90b8d290eab490061d5cb066744b67d597b9469
(clean cherry-pick from internal branch)

Chalard Jean   authored and   Aaron Huang   commited 2020-02-20 19:37:16 +08:00
3946b0ac1e
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
Always set NetworkInfo objects to available.
For all networks, NetworkInfo.isAvailble has basically always
been true for all connected networks. The new NetworkAgent API
sets it to false, and this causes application breakage. Always
set it to true.

Bug: 148126438
Test: builds, boots, searching in maps works again
Change-Id: Ia9876b0ce7f02120bd05cab526346cad22cf62b3
Merged-In: Ia9876b0ce7f02120bd05cab526346cad22cf62b3
(clean cherry-pick from internal branch)

Lorenzo Colitti   authored and   Aaron Huang   commited 2020-02-19 12:23:49 +00:00
23d813be73
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
Remove framework code that has moved to frameworks/libs/net
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.

Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh

Change-Id: I44e0a8361637c2d43be2e5d033d405b22e1a149c
Merged-In: I067cdc404e5a63947c19cb75069a39ae42faa3c8
Merged-In: Ieb8927f9af7f87a5ae038bd6c7daeb3d70117fef

Aaron Huang   commited 2020-02-18 13:52:35 +00:00
336f647ee2
Merge changes Ide9daebc,Id47ada57 am: d07db8a8da
Change-Id: Ied52fed05566a0d75e82007170210205db7832a8

Benedict Wong   commited 2020-02-17 22:01:24 +00:00
3dbd79190c
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
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
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

Change-Id: If2157b0dd7d62560c77318b76e0d7d2a66c09644

Cody Kesting   authored and   android-build-merger   commited 2020-02-12 09:16:41 -08:00
d876b4ef76