Commit Graph

210 Commits

Author SHA1 Message Date
Zach Johnson
75da9f9f27 Merge "Dynamic Audio Buffer (1/3)" 2021-01-21 17:28:17 +00:00
Treehugger Robot
2a0f125d7d Merge "Add MANAGE_TEST_NETWORKS to system API" 2021-01-21 06:41:04 +00:00
Remi NGUYEN VAN
24ea1e0377 Merge "Mark TestNetworkManager as module API" 2021-01-21 06:02:25 +00:00
Zoey Chen
e61da845fa Merge "[PhysicalChannelConfig] Deprecated getChannelNumber and implement relevant API" 2021-01-21 04:29:58 +00:00
Remi NGUYEN VAN
8700d3345b Mark TestNetworkManager as module API
The API surface is planned to move to the Connectivity module, meaning
that it will be maintained across multiple Android releases.
This is incompatible with TestApi semantics, which are designed to be
removable across releases. Effectively the APIs become System/module
API, so mark them as such considering that TestApi is not supported by
modules.

Test: m
Bug: 174436414
Change-Id: Icd32fcbb65e9a4bb2b67cb9da7c971281be0781a
2021-01-21 10:45:04 +09:00
Peter Wang
795478a020 Merge "Add an API for LPA (SIM Manager) to bring up pages related to managing SIM profiles." 2021-01-21 00:35:24 +00:00
Treehugger Robot
66e56014df Merge "Added setAlwaysOn feature" 2021-01-20 19:13:43 +00:00
More Kuo
2883a293e8 Dynamic Audio Buffer (1/3)
Add APIs in BluetoothA2dp to:
1. Get the supported type of the dynamic audio buffer.
2. Get the dynamic audio buffer millis.
3. Set dynamic audio buffer millis.

Add BufferConstraints class to access the buffer millis of different
codec.

Bug: 163968696
Tag: #feature
Test: Run dynamic audio buffer test
Change-Id: If097d94be861dbb0c4d8f67fe7caf70a99093e34
2021-01-20 14:35:22 +08:00
George Chang
a0f9f4b73b Added setAlwaysOn feature
Add setAlwaysOn() system api.
This API is used to request that the NFC service
shall kept controller state on.

Add isAlwaysOnEnabled() system api.
This API is used to check setAlwaysOn is enabled or not.

Add isAlwaysOnSupported() system api.
This API is used to check setAlwaysOn is supported or not.

Bug: 176212892
Test: manual
Change-Id: If7ece9730c57838d870bb70cb2725919e75ef6c2
2021-01-20 03:18:06 +00:00
lifr
6e6149c471 Deprecated IP connectivity metrics system api
- In order to easily maintain the connectivity service.
Refactor the connectivity service by removing all legacy
metrics code & API.
- The commit will deprecate legacy metrics system api.
(The legacy metrics code will be removed in a separate commit.)
Therefore, those legacy metrics event may not be sent in
Android S and above.

Bug: 177043087
Test: atest ConnectivityServiceTest
      atest IpConnectivityMetricsTest
      atest ConnectivityServiceIntegrationTest
Change-Id: Ia057776869a7d38041b6eaf17904f6c54a7b4fca
2021-01-20 02:06:18 +00:00
Junyu Lai
b380466d29 Merge "Revert "[VCN06] Support request background network"" 2021-01-19 10:24:47 +00:00
Junyu Lai
854241172b Revert "[VCN06] Support request background network"
Revert submission 1545847-vcn06

Reason for revert: b/177876289 presubmit failure
Reverted Changes:
I8042ce197:[VCN06.1] Add CTS for request background network
If9aaa87b7:[VCN06] Support request background network

Change-Id: I9270b02a2d6d1ffcdd83b4f41becaf09a2b91e0a
2021-01-19 09:06:00 +00:00
Junyu Lai
a18490bdde Merge "[VCN06] Support request background network" 2021-01-19 01:04:20 +00:00
Treehugger Robot
0dcf4de7df Merge "Make BugreportManager a public API that respects carrier privileges." 2021-01-19 00:21:25 +00:00
Rambo Wang
14927330cd Introduce SignalStrengthUpdateRequest to customize signal update request
Privileged apps can send the request through TelephonyManager APIs
(in following CL) to monitor signal strength change with interested
RAN/SignalMeausrementType/Thresholds.

Bug: 164432835
Test: atest com.android.internal.telephony.SignalStrengthUpdateRequestTest
Change-Id: Ifba384108b6627e4b808be34e6d828c93e8df995
2021-01-18 08:46:42 -08:00
Zoey Chen
82e3bca9dd [PhysicalChannelConfig] Deprecated getChannelNumber and implement relevant API
1. Implement new API:
    #getUpLinkFrequency
    #getDownLinkFrequency
    #getBand
    #getChannelNumberUplink
    #getChannelNumberDownlink
    #getCellBandwidthUplink
2. Have mapping tables for converting frequency range
if getFrequencyRangeGroupFromXXXBand is unknown.
   NR-ARFCN, E-UTRA, UTRA and Geran
3. Get the frequency from the band
    #getFrequencyRangeGroupFromXXXBand

Bug: 162300897
Test: manual
Change-Id: I44101653659d2b5d593a2b06be6567e0d0ef433f
Merged-In: I44101653659d2b5d593a2b06be6567e0d0ef433f
2021-01-18 13:00:30 +00:00
Remi NGUYEN VAN
38b5060d66 Add MANAGE_TEST_NETWORKS to system API
The system and particularly mainline modules need to reference the API
constant so they can verify that callers have the permission.

Bug: 174436414
Test: m
Merged-In: I9f41f888fbd4b7605d750110b345005a5cba85d1

Change-Id: I9f41f888fbd4b7605d750110b345005a5cba85d1
2021-01-18 17:45:10 +09:00
junyulai
d4d56da595 [VCN06] Support request background network
This will be mainly used by VCN management service which will
need to hold the networks but preserve the backgrounded-ness
of the networks.

Test: android.net.ConnectivityManagerTest#testRequestType
Test: android.net.cts.ConnectivityManagerTest#testRequestBackgroundNetwork /
      --rerun-until-failure 100
Test: ConnectivityServiceTest#testBackgroundNetworks
Test: m -j doc-comment-check-docs
Bug: 175662146
Change-Id: If9aaa87b7e71c2b695ac7b08858850e975b28bb6
2021-01-18 16:32:08 +08:00
Rambo Wang
a40d0d19f1 Merge "Expose SignalThresholdInfo as public class" 2021-01-16 01:53:15 +00:00
Hunter Knepshield
30e7b64d9c Make BugreportManager a public API that respects carrier privileges.
This permission model is only allowed for BUGREPORT_MODE_TELEPHONY to
let carrier apps (even from the Play Store / not pre-loaded) access
BugreportManager to trigger connectivity bugreports.

This also requires SELinux policy changes to allow non-system apps to
get an instance through Context#getSystemService, and then dumpstate
also needs permissions to write public apps' files.

Minor documentation and formatting fixes as well.

BYPASS_INCLUSIVE_LANGUAGE_REASON=leaving variable name derived from
"bugreport-whitelisted" sysconfig alone for now

Bug: 161393541
Test: atest CtsCarrierApiTestCases:BugreportManagerTest
Change-Id: I5a38e7a040fa23146fa6c1e785db102b066ad167
Merged-In: I5a38e7a040fa23146fa6c1e785db102b066ad167
(cherry picked from commit 57fd3440be)
2021-01-15 17:35:45 -08:00
Zoey Chen
3521a14be4 Merge "[Telephony] PhoneStateListener redesign for new event" 2021-01-16 00:56:51 +00:00
Peter Wang
9e1f4ec8c3 Add an API for LPA (SIM Manager) to bring up pages related to managing SIM profiles.
Bug: 170507492
Test: Build
Change-Id: I8a2c4e86cb3ffd6ef0dac03ec2e4968839202e7d
Merged-In: I8a2c4e86cb3ffd6ef0dac03ec2e4968839202e7d
2021-01-15 11:15:19 -08:00
Henry Fang
abf0168d4a Merge "Add pause and resume recoding APIs" 2021-01-15 17:53:46 +00:00
Kyeongkab.Nam
5c92bdb2d6 Add pause and resume recoding APIs
When a program is inserted during recoding(ex. Flash News), some
applications want to pause that temporary.
Add pause and resume recording feature so that it permits to tune on
pause status while recoding.

Bug: 172029807
Test: run cts -m CtsTvTestCases -t
android.media.tv.cts.TvInputServiceTest

Change-Id: Ib11ae5d3eddcd01dbd48efa58fb2d4011040b210
Merged-In: Ib11ae5d3eddcd01dbd48efa58fb2d4011040b210
2021-01-15 01:33:26 +00:00
Rambo Wang
ddf5bc0160 Expose SignalThresholdInfo as public class
Expose the fields and methods for application to specify
the customized signal update request.

Bug: 164432835
Test: atest com.android.internal.telephony.SignalThresholdInfoTest
Change-Id: I879efb2e6b4366e96059973cf4264e4192c1cf29
2021-01-14 16:51:45 -08:00
Grace Jia
096b7d4a25 Merge "Add new phone number match method." 2021-01-14 21:51:55 +00:00
Shuo Qian
f1273df6cc Merge "Support call composer status that disabled the picture sending" 2021-01-14 20:49:43 +00:00
Roshan Pius
d3ee5559ed Merge "NetworkCapabilities: Embed location senstive TransportInfo" 2021-01-14 15:38:15 +00:00
Lorenzo Colitti
c5f2057d02 Merge changes I28e39400,Ibada8b42
* changes:
  UserManager restricted profile SystemApis
  Improve testing of CONNECTIVITY_ACTION broadcasts.
2021-01-14 10:39:48 +00:00
Zoey Chen
041679fa9a [Telephony] PhoneStateListener redesign for new event
1. Add int EVENT_* and expose these as @SystemApi
 2. Add listener interface
 3. Deprecated LISTEN_*
 4. un/registerPhoneStateListener
 5. get event from event listener
 6. Add event to list

Test: manual and
atest TelephonyManagerTest#testRegisterPhoneStateListener
atest TelephonyManagerPermissionTest
atest CtsTelephonyTestCases:PhoneStateListenerTest
atest TelephonyRegistryManagerTest
atest CtsTelecomTestCases:android.telecom.cts.IncomingCallTest
atest CtsTelecomTestCases:android.telecom.cts.OutgoingCallTest

Bug: 167684594
Change-Id: Id89a541745fb8700e1ebd2cc162ee55cd1055661
Merged-In: Id89a541745fb8700e1ebd2cc162ee55cd1055661
2021-01-14 16:58:33 +08:00
Adam Bookatz
81762facae UserManager restricted profile SystemApis
Makes two new SystemApis:
getRestrictedProfileParent()
canHaveRestrictedProfile()

Temporarily disables VPN Tests that rely on the old APIs until those
tests are updated (b/175883995).

Bug: 171529940
Test: atest FrameworksNetTests:com.android.server.connectivity.VpnTest
Test: Tests for UserManager SystemApis are TODO awaiting completion of new user test infrastructure (b/163890431)
(cherry picked from commit 20ba13f5bc)
Change-Id: I28e39400039631e7d391dc7b0d003e8a38d1f06a
2021-01-14 17:39:13 +09:00
Grace Jia
6194382d75 Add new phone number match method.
Test: atest CtsTelephonyTestCases
Bug: 174028667
Change-Id: I7b9d8f6dca6af37007a577796b4c46f010c2b23c
2021-01-13 16:01:24 -08:00
Treehugger Robot
7ae76a2f3f Merge "Add feature flag for app hibernation." 2021-01-14 00:01:19 +00:00
Shuo Qian
5321bad867 Support call composer status that disabled the picture sending
Test: cts
Bug: 173437870
Change-Id: Ib6ea41b56797d871cf38e7386428f84ce8438803
2021-01-13 20:13:17 +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
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
Roshan Pius
bf91915801 NetworkCapabilities: Embed location senstive TransportInfo
Changes:
i) Add a new constructor for NetworkCapabilities which accepts whether
location sensitive fields need to be parceled or not. Defalts to false
on the other constructor. This boolean should only be set on the copy of
NetworkCapabilities when sent to apps that hold location permission.
(Similar to how sensitive fields are handled in LinkProperties)
ii) Add a new makeCopy() method in the TransportInfo interface which
accepts whether location sensitive fields need to be parceled or not.
iii) Migrate the existing NetworkCapabilities owner UID masking to use
this new mechanism (instead of existing masking in ConnectivityService).
iv) Always set parcelLocationSensitiveFields to true in the NetworkAgent
surface (since that is a privileged surface from the transports to the
connectivity service)
v) Add a hasSensitiveFields() in TransportInfo interface to avoid
perfoming location permission checks for location insensitive
TrasnsportInfo.

Also, migrate to the new SdkLevel util for isAtLeastR() & isAtLeastS()
checks.

Bug: 162602799
Test: atest android.net
Test: atest com.android.server
Change-Id: Ie522d8c75a82ae521ccfd5165823d0c72642e651
Merged-In: Ie522d8c75a82ae521ccfd5165823d0c72642e651
2021-01-13 02:25:49 +00:00
Hai Shalom
88baf235a9 Merge "Support for Venue URL and friendly name from Network agent" 2021-01-13 01:54:05 +00:00
James Lin
5b51530d0d Merge "[RCS UCE] Expose the RCS UCE publishing device's capabilities APIs" 2021-01-13 00:33:57 +00:00
Tomasz Wasilczyk
c353781098 Merge "Keep Vehicle internal network always up" 2021-01-12 22:40:50 +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
James.cf Lin
50c18c12c6 [RCS UCE] Expose the RCS UCE publishing device's capabilities APIs
The RCS publishing device's capabilities APIs are exposed to be the SystemAPI and add the CTS for these APIs.

bug: 174187744
Test: atest -c CtsTelephonyTestCases:android.telephony.ims.cts.ImsServiceTest
Change-Id: I731dbe64614b91efa0002ffccb638b4a10f7c5f4
2021-01-12 10:56:41 +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
Kevin Han
f62a11079f Add feature flag for app hibernation.
Add feature flag for app hibernation so that we can begin implementing
behind a feature flag.

We use DeviceConfig as per instructions at go/android-flags-setup so
that we may eventually roll this out to dogfood devices using P/H and
Mendel.

Bug: 175829330
Test: Builds
Change-Id: I5c140ee6b20c887c9513f76254f752b1a9455a8a
Merged-In: I27b4bdd9b6ed25b06fc685183f0dc872094f1b5c
2021-01-11 13:46:33 -08:00
Treehugger Robot
ae4301b9ec Merge "Bluetooth: Implement API to get device identification information" 2021-01-08 21:42:32 +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
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
Les Lee
6ae2535ec6 Merge "wifi: Add systemAPi:setSubscriberId in NetworkAgentConfig" 2021-01-08 00:54:51 +00:00
Shuo Qian
077cefb9a9 Merge "Add Setting API to set/get enriched calling with call composer user option" 2021-01-07 18:32:44 +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