Commit Graph

14373 Commits

Author SHA1 Message Date
Chalard Jean
b82a74b077 Expose sendNetworkScore that takes a NetworkScore
Bug: 167544279
Test: FrameworksNetTests
CTS-Coverage-Bug: 184037351
Change-Id: I5dd9b526c53cb99a5e4ae87f1e3724a7a1870e78
2021-03-31 13:26:46 +00:00
Chalard Jean
d7a91befe1 Merge changes Id7ee1bd3,I5ea44a94 into sc-dev
* changes:
  [NS08] Expose public NetworkScore API
  [NS07] Add the rest of the scoring policy
2021-03-31 11:42:19 +00:00
James Mattis
cbb60163df Merge "Change the const for the unreachable network" am: 07ff79a595 am: 5522ed6e3c am: 0aa2f9f8ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653190

Change-Id: Id50d1e06f18830025eb30b420b4f6817028cf5c8
2021-03-31 04:23:02 +00:00
James Mattis
0aa2f9f8ec Merge "Change the const for the unreachable network" am: 07ff79a595 am: 5522ed6e3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653190

Change-Id: I848bc411f919991eb795372b64023f951e310e6a
2021-03-31 03:40:16 +00:00
James Mattis
5522ed6e3c Merge "Change the const for the unreachable network" am: 07ff79a595
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1653190

Change-Id: I1e63766f07f3976abd36df117ffd3bf5ae1a8af4
2021-03-31 03:03:27 +00:00
James Mattis
9bdfa2c582 Change the const for the unreachable network
Changing the const used for the unreachable network for per-app
functionality for those apps whose traffic for the default network we
wish to lose connectivity as dictated by per app network preferences.
This is being done as per changes in https://r.android.com/1643182.

Bug: 181579204
Test: atest FrameworksNetTests
Change-Id: I1bffadfa03a6221096100c9e0457ea00f94027a3
2021-03-30 17:16:44 -07:00
Lorenzo Colitti
5c88750cfc Merge changes I24580ea4,Id48b8eab am: cbc6a315c5 am: ce1d32cd36 am: e4ef990c5d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657763

Change-Id: I9d304c35374670eb0e4dcfb9caf6b065878d97e6
2021-03-30 18:33:04 +00:00
Lorenzo Colitti
e4ef990c5d Merge changes I24580ea4,Id48b8eab am: cbc6a315c5 am: ce1d32cd36
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657763

Change-Id: I8a7973e7ed4a8aac67d6f3da7c496a2eb0e28d92
2021-03-30 17:43:08 +00:00
Lorenzo Colitti
ce1d32cd36 Merge changes I24580ea4,Id48b8eab am: cbc6a315c5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657763

Change-Id: I3f90c94080e4d6f37cab3b5b43a0f5415fb50d8f
2021-03-30 17:09:01 +00:00
Lorenzo Colitti
cbc6a315c5 Merge changes I24580ea4,Id48b8eab
* changes:
  Allow the system to register 250 NetworkCallbacks.
  Add more test coverage for limiting the number of callbacks.
2021-03-30 16:01:58 +00:00
Chalard Jean
c44fa15b73 [NS08] Expose public NetworkScore API
This exposes the two bits settable by the network agents in
Android S on NetworkScore. This is meant to be extensible in
future releases, or possibly for OEM upstreams.

Test: builds
CTS-Coverage-Bug: 184037351
Bug: 167544279
Change-Id: Id7ee1bd3e2679f0bd5200d5c299f18a33b87847c
2021-03-30 23:54:19 +09:00
Chalard Jean
7851544cb5 [NS07] Add the rest of the scoring policy
Bug: 167544279
Test: FrameworksNetTests
Change-Id: I5ea44a94ac6f16486274e9091f15a84734db2341
2021-03-30 23:50:41 +09:00
Lorenzo Colitti
a610eede44 Merge "Add new network capabilities to support automotive head unit via USB" into sc-dev 2021-03-30 14:36:56 +00:00
Lorenzo Colitti
b4f8d8e130 Allow the system to register 250 NetworkCallbacks.
Give anyone with PERMISSION_MAINLINE_NETWORK_STACK (i.e.,
either the system or the networkstack process) a separate limit
of 250 callbacks per UID.

Bug: 183921387
Test: new unit tests
Change-Id: I24580ea48e3ad502ef584efc5fde0b5d22e392b4
2021-03-30 22:54:01 +09:00
Lorenzo Colitti
64ef4d3785 Add more test coverage for limiting the number of callbacks.
Bug: 183921387
Test: test-only change
Change-Id: Id48b8eab507fb616cb0adfeba52e00858d44b8a6
2021-03-30 20:28:36 +09:00
Treehugger Robot
79a5d34354 [automerger skipped] Merge changes I3826b9ef,I91d68ca3 am: 364ad64fa7 am: 41d68e4f4a am: 3b8caaa25f -s ours
am skip reason: skip tag Change-Id I3826b9efc3418a724bd3753b9ad573adc3343b72 with SHA-1 c9a448808b is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654008

Change-Id: I81c4e3062f7546bf08f662e47cdbca63dae4d8fb
2021-03-30 09:46:04 +00:00
lucaslin
b794e348c0 [automerger skipped] Get NetworkCapabilities from NetworkCallback am: e14573d25e am: 4b3b6d68eb am: 04126c54f7 -s ours
am skip reason: skip tag Change-Id I91d68ca33253831b78def1ddeb074ba944a5d6ad with SHA-1 ad74ac58dd is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654007

Change-Id: I45456d55241bbbd6cda22cba93ab34c9c2ced176
2021-03-30 09:45:58 +00:00
Frank Li
199d6313e5 [automerger skipped] Merge "[JS01]Remove hidden API usage of Connectivity Sevice" am: 0557b8b4c6 am: 7ea1bb7074 am: 044cdbe716 -s ours
am skip reason: skip tag Change-Id Ie6bc81ff382fb242b98f35d28a96defc207c7987 with SHA-1 b22da4e252 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628361

Change-Id: I8704e12681669b9a67a53cf2b80eb361f599229f
2021-03-30 09:44:24 +00:00
Treehugger Robot
3b8caaa25f Merge changes I3826b9ef,I91d68ca3 am: 364ad64fa7 am: 41d68e4f4a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654008

Change-Id: Ia10fe44c45f5dbaea808025210b7a287209b85dc
2021-03-30 09:02:35 +00:00
lucaslin
04126c54f7 Get NetworkCapabilities from NetworkCallback am: e14573d25e am: 4b3b6d68eb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654007

Change-Id: Ia7f09489370f943d9b6c063d819d5b0cdba1510a
2021-03-30 09:02:33 +00:00
Frank Li
044cdbe716 Merge "[JS01]Remove hidden API usage of Connectivity Sevice" am: 0557b8b4c6 am: 7ea1bb7074
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628361

Change-Id: I7b4e289f13856f8015757d23a478fa923773d37a
2021-03-30 09:00:11 +00:00
Treehugger Robot
41d68e4f4a Merge changes I3826b9ef,I91d68ca3 am: 364ad64fa7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654008

Change-Id: Iec425473511a1fe1f4b2bcf633e56ae1c76102c0
2021-03-30 08:35:20 +00:00
lucaslin
4b3b6d68eb Get NetworkCapabilities from NetworkCallback am: e14573d25e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654007

Change-Id: I479d6b9564efee203ab2d2b6d1752d16c8b51cea
2021-03-30 08:32:37 +00:00
Treehugger Robot
364ad64fa7 Merge changes I3826b9ef,I91d68ca3
* changes:
  Add static for constant
  Get NetworkCapabilities from NetworkCallback
2021-03-30 08:22:41 +00:00
Frank Li
7ea1bb7074 Merge "[JS01]Remove hidden API usage of Connectivity Sevice" am: 0557b8b4c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1628361

Change-Id: Ibc9e5b382c210e157f9af9c1071b2e2e1065320e
2021-03-30 08:03:56 +00:00
Frank Li
0557b8b4c6 Merge "[JS01]Remove hidden API usage of Connectivity Sevice" 2021-03-30 07:22:40 +00:00
lifr
d023f35cc3 [JS01]Remove hidden API usage of Connectivity Sevice
The Connectivity service will become the mainline module.
Therefore, remove the caller of using Connectivity's
hidden API outside the module and expose the required
connectivity API used in Jobscheduler.

Bug: 183456204
CTS-Coverage-Bug: 170598012
Test: atest JobStoreTest
Change-Id: Ie6bc81ff382fb242b98f35d28a96defc207c7987
Merged-In: Ie6bc81ff382fb242b98f35d28a96defc207c7987
           (cherry-picked from ag/13946348)
2021-03-30 11:41:50 +08:00
Lorenzo Colitti
61a9bf9f02 Merge changes If539cf5d,I9765f1c9,I6d3007a1 am: 2206e976c1 am: 8c9d2c1823 am: 958a701738
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652262

Change-Id: I94e5cf19a7b7dac8400cb7acf80b39a864099956
2021-03-30 02:24:00 +00:00
Lorenzo Colitti
958a701738 Merge changes If539cf5d,I9765f1c9,I6d3007a1 am: 2206e976c1 am: 8c9d2c1823
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652262

Change-Id: I028d1f51c9685bcc7bcaabd0339b930aa46940c6
2021-03-30 01:58:24 +00:00
Lorenzo Colitti
8c9d2c1823 Merge changes If539cf5d,I9765f1c9,I6d3007a1 am: 2206e976c1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652262

Change-Id: Iab7a5cdb9d50314b0bdb982b88a9335b64ddb276
2021-03-30 01:14:09 +00:00
Lorenzo Colitti
624a47fc57 Merge "Add session ID to VpnTransportInfo" into sc-dev 2021-03-30 00:39:38 +00:00
Lorenzo Colitti
2206e976c1 Merge changes If539cf5d,I9765f1c9,I6d3007a1
* changes:
  Add test coverage for NetworkAgent callbacks.
  Add a setTeardownDelayMs API to NetworkAgent.
  Address comments on onBlockedStatusChanged(Network, int) CL.
2021-03-30 00:38:47 +00:00
Sudheer Shanka
9d483f1a54 Merge "Remove NetworkPolicyManager.isUidBlocked() API." am: 9cff99d059 am: d5da6e7182 am: b8d6d47bd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652550

Change-Id: Ic5c9fb2603a010976bc93e5059e5548ee782005e
2021-03-29 17:45:42 +00:00
Sudheer Shanka
b8d6d47bd5 Merge "Remove NetworkPolicyManager.isUidBlocked() API." am: 9cff99d059 am: d5da6e7182
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652550

Change-Id: I354cd41d18cfab87b1302d2dbd0ba5dcd10edca6
2021-03-29 16:57:17 +00:00
Sudheer Shanka
d5da6e7182 Merge "Remove NetworkPolicyManager.isUidBlocked() API." am: 9cff99d059
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652550

Change-Id: Ia95b11bcf91f18338b26146f6bb9488861555303
2021-03-29 16:19:05 +00:00
Frank Li
99a58b3607 [automerger skipped] Merge changes from topic "NetworkAgent02" am: 8539ed6fd2 am: b1d27c29ff am: 8b71e08ac6 -s ours
am skip reason: skip tag Change-Id Ie0fd5ba816c390bfb7bc6512d896a88482c217ec with SHA-1 a3f6cae74b is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654917

Change-Id: Ie95c3a94fa2a7e730ad43fa545dc82cf20c0e1bd
2021-03-29 12:58:19 +00:00
lifr
3c7d53de31 [automerger skipped] [TL02]Remove hidden API usage of NetworkAgent am: f1594291c4 am: 3ab40b5390 am: 03b9a590ea -s ours
am skip reason: skip tag Change-Id I4e4040ae7f94bdf479c7df9ec2ffabafbe06331c with SHA-1 cbe8c09525 is already in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1642722

Change-Id: I627119002e2d4230939d2017728959934f14a528
2021-03-29 12:58:09 +00:00
Sudheer Shanka
90358f5154 Remove NetworkPolicyManager.isUidBlocked() API.
It isn't used by ConnectivityService any more and even if
it needs such utility method in the future, we could create
one which is part of connectivity module and doesn't need
to be exposed as part of NetworkPolicyManager API surface.

Bug: 183696103
Test: atest ./tests/net/java/com/android/server/ConnectivityServiceTest.java
Change-Id: Ie3c681f88e4b2b9bb92d2224c5ea96b074f155d5
2021-03-29 12:39:12 +00:00
Lorenzo Colitti
1bc9ad0375 Add test coverage for NetworkAgent callbacks.
Tests the onNetworkCreated, onNetworkUnwanted and
onNetworkDisconnected callbacks, and the teardown delay timer.

Bug: 181941583
Test: atest --rerun-until-failure 500 ConnectivityServiceTest#testNetworkAgentCallbacks
Change-Id: If539cf5d01ba23193afab2433ed0ac4e7f0550ec
2021-03-29 21:33:11 +09:00
Lorenzo Colitti
6d88078151 Add a setTeardownDelayMs API to NetworkAgent.
This allows transports to request that when the network is
disconnected, the system should delay destroying the native
network until the specified time has passed after the network
disconnected.

Bug: 181941583
Test: next CL in the stack
Change-Id: I9765f1c9d1e55c23c6d583d6709dbe06505975b1
2021-03-29 21:33:08 +09:00
Frank Li
8b71e08ac6 Merge changes from topic "NetworkAgent02" am: 8539ed6fd2 am: b1d27c29ff
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654917

Change-Id: If099f376bfd5d456e938612005c4008b0beae91a
2021-03-29 12:14:01 +00:00
lifr
03b9a590ea [TL02]Remove hidden API usage of NetworkAgent am: f1594291c4 am: 3ab40b5390
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1642722

Change-Id: Id2679c6437a31718fb7612b07712bf8cef7fa293
2021-03-29 12:13:51 +00:00
Frank Li
b1d27c29ff Merge changes from topic "NetworkAgent02" am: 8539ed6fd2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1654917

Change-Id: If59df525be2483064976d3919cf7033fb94e41e6
2021-03-29 11:43:14 +00:00
lifr
3ab40b5390 [TL02]Remove hidden API usage of NetworkAgent am: f1594291c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1642722

Change-Id: I12342dc4c4ee8748396b7ced2f344611704caa2d
2021-03-29 11:39:55 +00:00
Lorenzo Colitti
a37eaff1ea Address comments on onBlockedStatusChanged(Network, int) CL.
Test: m
Bug: 165835257
Change-Id: I6d3007a1eac54ee6650b350aee56ed398a2c950d
2021-03-29 20:12:09 +09:00
Frank Li
8539ed6fd2 Merge changes from topic "NetworkAgent02"
* changes:
  Fix cannot success verify count of the networkAgent Config items on R device
  [TL02]Remove hidden API usage of NetworkAgent
2021-03-29 11:08:24 +00:00
lucaslin
e545c385a8 Add new network capabilities to support automotive head unit via USB
- Add a new transport type for USB and a new network capability
to support automotive head unit.
- In order to pass DnsManagerTest#testTransportTypesEqual, Android.bp
needs to link to dnsresolver_aidl_interface-V8-java. That test checks
whether the TRANSPORT types defined in NetworkCapabilities are the
same as IDnsResolver.aidl.

Bug: 181742019
Test: atest FrameworksNetTests
Change-Id: Iec2df09a776d779108f95098e01b7ffdf6f8867a
2021-03-29 10:59:06 +00:00
Junyu Lai
92a0b5130f Merge "Support Dual ViLTE stats" am: 371bd281f5 am: 4890738bde am: f4cd11179a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540920

Change-Id: I5739265c2747055b0252da7d1fb9e47d61ca111c
2021-03-29 09:05:02 +00:00
Junyu Lai
f4cd11179a Merge "Support Dual ViLTE stats" am: 371bd281f5 am: 4890738bde
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540920

Change-Id: Iaa7d8d3dcb106cd19777fe1ff64db5ab4ea75991
2021-03-29 08:26:07 +00:00
Junyu Lai
4890738bde Merge "Support Dual ViLTE stats" am: 371bd281f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540920

Change-Id: Ie65e2a2530b3e10b1cb7b571bbe4e7255caf1b08
2021-03-29 07:37:34 +00:00