Commit Graph

5004 Commits

Author SHA1 Message Date
Automerger Merge Worker
e5bbdcfcf5 Merge "Include NetworkCapabilities and LinkProperties in DataStallReport." am: 3939d29c0b am: b3a0f10a8e am: 8a175acf37
Change-Id: Iae8c37ceeae1616b2b0edc43248e72f3de082f20
2020-02-12 17:50:39 +00:00
Cody Kesting
b3a0f10a8e Merge "Include NetworkCapabilities and LinkProperties in DataStallReport."
am: 3939d29c0b

Change-Id: If2157b0dd7d62560c77318b76e0d7d2a66c09644
2020-02-12 09:16:41 -08:00
Cody Kesting
3939d29c0b Merge "Include NetworkCapabilities and LinkProperties in DataStallReport." 2020-02-12 16:38:38 +00:00
Automerger Merge Worker
6185ee9556 Merge changes Ibc9b1965,I288ea32f am: 7fa63afe6d
Change-Id: I6eb675ddfa609dcc3031e916ce49959e42cf53f6
2020-02-12 06:25:49 +00:00
Automerger Merge Worker
b9e9fcbc88 Add a systemapi constructor for NetworkAgent am: 6dc9854996
Change-Id: I3fa3ec32d3c580ba0b7f2d515e08d27dd6af5bcd
2020-02-12 06:25:42 +00:00
Chalard Jean
7fa63afe6d Merge changes Ibc9b1965,I288ea32f
* changes:
  Fix invalid usage of javadoc
  Add a systemapi constructor for NetworkAgent
2020-02-12 06:10:32 +00:00
Aaron Huang
9be870d8bd Fix invalid usage of javadoc
CP from ag/10125651

Test: this change removes invalid usage
Change-Id: Ibc9b1965ec7aa545c0dae71d741c3802d3a9fa12
Merged-In: I35fc4a814238635fa95981649c27230dda319afa
2020-02-12 06:10:10 +00:00
Automerger Merge Worker
8869427bbb Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: 0f19f99cf6 am: b5b5ebd1a9 am: 9e1ab88bd0
Change-Id: I0e7322090364fc1724797641276416c07277d0bc
2020-02-12 05:27:01 +00:00
Automerger Merge Worker
b5b5ebd1a9 Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: 0f19f99cf6
Change-Id: I4d352ed54671ce77ebbcaa9f0808a0ef703d3c6f
2020-02-12 04:54:02 +00:00
Treehugger Robot
0f19f99cf6 Merge "[SP10] Add IntDef annotations for system api of NetworkStats" 2020-02-12 04:37:55 +00:00
Cody Kesting
7064b5c25a Include NetworkCapabilities and LinkProperties in DataStallReport.
DataStallReport is updated to include the NetworkCapabilities and Link
Properties for the Network being reported on. This provides a more
complete picture of the Network conditions when the suspected data stall
was detected.

Bug: 148966398
Test: atest FrameworksNetTests
Change-Id: I913cf18c348b9f688f9d2a3d25a71bc94eb8f000
2020-02-11 08:50:59 -08:00
junyulai
d859855a04 [SP10] Add IntDef annotations for system api of NetworkStats
Test: m -j
Bug: 130855321
Change-Id: I8855ec95d5d086fc14e2eb71558bc2dcd9a830e5
2020-02-11 09:47:03 +00:00
Chalard Jean
6dc9854996 Add a systemapi constructor for NetworkAgent
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
      make doc-comment-check-docs
Change-Id: I288ea32fac07a9a486e2ea451a2c9b098446a74c
Merged-In: I288ea32fac07a9a486e2ea451a2c9b098446a74c
2020-02-11 16:26:10 +08:00
Aaron Huang
a77fbc2539 Merge "Fix review comments on aosp/1213524" 2020-02-11 03:33:08 +00:00
Chalard Jean
b323b6ba2a Fix review comments on aosp/1213524
This is necessary to avoid subsequent conflicts.

Test: none needed
Change-Id: I6e2cd9188e0e4bd7c71c6c56635f192dce73f325
Merged-In: I621cfbe165996c67b201ca2dd2f95a5ab9af10ee
2020-02-10 08:28:04 +00:00
Automerger Merge Worker
30c24af806 Merge "Fix typo in ConnectivityDiagnosticsManager constant." am: d222986acd am: 09d92456fa am: 836124db7e
Change-Id: I0677a6a31defcb6412f132dcbbfd54f02c82baf7
2020-02-07 17:37:44 +00:00
Automerger Merge Worker
09d92456fa Merge "Fix typo in ConnectivityDiagnosticsManager constant." am: d222986acd
Change-Id: Icaae03ca1895de4012deed1c1b81b16fad4ba439
2020-02-07 17:08:20 +00:00
Cody Kesting
d222986acd Merge "Fix typo in ConnectivityDiagnosticsManager constant." 2020-02-07 16:57:19 +00:00
TreeHugger Robot
9b0e5e6681 Merge "Use framework-tethering-stub instead of framework-tethering" 2020-02-07 11:32:23 +00:00
Automerger Merge Worker
3ba215eefd Merge "NetworkPolicyManager: Add @SystemApi for mainlne module" am: c8b7cff7f4
Change-Id: Iba93c5f26010f647c78aef359e907d5f3b40fde0
2020-02-07 06:01:53 +00:00
Aaron Huang
c8b7cff7f4 Merge "NetworkPolicyManager: Add @SystemApi for mainlne module" 2020-02-07 05:47:45 +00:00
markchien
2c153703e4 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
2020-02-07 00:27:26 +08:00
Roshan Pius
e38acab53e 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
2020-02-06 07:36:29 -08:00
Automerger Merge Worker
fbacb0ed11 Merge "Implement INetworkMonitorCallbacks#notifyNetworkTestedWithExtras." am: 113ea83450
Change-Id: I39b74228c6c2a48ace7ad36dba995fa6f91bfbb5
2020-02-05 20:09:32 +00:00
Cody Kesting
113ea83450 Merge "Implement INetworkMonitorCallbacks#notifyNetworkTestedWithExtras." 2020-02-05 19:55:05 +00:00
Cody Kesting
d198ed0a80 Implement INetworkMonitorCallbacks#notifyNetworkTestedWithExtras.
INetworkMonitorCallbacks defines notifyNetworkTestedWithExtras() for
notifying ConnectivityService of networks being tested along with a
PersistableBundle of extras. A new event is introduced for
NetworkStateTrackerHandler to notify the ConnectivityDiagnosticsHandler
before continuing with the normal processing for "network tested"
notifications. The event is also used in the
ConnectivityDiagnosticsHandler.

Bug: 143187964
Bug: 147391402
Test: compiles.
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: Iab29da790c0f5faae68227770bc3a84bbc94f124
Merged-In: Iab29da790c0f5faae68227770bc3a84bbc94f124
2020-02-05 18:48:12 +00:00
Cody Kesting
5c3e7d50cf Fix typo in ConnectivityDiagnosticsManager constant.
This change fixes a typo in the value assigned to the constant
KEY_NETWORK_PROBES_ATTEMPTED_BITMASK, which is defined in
ConnectivityDiagnosticsManager.ConnectivityReport.

Bug: 148939502
Test: compiles
Change-Id: I63863efa8c69593012bf4e95d896db192c6bfb5c
2020-02-05 08:56:48 -08:00
Automerger Merge Worker
5b9370b4c8 Merge "Add setSubscriptionPlans() and getSubscriptionPlans() @SystemApi" am: 12aeaefeaf
Change-Id: I8d9025a1419bdfff854eb44f92ab9afe009edddc
2020-02-05 12:04:08 +00:00
Aaron Huang
12aeaefeaf Merge "Add setSubscriptionPlans() and getSubscriptionPlans() @SystemApi" 2020-02-05 11:48:26 +00:00
Automerger Merge Worker
7846b824e0 Merge "Add separate user consent for Platform VPNs" am: ede31cad1c
Change-Id: I38ceff087e37f6ede6819e706c36ee9129a1cc6b
2020-02-05 00:07:41 +00:00
Benedict Wong
ede31cad1c Merge "Add separate user consent for Platform VPNs" 2020-02-04 23:56:16 +00:00
Cody Kesting
a75e26be99 Implement INetworkMonitorCallbacks#notifyNetworkTestedWithExtras.
INetworkMonitorCallbacks defines notifyNetworkTestedWithExtras() for
notifying ConnectivityService of networks being tested along with a
PersistableBundle of extras. A new event is introduced for
NetworkStateTrackerHandler to notify the ConnectivityDiagnosticsHandler
before continuing with the normal processing for "network tested"
notifications. The event is also used in the
ConnectivityDiagnosticsHandler.

Bug: 143187964
Bug: 147391402
Test: compiles.
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: Iab29da790c0f5faae68227770bc3a84bbc94f124
(cherry picked from commit c5326407d592490783259a48a8ca653c4ff13122)
2020-02-04 13:55:08 -08:00
Benedict Wong
526e7dd0b6 Add separate user consent for Platform VPNs
This change adds a new VPN user consent flow (using the same text) for
granting the lesser OP_ACTIVATE_PLATFORM_VPN. A new
PlatformVpnConfirmDialog is created as a subclass to preserve all logic,
but ensure the right appop is granted for the relevant dialog.

Intent extras were considered, but are inherently unsafe, since the
caller may add any extras that they would want.

Bug: 144246835
Test: FrameworksNetTests passing
Change-Id: Ia6f36207d43c3748f938430c2780dcf29e5623f3
Merged-In: Ia6f36207d43c3748f938430c2780dcf29e5623f3
2020-02-04 21:05:36 +00:00
Automerger Merge Worker
ce4e22638c Merge "Add setSubscriptionOverride() to system API" am: f734372173
Change-Id: I80a7cae65eaefad94afa428c27c84338142bd224
2020-02-04 07:19:54 +00:00
Chalard Jean
f734372173 Merge "Add setSubscriptionOverride() to system API" 2020-02-04 07:07:57 +00:00
Benedict Wong
418017e5f9 Add separate user consent for Platform VPNs
This change adds a new VPN user consent flow (using the same text) for
granting the lesser OP_ACTIVATE_PLATFORM_VPN. A new
PlatformVpnConfirmDialog is created as a subclass to preserve all logic,
but ensure the right appop is granted for the relevant dialog.

Intent extras were considered, but are inherently unsafe, since the
caller may add any extras that they would want.

Bug: 144246835
Test: FrameworksNetTests passing
Change-Id: Ia6f36207d43c3748f938430c2780dcf29e5623f3
2020-02-03 19:05:23 -08:00
Automerger Merge Worker
f0987bd909 Merge changes I446a8595,I68d2293f am: 29044acc20 am: d7ab8fec8c am: a854c8e1de
Change-Id: I99a531ab5ed8645d3eb3d15a3cd4ed6ef30c89ab
2020-02-03 22:53:15 +00:00
Automerger Merge Worker
d7ab8fec8c Merge changes I446a8595,I68d2293f am: 29044acc20
Change-Id: I8422163249ca637ab71b71777feded76e3225c2e
2020-02-03 22:34:25 +00:00
Benedict Wong
29044acc20 Merge changes I446a8595,I68d2293f
* changes:
  Add VpnManager calls to ConnectivityService
  Add basic logic for profile-based VPNs
2020-02-03 22:31:37 +00:00
Automerger Merge Worker
9b24465277 Merge "Update javadocs for ConnectivityDiagnosticsManager." am: 4997b874a3 am: 704eab60eb am: 99260bea0b
Change-Id: Icd75afae770c93ac6fdb611e220d8723c07771ac
2020-02-03 15:18:32 +00:00
Automerger Merge Worker
2e1e43ca95 Merge "Add callback registration in ConnectivityService." am: e534c45250 am: 52309b9871 am: dcc5a26aa0
Change-Id: I596d4788f6d35f1adf110d8edd390f5632b4dc06
2020-02-03 15:18:18 +00:00
Automerger Merge Worker
704eab60eb Merge "Update javadocs for ConnectivityDiagnosticsManager." am: 4997b874a3
Change-Id: Ia393d1ee102ae7dfc4a7b5698b5f3b4882605e7c
2020-02-03 15:07:20 +00:00
Automerger Merge Worker
52309b9871 Merge "Add callback registration in ConnectivityService." am: e534c45250
Change-Id: Idf067ebd9299ca036965b7c7f82c13a6f659a821
2020-02-03 15:06:50 +00:00
Cody Kesting
4997b874a3 Merge "Update javadocs for ConnectivityDiagnosticsManager." 2020-02-03 14:56:13 +00:00
Cody Kesting
e534c45250 Merge "Add callback registration in ConnectivityService." 2020-02-03 14:55:54 +00:00
Aaron Huang
c3168e9c48 NetworkPolicyManager: Add @SystemApi for mainlne module
1) Add NetworkPolicyManager.registerSubscriptionCallback and
   NetworkPolicyManager.unregisterSubscriptionCallback for
   registering and unregister.
2) Create SubscriptionCallback to support new @SystemApi
   so that caller could use this object to register and
   unregister.

Bug: 138306002
Test: FrameworksNetTests
      FrameworksTelephonyTests

Change-Id: I56833254a93383e8054c96d296bcb54b777a6e33
Merged-In: I56833254a93383e8054c96d296bcb54b777a6e33
2020-02-03 19:27:57 +08:00
Aaron Huang
bfbaa0bbca Add setSubscriptionPlans() and getSubscriptionPlans() @SystemApi
Add two interfaces to communicate with NetworkPolicyManagerService
and make them @SystemApi for mainline support.

Bug: 138306002
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests

Change-Id: I9f1168bbc70dce9b2b107e1f946737b1d85599c7
Merged-In: I9f1168bbc70dce9b2b107e1f946737b1d85599c7
2020-02-03 19:26:56 +08:00
Aaron Huang
79f52ea525 Add setSubscriptionOverride() to system API
Add new API setSubscriptionOverride() in NetworkPolicyManager
and rename constants OVERRIDE_* to SUBSCRIPTION_OVERRIDE_*.
Make them @SystemApi for mainline support.

Bug: 138306002
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests

Change-Id: I56c777aa66d6f455695f133f9889979c13cd1bc8
Merged-In: I56c777aa66d6f455695f133f9889979c13cd1bc8
2020-02-03 19:26:42 +08:00
Cody Kesting
aadf4834f1 Update javadocs for ConnectivityDiagnosticsManager.
ConnectivityDiagnosticsManager comments for
registerConnectivityDiagnosticsCallback and
unregisterConnectivityDiagnosticsCallback are updated to reflect several
changes.

For register calls, any app will be able to register callbacks, but only
permissioned applications will have their callbacks invoked (and only
for networks managed by the application). Additionally, only the
registering app (uid) will be able to unregister a callback once
registered.

Bug: 143187964
Test: docs change only. compiles.
Change-Id: Ie7ae86a1afccb22d6c84027dbac49d7b8e431e8c
2020-01-31 09:49:25 -08:00
Cody Kesting
63e4e00371 Add callback registration in ConnectivityService.
ConnectivityDiagnosticsManager will send callbacks to
ConnectivityService for registering and unregistering them with the
system. ConnectivityService needs to do the processing for persisting
(and deleting) these callbacks on the ConnectivityService Thread, so
messages are sent to the Connectivity Diagnostics  Handler, which runs
on the ConnectivityService Thread.

Bug: 146444622
Bug: 143187964
Bug: 147848028
Test: compiles
Test: atest FrameworksNetTests
Change-Id: Ia5c8f90a60c050504e8676de9564a7607a9b03bc
2020-01-31 09:42:05 -08:00