Age | Commit message (Collapse) | Author |
|
This reverts commit dd85e91cea26c7f706af36c852e79d5b4ca1f173.
Bug: 217366135
Reason for revert: Need this to fix a crash bug in tm-dev
Change-Id: I2a94c278edc0681c5b8af6ea0a0171b71d72c650
(cherry picked from commit dbaf406ccb0ed887d4e93057c9ec0d3457f14457)
Merged-In: I2a94c278edc0681c5b8af6ea0a0171b71d72c650
|
|
This reverts commit 02dcbe72b3564559eaa9c2e2714824e4aac6f18c.
Reason for revert: Causing builds to fail b/237471430
Change-Id: I6165d838abf312085050359377f67a68a5f8b51a
(cherry picked from commit f5dd42bbd05e68f7763ccaa9fae5642acc4ceba1)
Merged-In: I6165d838abf312085050359377f67a68a5f8b51a
|
|
Bug: 217366135
Tag: #feature
Test: manual
Ignore-AOSP-First: to be chery-picked
Change-Id: If8ae530a284151888a3f89a51d2c58f2a5cd3644
(cherry picked from commit 02dcbe72b3564559eaa9c2e2714824e4aac6f18c)
Merged-In: If8ae530a284151888a3f89a51d2c58f2a5cd3644
|
|
Since Bluetooth is becoming a mainline module, it can no longer call the
allowBlocking hidden api.
Instead, all interface are moved to be oneway and use a synchronous data
to handle the return value.
Bug: 200200870
Test: Build + start Bt and play something on speaker
Tag: #refactor
Change-Id: I776a6322faadca1504bce24f2b6b041e756b6448
|
|
Attributable is called by bluetooth and it's hidden.
By copying into bluetooth we are now allowed to call it
Bug: 210467788
Test: build
Tag: #refactor
Change-Id: I73ea07c9439988ab5477c82799f718c6d81513be
|
|
Since developers can use a BluetoothDevice object can make remote
calls, it needs to have an accurate AttributionSource. Previous CLs
had updated many places where these BluetoothDevice instances were
passed across Binder interfaces, but this change updates several
remaining locations which had been missed.
Introduces new "Attributable" marker interface to offer consistent
tooling when applying AttributionSource updates.
Bug: 187097694
Test: atest BluetoothInstrumentationTests
Change-Id: Icad3b9726591f0fbad58a493cefa5a0af7648280
|
|
Wires up AttributionSource across the remaining long-tail of
Bluetooth AIDL interfaces, ensuring that developers can accurately
make calls chained back to a specific Context.
Moves "for data delivery" permission checks to happen in a single
location on each interface to ensure they're performed consistently
with the new AttributionSource arguments. Note that "for data
delivery" isn't the best name; it's designed to represent that the
requested action was performed and should result in the relevant
appop being noted for the caller.
This change has the positive side effect of ensuring that all
interfaces are consistently enforcing the BLUETOOTH_CONNECT
permission, even in the case where BLUETOOTH_PRIVILEGED is also
required; this is what ensures that revoking the "Nearby devices"
permission takes effect for all callers.
Additionally, standardizing on enforcing permissions closer to the
AIDL entry point reduces the need for @RequiresPermission annotations
to be carried around inside the Bluetooth stack.
Bug: 183626112
Test: atest BluetoothInstrumentationTests
Change-Id: I8023dda654e325b8bfa2f0cdb994ad63a2b429d4
|
|
To prepare for future work which will plumb AttributionSource values
through all remaining AIDLs, we need profiles to interact directly
with the specific BluetoothAdapter they were created from. This is
how we'll ensure that the relevant AttributionSource can be chained
down from the original Context they're obtained from.
This change also marks getDefaultAdapter() as deprecated to clearly
communicate that BluetoothManager.getAdapter() is the best-practice
path to obtaining a correctly scoped BluetoothAdapter instance.
Bug: 183626112
Test: atest BluetoothInstrumentationTests
Change-Id: I1e15170d7679019bbb6e396279d6e633e3dad4d6
|
|
This change adds a "BluetoothPermissionChecker" that ensures that
all Bluetooth permission annotations are consistent. In addition, it
verifies that all Bluetooth public APIs have been audited to be
permission protected where relevant.
We've currently standardized on saying that APIs that return device
or Bluetooth state information (without sharing details about any
particular remote Bluetooth device) do not need to be permission
protected.
This change is only annotations and has no behavior changes.
Bug: 183626724
Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true
Change-Id: Ie80b15b058359bf1e9a6ee881b89cb3e5b584ca1
|
|
Recent work has introduced a new "Nearby devices" runtime permission
which protects all existing Bluetooth APIs; we've done this by
defining a <split-permission> to convert the old BLUETOOTH and
BLUETOOTH_ADMIN permissions into one of three new permissions:
* BLUETOOTH_ADVERTISE: Required to be able to advertise to nearby
Bluetooth devices.
* BLUETOOTH_CONNECT: Allows applications to connect to paired
bluetooth devices.
* BLUETOOTH_SCAN: Required to be able to discover and pair
nearby Bluetooth devices.
At its core, this change begins updating the Bluetooth APIs to have
correct @RequiresPermission indicating which permission is actually
enforced internally. To ensure alignment across Binder, the newly
added "RequiresPermissionChecker" Error Prone checker was used to
discover any inconsistencies, ensuring correctness from server-side
enforcement up through to the public APIs.
In addition, since developers will continue building apps for both
modern and legacy platforms, this change introduces new auto-doc
annotations which will emit helpful consistent documentation
describing the behavior of older devices that are still using the
old permission model.
Bug: 183626724
Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true
Change-Id: I02aa127e8e07f239561f4f2a3bbdfc6fccb82f7f
|
|
This is a third CL in a chain that adjusts existing malformed code
to follow AndroidFrameworkBinderIdentity best-practices.
Specifically, if a thread clears an identity they need to restore it
to avoid obscure security vulnerabilities. In addition, the relevant
"try" block must start immediately after the identity is cleared to
ensure that its restored if/when any exceptions are thrown.
Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I74cb958b68d55a647547aae21baff6ddc364859b
|
|
BluetoothHidDevice#setConnectionPolicy
Bug: 148597061
Test: Manual
Change-Id: I03875cb71483d3d6e18795324a7fbea6681fb9b0
|
|
the method in Pbap.
Bug: 147444905
Test: Manual
Change-Id: I308b29d8ce96f9e410a66d59379a731ae12e0478
|
|
* In current design, Bluetooth AdapterState stops all BR/EDR
profiles' service and triggers onServiceDisconnected callback to
all binder clients before BluetoothManagerService invokes
onBluetoothStateChange(false), which means unbind service
would never be called in framework.
* Do unbind service when onServiceDisconnected is invoked.
* Move profile binder logic to BluetoothProfileConnector except:
- BluetoothHeadset: its binder logic is in BluetoothManagerService
- BluetoothPbap: it has an individual ServiceListener
Bug: 129037442
Bug: 129437895
Test: Bluetooth ON/OFF stress test.
adb shell dumpsys activity services | egrep "com.android.bluetooth"
to check whether AppBindRecord for com.android.bluetooth grows
Merged-In: Id0d85866d386962b94d2d966f0a864b1da165d13
Change-Id: Id0d85866d386962b94d2d966f0a864b1da165d13
|
|
Bug: 69136526
Test: test with apps using HID Device profile
Change-Id: If0e49840257c877c975c2da176a08e613668cbc3
(cherry picked from commit 347ef4099e0d2b1334efd22e6ca7d5cc5464b4eb)
|
|
Remove the hidden unplug() API because it is not used and it can cause
the remote device to be unpaired. System apps should use unbond() and
user apps should not use reflection to invoke it.
Bug: 67866553
Test: SL4A
Change-Id: I1bdc06dbb5460c9fd52230b78cbf9434a4349d24
(cherry picked from commit 5d7b3bc09d72e7b24dfffd2d9908dbb154fb0894)
|
|
* Replace bare field usage with getter methods;
* Remove Builder;
* Move BluetoothHidDeviceCallback to inner class;
* Remove toArray() and equals();
* Throw IllegalArgumentException where applicable;
* Add an Executor parameter before Callback;
Bug: 72168436, 72168126
Test: make update-api, make, make sl4a.Common
Change-Id: I13095458bf3ded7a376e8d20fd13df12ef426693
(cherry picked from commit f2f5dc355fa9a962ded0d29368535796aa4116d8)
|
|
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.
This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.
Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
|
|
Bug: 63384609
Test: make
Change-Id: I3b55f7383d2a84162d681ebf3740ddc9e8a55bbb
|
|
Enable the BluetoothHidDevice API in framework.
Bug: 63384609
Test: SL4A HID test; test with apps using BluetoothHidDevice
Change-Id: I52ca4674f11179f865bdff22e0289dfe893c40f5
|
|
a90d21c640 am: d27669b22f
am: f32c163a7d
Change-Id: I31ca6fb738fc840fc27e834e9c90dda7bb7d3a12
|
|
|
|
* Reformat code with google-java-format
* Add the note that When an application is registered, the HID Host service
will be disabled until it is unregistered
* Fix the links in docstring
* Add @hide to unplug(); this is not a public API
Bug: 63384609
Test: make
Change-Id: I5dfcaab58b02c19e5745461c16602064a0ad8b83
|
|
Exempt-From-Owner-Approval: Changes already landed internally
Change-Id: I727a014df2fb05a4b13cb67b1fcb760a8b387523
|
|
Bug: 69981563
Test: HID Device SL4A Test
Change-Id: Ifb7002bb4f3f6f29b01a3d337ab68b674d6947c9
|
|
Bug: 69981563
Test: HID Device SL4A Test
Change-Id: Ifb7002bb4f3f6f29b01a3d337ab68b674d6947c9
|
|
am: 2364431ec8
Change-Id: Ic655da25a4722a49a982dad68621cf4e669af8fe
|
|
am: a89f6150dc
Change-Id: I4b91cd3e528f480ea216e9ffb0414910d4762d3b
|
|
* Add a builder for BluetoothHidDeviceAppQosSettings
* Add documentation for BluetoothHidDeviceAppSdpSettings
and BluetoothHidDeviceAppQosSettings
* Fix the behavior of and BluetoothHidDeviceAppSdpSettings.equals()
and BluetoothHidDeviceAppQosSettings.equals()
Bug: 63384609
Test: test with HID device apps
Change-Id: I933f4ec3034e1f704ddd614e48b76d27fda8b6ff
|
|
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.
Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
|
|
am: b43ac11226
Change-Id: I2731033de8e962fbe0161c715d5689a309772ec3
|
|
am: 21bb474cc3
Change-Id: I84377e882c77b16862b1e049c54e36dc94c78883
|
|
Add Profile Proxy for HID Device Profile.
* Add a helper method doUnbind() to deal with unbinding to Bluetooth HID
Service.
* Fix docstrings.
Bug: 63384609
Test: SL4A Bluetooth HID test
Change-Id: I168c21c3b010baac9889c556635b914c0ba3f267
|
|
am: 3497cf3e65
Change-Id: I2c5da84f5b57496e2a0ef45fb17085670f7465a9
|
|
Make the Bluetooth HID profile name consistent with the Bluetooth HID service
name.
BluetoothInputHost → BluetoothHidDevice
BluetoothInputDevice → BluetoothHidHost
IBluetoothInputHost → IBluetoothHidDevice
IBluetoothInputDevice → IBluetoothHidHost
BluetoothProfile.INPUT_HOST → BluetoothProfile.HID_DEVICE
BluetoothProfile.INPUT_DEVICE → BluetoothProfile.HID_HOST
(Cherry-picked from commit c26c76c63d933f8057f795d05624f91b811c8c71)
Merged-In: Iadb890a54dd3d6868b87514472bbac6bb0c6179f
Bug: 68055651
Test: make
Change-Id: Iadb890a54dd3d6868b87514472bbac6bb0c6179f
|
|
Make the Bluetooth HID profile name consistent with the Bluetooth HID service
name.
BluetoothInputHost → BluetoothHidDevice
BluetoothInputDevice → BluetoothHidHost
IBluetoothInputHost → IBluetoothHidDevice
IBluetoothInputDevice → IBluetoothHidHost
BluetoothProfile.INPUT_HOST → BluetoothProfile.HID_DEVICE
BluetoothProfile.INPUT_DEVICE → BluetoothProfile.HID_HOST
Bug: 68055651
Test: make
Change-Id: Iadb890a54dd3d6868b87514472bbac6bb0c6179f
|
|
We already have BluetoothInputDevice class, so adding something
called BluetoothHidDevice seems confusing. On the other hand,
the new class is designed to connect to HID Host devices, so
naming it BluetoothInputHost makes sense and goes in line with
the existing BluetoothInputDevice.
The same goes for the new constant HID_DEVICE that is just as
confusing to have together with the INPUT_DEVICE one.
This CL also renames the "connection state changed" broadcast
(for the same reasons), declares it as an SDK constant, and also
adds some javadoc to it.
Note that BluetoothHidDeviceApp* classes remained unchanged, as
those correspond to the app that implements the Device (and
connects to the Host).
Test: make
Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
|
|
This patch adds the HID Device Role support in Bluetooth framework.
Also AIDL and callback related files for HID Device role are added
to provide interface for third party applications to communicate with
HID Device Service.
Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2
|