Commit Graph

109033 Commits

Author SHA1 Message Date
satayev
805f4d7c22 Merge "Revert "[VCN01] Add NOT_VCN_MANAGED capability"" 2021-01-13 17:40:03 +00:00
satayev
0e9334cb80 Revert "[VCN01] Add NOT_VCN_MANAGED capability"
This reverts commit 85e0ad7986.

Reason for revert: b/177411288 broken test

Bug: 177411288
Bug: 175662146
Change-Id: I02a25b83e62ab9a2ed22a98530d62b08de73f56e
2021-01-13 15:04:23 +00:00
Junyu Lai
357893095f Merge "Align coding style of line-wrapping in NetworkCapabilities" 2021-01-13 10:40:43 +00:00
Mathew Inwood
29bf6e8443 Merge "Derestrict some non-SDK APIs." 2021-01-13 09:38:35 +00:00
Chiachang Wang
4bdcbf4608 Merge "[IT4.21] Update the label type of idle timer" 2021-01-13 09:10:43 +00:00
junyulai
cf79261afc Align coding style of line-wrapping in NetworkCapabilities
Test: TH
Change-Id: Ic864524a60954f8dbcce265643c2cb3ac3aefca8
2021-01-13 07:45:18 +00:00
Junyu Lai
82ffaf2ac2 Merge "[VCN01] Add NOT_VCN_MANAGED capability" 2021-01-13 07:44:27 +00:00
Chiachang Wang
c095d60582 Merge "Replace hidden UserHandle.isApp() usage for mainline" 2021-01-13 07:34:49 +00:00
Chiachang Wang
3ce298dff1 [IT4.21] Update the label type of idle timer
The first parameter of adding idle timer is an unique identity
to communicate between ConnectivityService and netd. Netd will
notify the activity change using the identity, so it's fine to
replace the legacy type with transport type since we should
deprecate the usage of legacy type.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ia00606539b86872cca9a92285bd940c8a720a033
2021-01-13 14:10:15 +08:00
Chiachang Wang
6548e1d84f Replace hidden UserHandle.isApp() usage for mainline
ConnectivityService is going to become a mainline module which
is not able to access hidden APIs. NetworkPolicyManager will be
part of connectivity framework sources which should also not
access hidden APIs. Thus, replace usage of UserHandle.isApp()
by public Process.isApplicationUid() instead.

Bug: 170598012
Test: m
Change-Id: I6eecc618d574352b924cb5f33f364e2dca9d730f
2021-01-13 03:23:58 +00:00
junyulai
85e0ad7986 [VCN01] Add NOT_VCN_MANAGED capability
Add new capability to indicate whether a network is
managed by Virtual Carrier Network (VCN). This is needed
to identify networks between VCN managed network and
others. And this capability will be:
  1. mutable
  2. requestable
  3. set by default for network agents and requests
  4. allowed for test networks

Test: 1. atest FrameworksNetTests CtsNetTestCases
      2. adb shell dumpsys connectivity
      3. atest ConnectivityServiceTest#testLoseMutableAndRequestableCaps
Bug: 175662146

Change-Id: Ia5eeb3912a687164fa95d7ba5516fd73abca79ba
2021-01-13 11:05:40 +08:00
Yo Chiang
f2bf58fb9b Merge "Fix DynamicSystemClient.start() exceptions" 2021-01-13 02:35:28 +00:00
Hai Shalom
88baf235a9 Merge "Support for Venue URL and friendly name from Network agent" 2021-01-13 01:54:05 +00:00
Lorenzo Colitti
bbd9fb5c27 Merge changes I3eb82680,I9d6147d9
* changes:
  NetworkWatchlistServiceTests: update IIpConnectivityMetrics.
  Stop using IIpConnectivityMetrics in ConnectivityService.
2021-01-13 00:31:56 +00:00
Treehugger Robot
7facc4ec41 Merge "Revert "OMS: add transactional API"" 2021-01-13 00:00:42 +00:00
Tomasz Wasilczyk
c353781098 Merge "Keep Vehicle internal network always up" 2021-01-12 22:40:50 +00:00
Ryan Mitchell
295e0d7183 Revert "OMS: add transactional API"
This reverts commit ac6bbdb6b0.

Reason for revert: b/177065099

Change-Id: I11d8a498f25b3e734a28f160a6b65c5b5720a38d
2021-01-12 21:09:53 +00:00
Adam Bookatz
da79da08f0 Merge "Add User* OWNERS file (part 2)" 2021-01-12 18:46:24 +00:00
Tomasz Wasilczyk
ab315c597d Keep Vehicle internal network always up
Bug: 171801262
Test: Boot with and without overlay set and check ifconfig
Change-Id: I1fd332caf3e09924abcfec9c2c137363be7873e4
2021-01-12 10:33:38 -08:00
Patrick Rohr
1ab1849ab2 Merge changes I0731fa84,Id31a60ad
* changes:
  Add Restricted Mode handling to NetworkPolicyManager
  Refactor updating rules for all apps in NetworkPolicyManagerService
2021-01-12 17:40:24 +00:00
Lorenzo Colitti
682686bdff Stop using IIpConnectivityMetrics in ConnectivityService.
Currently, ConnectivityService calls the IpConnectivityMetrics
service class directly to log default network events. This is
incompatible with ConnectivityService being in a mainline module.
Replace direct access to IIpConnectivityMetrics with public
methods in IpConnectivityLog, which is @SystemApi class.

The new methods are not yet @SystemApi, but they can be made so
if desired. Alternatively, these metrics could be deleted.

Also remove the IpConectivityMetrics service from the
service-connectivity JAR, and go back to starting it from
SystemServer.java, which is what was happening a few hours ago
before aosp/1542626 was merged.

Test: builds, boots
Test: atest FrameworksNetTests
Test: "dumpsys connmetrics" shows events, including default network events
Change-Id: I9d6147d93590363a2f8f83f39f05c03d001b4851
2021-01-12 23:19:49 +09:00
Patrick Rohr
048bc5ea80 Add Restricted Mode handling to NetworkPolicyManager
Adds Restricted Mode functionality to NetworkPolicyManager. When this
mode is turned on (via setting), only apps with
android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS will be able to
use the network. For all other apps, the network will be blocked by the
firewall. This is controlled by a new allowlist firewall chain
fw_restricted_mode.

As a first step, this implementation still requires a reboot after the
enabling / disabling the mode to take effect. I will provide the dynamic
configuration in the next CL.

Test: atest CtsHostsideNetworkTests && atest
NetworkPolicyManagerServiceTest
Bug: 170322816
Bug: 157505406
Bug: 170322455
Bug: 175281879

Exempt-From-Owner-Approval: Change already merged on internal gerrit.
Change-Id: I0731fa842c69683953baaf9ec3a9a03454f4c607
Merged-In: I0731fa842c69683953baaf9ec3a9a03454f4c607
2021-01-12 11:59:17 +00:00
Paul Hu
158e8ae1f1 Merge "Replace NetworkPolicyManagerInternal#isUidNetworkingBlocked()" 2021-01-12 09:53:05 +00:00
Treehugger Robot
46c82c2739 Merge "[VCN02] Make LingerTimer takes request Id instead of NetworkRequest" 2021-01-12 08:59:04 +00:00
paulhu
cb693f8e2c Replace NetworkPolicyManagerInternal#isUidNetworkingBlocked()
Connectivity service is going to become a mainline module which
will not able to access hidden APIs. NetworkPolicyManagerInternal
is a internal serivce that CS can't be access after be a mainline
module. Thus, replace NPMI#isUidNetworkingBlocked() to similar
method NPMS#isUidNetworkingBlocked() and create new API
NPM#isUidNetworkingBlocked() to support CS usage.

Bug: 170598012
Test: atest FrameworksNetTests
Test: atest FrameworksCoreTests:NetworkPolicyManagerTest
Test: atest FrameworksServicesTests:NetworkPolicyManagerServiceTest
Test: atest CtsNetTestCases
Test: atest CtsHostsideNetworkTests
Change-Id: Ic3427c71c395de787320f303c9513874b4d64f98
2021-01-12 10:53:05 +08:00
Hai Shalom
ef5f5b1ea7 Support for Venue URL and friendly name from Network agent
Extend CaptivePortalData with a member to hold the venue friendly
name. If CaptivePortalData is initialized by both the network
agent and Capport, merge the two objects to include the venue
friendly name and prioritize the venue URL from the network
agent.

Bug: 162783305
Test: atest ConnectivityServiceTest
Test: atest CtsNetTestCasesLatestSdk:CaptivePortalDataTest
Test: End-to-end test
Change-Id: I4fdf356be42237c5b6c0ae5bacfd3cec4726861b
2021-01-11 18:45:34 -08:00
Adam Bookatz
6cd4cd01fb Add User* OWNERS file (part 2)
Part 1 was aosp/1546301.
Two parts are required due to b/175318571.

Test: N/A
Change-Id: I1a89f7d26da70dce36d1e891a8e8ebc4042dc56c
2021-01-12 01:03:39 +00:00
Jing Ji
3d4e998ee6 Merge "Add OWNERS coverage in package android.app" 2021-01-11 23:57:04 +00:00
Treehugger Robot
08763cddab Merge "Add additional biometrics OWNERS" 2021-01-11 23:46:09 +00:00
Kevin Chyn
835f50b21a Add additional biometrics OWNERS
Test: Builds
Change-Id: Ief8ea06dcc5803298294c639956cdfa97fa8be10
2021-01-11 13:43:29 -08:00
Łukasz Rymanowski
9bf1c7c57c gatt: Allow to set eatt support
With this patch it is possible to enable eatt_support as a GATT Client
or GATT Server.

Tag: #feature
Bug: 159786353
Test: manually verified against device supporting EATT
Sponsor: jpawlowski@
Change-Id: I6835a2bbd1b0ab9d6d64ee2bac5dfc96c0563afd
2021-01-11 20:49:56 +01:00
Benedict Wong
20bfe66a02 Merge changes I3b769562,I63203188,Ia9396d66,Ifec34fad
* changes:
  Pull VcnNetworkProvider out into a separate class
  Verify carrier privileges for VCN-providing packages
  Add TelephonySubscriptionTracker to VcnMgmtSvc
  Add basic VcnMgmtSvc --> Vcn signals (startup, teardown, NetworkReq)
2021-01-08 22:29:40 +00:00
Treehugger Robot
022ba65d34 Merge "Add control functions to RangingSession" 2021-01-08 21:45:47 +00:00
Treehugger Robot
ae4301b9ec Merge "Bluetooth: Implement API to get device identification information" 2021-01-08 21:42:32 +00:00
Treehugger Robot
494a17f573 Merge "Add OWNERS files for app hibernation" 2021-01-08 18:51:25 +00:00
Junyu Lai
2960af3978 Revert "wifi: Add systemAPi:setSubscriberId in NetworkAgentConfig"
This reverts commit 7521c2277a.

Reason for revert: After discussion, we prefer to add a field in NetworkCapabilities instead. Sorry for inconvenience.

Change-Id: I2e8840a797df9d1594f2b8b576bcd45beb184fca
2021-01-08 19:22:28 +08:00
Treehugger Robot
5b322f10be Merge "Pivot network statistics to use DataInput/Output." 2021-01-08 10:33:16 +00:00
Treehugger Robot
80df223aed Merge "Add team members to biometric OWNERS" 2021-01-08 04:20:25 +00:00
Fei Zheng
62d30f1a08 Bluetooth: Implement API to get device identification information
Submitted on behalf of a third-party: Samsung System LSI

License rights, if any, to the submission are granted solely by the
copyright owner of such submission under its applicable intellectual
property.

Copyright (C) 2015 Samsung System LSI
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Third Party code includes additions/modifications from Qualcomm Innovation Center, Inc.

Call BluetoothDevice.sdpSearch(BluetoothUuid.DIP) to search DIP information,
and receive intent BluetoothDevice.ACTION_SDP_RECORD to get SdpDipRecord from
BluetoothDevice.EXTRA_SDP_RECORD

Bug: 141666056
Test: atest BluetoothInstrumentationTests
Sponsor: alainv@
Tag: #feature

Change-Id: I82d0979b77d28ec36fde6616622d216a28310b4a
2021-01-08 10:59:46 +08:00
Kevin Chyn
8777a4dda3 Add team members to biometric OWNERS
Test: Presubmit
Change-Id: I0b503756a60fc8dcaaf8bcd1f1fa13628b2b9b75
2021-01-07 17:56:19 -08:00
Benedict Wong
9cb5807845 Verify carrier privileges for VCN-providing packages
This change adds and verifies packages in the VcnManagmentService,
ensuring that carrier privilege gain/loss correctly starts/tears down
VCN instances.

Bug: 163431877
Test: atest FrameworksNetTests
Change-Id: I63203188c57fdde1cfc58aaf1108aa3e70eb4a50
2021-01-07 17:13:37 -08:00
Les Lee
6ae2535ec6 Merge "wifi: Add systemAPi:setSubscriberId in NetworkAgentConfig" 2021-01-08 00:54:51 +00:00
Kevin Han
2a5c2ee653 Add OWNERS files for app hibernation
Add OWNERS in services/core/java/com/android/server/apphibernation for
system service code and core/java/android/apphibernation/OWNERS for
client-facing code.

Bug: 175829330
Test: builds
Change-Id: I76d95309b641d9e75e68a50c6563df9f95b9c142
2021-01-07 14:55:00 -08:00
Brian Stack
674c30d330 Add control functions to RangingSession
Adds start, stop and reconfigure functions to UWB's RangingSession
along with associated callbacks in RangingSession.Callback.

This change also modifies the UwbManager.openRangingSession function
to only open a ranging session and not actively start ranging. In
order to start ranging, use RangingSession.start() once
RangingSession.Callback.onRangingOpened has been called.

The Ranging Session API now consists of:
  UwbManager.openRangingSession
  RangingSession.start
  RangingSession.stop
  RangingSession.reconfigure
  RangingSession.close

Bug: 173799002
Bug: 170323306
Test: atest UwbManagerTests
Change-Id: I4cc7fbc1bb1cd3b0e75aa9cc57a1ad59d39d6f50
2021-01-07 13:25:39 -08:00
Treehugger Robot
9e1690609b Merge "Update deprecated link to RecyclerView" 2021-01-07 20:13:51 +00:00
Treehugger Robot
1fb7770381 Merge "Introduce public APIs to check whether a remote bluetooth headset supports voice recognition as well as echo cancellation and/or noise reduction via the AT+BRSF bitmask" 2021-01-07 17:55:04 +00:00
Lorenzo Colitti
5a5613209d Merge changes Iec22ff63,Iaca8a7cc
* changes:
  Stop using VPNs in getDefaultNetworkCapabilitiesForUser.
  Inform ConnectivityService about always-on VPN lockdown.
2021-01-07 16:31:58 +00:00
Ryan Mitchell
b9ba6a8d0f Merge changes from topic "oms-transactional-api"
* changes:
  OMS: add tests for the OMS transactional API
  Push OverlayDeviceTests onto /system
  OMS: add transactional API
  OMS: block until settings are persisted
  OMS: replace OMSImpl.OverlayChangeListener with return values
  OverlayDeviceTests: add missing TEST_MAPPING
2021-01-07 15:48:20 +00:00
Jeff Sharkey
6173852165 Merge "update owners for shortcut and launcher related files" 2021-01-07 14:50:03 +00:00
Andrei-Valentin Onea
29ed176b46 Merge changes from topic "preinstall-overrides"
* changes:
  Add force_non_debuggable_final_build_for_compat
  Allow overriding compat config prior to install time.
2021-01-07 14:04:12 +00:00