3243 Commits

Author SHA1 Message Date
Steven Moreland
9a7bbf9367 Merge "Parcel: obtain(IBinder) as API" am: e869287a7b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1817684

Change-Id: I2655c1c2b74b0501912fa4e90f5655db682b2932
2021-10-04 21:14:21 +00:00
William Escande
c8852ad54d Merge "Add getActiveDevices api" into stage-aosp-master 2021-10-01 23:50:44 +00:00
Steven Moreland
c861533254 Parcel: obtain(IBinder) as API
There are two main usecases for this:
- provide an alternative route to implement features like markSensitive
  (which requires only 1 function call per class, rather than a
    function call and flag per transaction type)
- support RPC format transactions

Bug: 175814583
Test: atest android.os.ParcelTest, boot, manual
Change-Id: Ibaacc27a125a31e18d4b5889d05d12cc18d05624
2021-10-01 14:51:18 -07:00
Sal Savage
8dafa60a2f Make BluetoothAdapter#disable(boolean persist) a @SystemApi
Bug: 196235708
Test: build, flash car hardware, test basic functionality
Change-Id: I952c3d2ce3b7ec70a384e9a96e172d6ab90c23e8
2021-10-01 18:17:37 +00:00
wescande
c3d0b147f5 Add getActiveDevices api
Bug: 195149213
Test: Manual
Tag: #feature
Change-Id: I0836f7bd0009a49b4db7f08e9f347fe3e1a76f84
2021-10-01 16:30:18 +02:00
Hao Ke
e01e2ae588 Merge "Adding typed Parcel read/write APIs." am: d3199a6084
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1832336

Change-Id: I8a2341eef230f078c53b31a03478fa30e3774147
2021-09-30 21:31:36 +00:00
Hao Ke
d3199a6084 Merge "Adding typed Parcel read/write APIs." 2021-09-30 21:13:54 +00:00
Rahul Sabnis
4a39b54ec1 Merge "Add BluetoothDevice#connect and BluetoothDevice#disconnect as System APIs" into stage-aosp-master 2021-09-30 18:04:55 +00:00
Sam Gilbert
182a0a144e Merge "Fix writeToParcel parameter nullability" am: 55fb62a515
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1840533

Change-Id: Ieabc166af0086501cc638cffa7dc6f5960f67172
2021-09-30 17:24:46 +00:00
Hao Ke
8a86e7d51e Adding typed Parcel read/write APIs.
Description:

Added replacements of `readList`, `readParcelable` and
`readParcelableCreator` APIs.

To avoid unexpected types of objects being unparcelled,
ideally clients would use the readTypedXXX() methods that
take the parcelable creator. However, this won’t be an option
for use cases involving deserializing children objects
inherited from non-final parcelable or serializable objects.
Currently out of ~4k parcelable classes, only ~1.5k
are marked as “final” in the platform. Hence it would be
necessary to introduce new replacements that take
an extra Class<T> parameter and before deserializing
we check that the class written on the wire is the
same or a descendant from the one provided as argument.

Doing so could enhance the security of Parcel deserialization,
More details can be found at go/safer-parcel.

Test: atest -d android.os.cts.ParcelTest
Bug: 195622897
Change-Id: Ie9a4cb4c3d6f1805b14df7b703aef43e2993d459
2021-09-30 16:31:16 +00:00
Rahul Sabnis
d0afc1895a Add BluetoothDevice#connect and BluetoothDevice#disconnect as System APIs
Tag: #feature
Bug: 201462141
Test: Manual
Change-Id: I79332c63e99efd9e90036ba2c693835151cc1240
2021-09-29 23:15:37 +00:00
Sam Gilbert
e3e9e3f6d4 Fix writeToParcel parameter nullability
Test: Existing tests
Bug: 144855352
Change-Id: Id3e0de043eee77e1dadf3b4db5d6d4bddd9e8247
2021-09-29 13:54:34 -04:00
TreeHugger Robot
d7cef086ca Merge "API renaming asked by API Council" into stage-aosp-master 2021-09-29 16:49:50 +00:00
Etienne Ruffieux
4c70432d82 API renaming asked by API Council
Renamed all "cancelled" to "canceled" for PendingIntent.

Tag: #feature
Bug: 201405682
Test: atest android.app.cts.PendingIntentTest#testCancelListener
Change-Id: I0f5457f58836c6e80845dcd4d874a810008a320e
2021-09-29 13:08:09 +00:00
William Escande
ce093d6738 Expose Phone.ENTERPRISE_CONTENT_URI as systemApi
Also add INTERACT_ACROSS_USERS as a requires permission
Bug: 194119078
Tag: #refactor
Test: Build

Change-Id: Iccc093d9224ed34eb76e64561607dac6085cb876
2021-09-28 18:11:33 +02:00
Makoto Onuki
30bd1bb72d Expose PendingIntent.addCancelListener
Bug: 195146423
Test: atest android.app.cts.PendingIntentTest#testCancelListener
Change-Id: I74e6ae49bfb2b31f0bc693d75e1f1433206011ce
2021-09-27 09:35:48 +00:00
Treehugger Robot
a9c6fbdff7 Merge "Make createBond(int) a system API" 2021-09-20 15:52:02 +00:00
Alice Kuo
399c36babb csip: Expose an extra data with intent and store in CachedBluetoothDevice
Bug: 178981521
Bug: 150670922
Test: Discover and pair with the CSIP supported device, and check the
pairing string in the dialog

Merged-In: I3e99c59e0cb974409291e1b4c28393106784e133
Change-Id: I3e99c59e0cb974409291e1b4c28393106784e133
2021-09-18 01:02:32 +00:00
Alice Kuo
e12ff23a6d csip: Expose an extra data with intent and store in CachedBluetoothDevice
Bug: 178981521
Bug: 150670922
Test: Discover and pair with the CSIP supported device, and check the
pairing string in the dialog

Change-Id: I3e99c59e0cb974409291e1b4c28393106784e133
2021-09-17 17:29:11 +00:00
Qasim Javed
d93483f74b Make createBond(int) a system API
BUG: 195156317
Test: Manual

Change-Id: I10d9ac305cbc1bb28c8150e1b167a0e61ad3f04e
Merged-In: I10d9ac305cbc1bb28c8150e1b167a0e61ad3f04e
2021-09-16 22:38:47 +00:00
Qasim Javed
5cebaaa562 Make createBond(int) a system API
BUG: 195156317
Test: Manual

Change-Id: I10d9ac305cbc1bb28c8150e1b167a0e61ad3f04e
2021-09-16 13:07:58 -07:00
Roopa Sattiraju
2ef5e10f45 Merge "Changing BluetoothHeadset APIs from @hide to @SystemApi" 2021-09-15 01:12:09 +00:00
Treehugger Robot
4f564346de Merge "New API for getting enabledcomponent" am: bca93eafe5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818892

Change-Id: I46736aedc7df2d8e6926414adb9b48748386393d
2021-09-14 18:34:16 +00:00
Treehugger Robot
bca93eafe5 Merge "New API for getting enabledcomponent" 2021-09-14 18:18:30 +00:00
wescande
29dbede144 New API for getting enabledcomponent
Bluetooth can no longer call SystemConfig and need to use the manager.

Bug: 190440540
Bug: 199279027
Test: Manual
Tag: #refactor
Change-Id: I065ab407c83cd2edf2244e4170496b0979ac562c
2021-09-14 16:11:19 +00:00
Łukasz Rymanowski
58ad9295c7 csip: Add Coordinated Set Identification Profile
Tag: #feature
Test: atest CsipSetCoordinatorStateMachineTest CsipSetCoordinatorServiceTest
Bug: 150670922
Sponsor: jpawlowski@
Merged-In: I67536ddcc32ace82d63e19426dce19f2bc69cdea
Change-Id: I67536ddcc32ace82d63e19426dce19f2bc69cdea
2021-09-13 19:02:10 +00:00
Jakub Pawlowski
c258dbbb52 Merge "csip: Add Coordinated Set Identification Profile" into stage-aosp-master 2021-09-13 17:35:37 +00:00
Roopa Sattiraju
913ea0a167 Merge "Changing BluetoothHeadset APIs from @hide to @SystemApi" into stage-aosp-master 2021-09-13 16:47:57 +00:00
Łukasz Rymanowski
d35f8bcddc csip: Add Coordinated Set Identification Profile
Tag: #feature
Test: atest CsipSetCoordinatorStateMachineTest CsipSetCoordinatorServiceTest
Bug: 150670922
Sponsor: jpawlowski@
Change-Id: I67536ddcc32ace82d63e19426dce19f2bc69cdea
2021-09-11 08:55:01 +02:00
Roopa Sattiraju
943ac64f97 Changing BluetoothHeadset APIs from @hide to @SystemApi
For isInbandringing API - it is used in the call journey and would
change the behavior(undeterministic) of the call if not used.

Stop/StartScoUsingVirtualVoiceCall is used in the BluetoothShim layer
specifically for testing and mocking in the Android Apps. Seems
reasonable to keep this as a SystemAPI given that it has no params and
unlikely to be changed.

Bug: 195160939
Tag: #feature
Test: Manual
Merged-In: I02b2e7e5e0be3b462f7c25b655e669e2c7fe47eb
Change-Id: I02b2e7e5e0be3b462f7c25b655e669e2c7fe47eb
2021-09-09 15:48:15 -07:00
Roopa Sattiraju
ce1d2e1fb4 Changing BluetoothHeadset APIs from @hide to @SystemApi
For isInbandringing API - it is used in the call journey and would
change the behavior(undeterministic) of the call if not used.

Stop/StartScoUsingVirtualVoiceCall is used in the BluetoothShim layer
specifically for testing and mocking in the Android Apps. Seems
reasonable to keep this as a SystemAPI given that it has no params and
unlikely to be changed.

Bug: 195160939
Tag: #feature
Test: Manual
Change-Id: I02b2e7e5e0be3b462f7c25b655e669e2c7fe47eb
2021-09-09 14:14:12 -07:00
Sarah Chin
2823967c2d Merge "Support getSlicingConfig() API for 5G Slicing Configuration" 2021-09-09 01:57:46 +00:00
Sarah Chin
e34b1b8735 Merge "Expose requestModemActivityInfo" 2021-09-08 16:12:28 +00:00
Jeff Sharkey
c8eb0a1df7 Merge "RESTRICT AUTOMERGE: [MTE] Update manifest IDs to align with NDK." 2021-09-07 22:48:27 +00:00
Hongbo Zeng
9ee89f17e6 Support getSlicingConfig() API for 5G Slicing Configuration
- add getSlicingConfig() API in TelephonyManager and ITelephony
- add Parcelable implmentations for RouteSelectionDescriptor,
  SlicingConfig, and UrspRule
- remove @hide and @SystemApi for TrafficDescriptor and
  NetworkSliceInfo to make them public

Bug: 178075247
Test: .
(1) run "atest TelephonyManagerTest#testGetSlicingConfig" for CTS result
[22/121] android.telephony.cts.TelephonyManagerTest#testGetSlicingConfig: PASSED (956ms)
(2) run "atest RILTest#testGetSlicingConfig" for RILTest result
[17/111] com.android.internal.telephony.RILTest#testGetSlicingConfig: PASSED (1ms)

Change-Id: I0addc2b22c11b13759e890d88f51490993fb72e1
Merged-In: I0addc2b22c11b13759e890d88f51490993fb72e1
2021-09-07 15:37:21 -07:00
Hall Liu
1c8976b843 Expose requestModemActivityInfo
Expose requestModemActivityInfo in TelephonyManager using the Executor +
Consumer pattern, and modify clients to use it.

Test: atest TelephonyManagerTest#testRequestModemActivityInfo
Fixes: 170427831
Change-Id: I7e8134c8058017b888c324a9f85d473fc3cdd8f5
Merged-In: I7e8134c8058017b888c324a9f85d473fc3cdd8f5
2021-09-07 15:30:36 -07:00
Hall Liu
f4fe3ac665 Update and expose ModemActivityInfo
Update ModemActivityInfo to present a nicer API surface and expose it as
a SystemApi. Also change clients in BatteryStats to match the new
surface.

This is part 1. Part 2 will modify the methods in TelephonyManager to
use a more up-to-standards threading model.

Bug: 170427831
Test: atest ModemActivityInfoTest
Change-Id: I762ed949342861c75d94eafce88335e7bd8c9139
Merged-In: I762ed949342861c75d94eafce88335e7bd8c9139
2021-09-07 11:40:55 -07:00
Amit Mahajan
55f3179ce6 Rename SliceInfo to NetworkSliceInfo.
Test: build
Bug: 178498823
Change-Id: Id49bb7122084b08cad78ffd4dd60d7b616d37038
Merged-In: Id49bb7122084b08cad78ffd4dd60d7b616d37038
2021-09-03 12:27:11 -07:00
Jakub Pawlowski
f0307d111e Merge "csip: Add constants for the Coordinated Set Identification Profile" am: 54beaf2012
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807297

Change-Id: I707c1fdd5831763a3bcdfa819e61ea3b01707110
2021-08-30 21:10:26 +00:00
Jakub Pawlowski
54beaf2012 Merge "csip: Add constants for the Coordinated Set Identification Profile" 2021-08-30 20:56:25 +00:00
Treehugger Robot
ce81ce3148 Merge "Adding module permission for SubscriptionManager" am: 116c365563
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1778969

Change-Id: I9e8a4aea7ff0006289000ca0a129fc9886a49223
2021-08-27 17:47:45 +00:00
Treehugger Robot
116c365563 Merge "Adding module permission for SubscriptionManager" 2021-08-27 17:29:58 +00:00
Mitch Phillips
304bb210a2 RESTRICT AUTOMERGE: [MTE] Update manifest IDs to align with NDK.
The NDK is built out of internal *-release branches. Unfortunately, the
internal and external manifest attribute IDs don't currently line up.
As a result, NDK-built apps with memtagMode='[a]sync' won't turn on MTE
on AOSP images, but work in internal images.

We'd like NDK-built apps to work out of the box with AOSP images, and
so let's line up these IDs to fix the silent failure. This is especially
important as testing is mostly done using AOSP-on-QEMU.

RESTRICT AUTOMERGE because this should be an AOSP-only patch.

Bug: N/A
Test: Build the sanitizer test app
(https://github.com/google/sanitizers/tree/master/android) with an MTE
attribute and make sure you crash with MTE errors.

Change-Id: I48a3e08d01508dc6694fefd9563fb7d3f25108a9
2021-08-25 16:04:59 +00:00
Łukasz Rymanowski
c1b80e05e8 csip: Add constants for the Coordinated Set Identification Profile
Bug: 150670922
Tag: #feature
Test: compilation
Sponsor: jpawlowski@
Change-Id: I331fe270b75f306d57a15933ab4afa2e48c8bf50
2021-08-24 08:35:01 +00:00
Treehugger Robot
4cef59a768 Merge "ServiceManager APIs for Wi-Fi mainline module" am: 0ce930a02e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1768620

Change-Id: I2591edfe683ccab7fd482c342dc88630a9561bb4
2021-08-23 19:49:51 +00:00
Treehugger Robot
0ce930a02e Merge "ServiceManager APIs for Wi-Fi mainline module" 2021-08-23 19:25:20 +00:00
Treehugger Robot
95d77312a9 Merge "Add a system api to fetch uuids by the specific transport" 2021-08-23 19:23:26 +00:00
Steven Moreland
ce81994f5f ServiceManager APIs for Wi-Fi mainline module
ServiceManager.waitForDeclaredService and .isDeclared needed for Wi-Fi mainline module.

Test: boot
Change-Id: I9e82dd1a6663396f1c79bc3f27c36711b0b6f3eb
2021-08-20 22:21:35 +00:00
Alice Kuo
21ff734712 Add a system api to fetch uuids by the specific transport
The functionality is similar with fetchUuidsWithSdp which uses TRANSPORT_AUTO. Bt stack depends on the devie type and address type to do sdp or gatt service discovery. Add an api to specific the transport. It would be fexible to handle the dual mode device.

Ignore-AOSP-First: avoid merge conflict
Tag: #feature
Bug: 194447999
Test: atest BluetoothInstrumentationTests
Test: Take two headphone to test the dual mode behavior
Change-Id: I32c8dde68969e0bdc42e4e898c43a4f2c1d3379a
Merged-In: I32c8dde68969e0bdc42e4e898c43a4f2c1d3379a
2021-08-20 16:26:24 +00:00
Treehugger Robot
b2cb2c7994 Merge "Add SharedMemory.fromFileDescriptor" am: d079236881
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1775625

Change-Id: I5464155029ddbc1e8391ae1717bbc91cb48522a3
2021-08-20 05:08:13 +00:00