| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Bug: 206121418
Test: Compile
Change-Id: Idb55371e9d678296fe46e5f4231ec2d12ec8b978
|
| |
|
|
|
|
|
|
| |
Tag: #feature
Bug: 195156304
Test: Manual
CTS-Coverage-Bug: 211914959
Change-Id: I13d6f553f5b9d6ca7c2ae9a42450875b16cd1490
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\
| |
| |
| |
| |
| |
| |
| | |
1cdca58b06 am: 82451a9a6c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1922462
Change-Id: I510639073615474d1774991645da87c6f71277dd
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revert "Revert "Hard remove BluetoothHeadset#setPriority System ..."
Revert "Revert "Added removal of BluetoothHeadset#setPriority to..."
Revert submission 16433519-hfp-setpriority-hardremove
Tag: #feature
Bug: 209335798
Test: Manual
Reason for revert: CTS issue fixed
Reverted Changes:
I9de1b07f2:Revert "Complete hard removal of BluetoothHeadset#...
If5d408e8b:Revert "Added removal of BluetoothHeadset#setPrior...
I3c717fad0:Revert "Hard remove BluetoothHeadset#setPriority S...
Change-Id: Id86ba6bd922cd862560a635cc9b8bd79ca0f9d28
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 7407887e0005af63add9aec07242094da5515bd2.
Bug: 209335798
Test: Manual
Reason for revert: Failing signature test that will be updated by paulduffin@
Change-Id: I9de1b07f2d0f4d01d9e3b57a6ddf8a4232db29b6
|
| |/
|
|
|
|
|
|
|
| |
was deprecated in 11 and soft removed in 12
Tag: #feature
Bug: 207702651
Test: Manual
Change-Id: I4dd938e0b6c6394e105deeeaee75f6a5d52f2dbf
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
|
|
| |
We've seen evidence of IBluetoothProfileServiceConnection and
IBluetoothStateChangeCallback references being leaked, so attempt to
unregister them when an object is finalized without closing.
Bug: 189091551
Test: manual
Change-Id: I23792d48d94578acd7fc7a5164a95171801ee721
|
| |
|
|
|
|
|
|
|
|
|
|
| |
As part of the new "Nearby devices" permission work, the
registerStateChangeCallback() API has been relaxed to no longer
require permissions. However, we've discovered that some apps were
depending on that SecurityException being thrown, so this change
restores throwing behavior for those legacy apps.
Bug: 186176507
Test: atest BluetoothInstrumentationTests
Change-Id: Ife536dee246b300ffb3dd78aef0b059a230f3835
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent work has been using Error Prone rules and annotations to
reflect the current state of permission enforcement across the
Bluetooth stack, and we're now in a position were we can add new
permission enforcement that had been missing.
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.
Bug: 183626724
Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true
Change-Id: I53ac7a4fe1dea57316048c3cac4fa237b6ba3d38
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Tag: #feature
Bug: 183551808
Test: Manual
Change-Id: I88745589ec66d3060d24b530fe49fea8926726c6
|
| |
|
|
|
|
|
| |
Bug: 158742305
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
Change-Id: Iec48eba9a29e1cb7c2565e773ae876db662552ef
|
| |
|
|
|
|
|
|
|
|
|
| |
The ACTION_AUDIO_STATE_CHANGED intent action uses the HDP profile,
not the A2DP profile.
Bug: 158742305
Test: m ds-docs-java
Exempt-From-Owner-Approval: Docs-only change
Change-Id: I4358aac8c8aa9fc8b36e517e568e5a9db538555e
(cherry picked from commit fcd519fde9ba4a3fa7c6415685eb03019560df02)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per request from a partner, these APIs will not be restricted as they
are in use. This is conceptually a partial revert of change 5d123b67756.
NoNonSdkCheck: b/170729553
Bug: 171933273
Test: Treehugger
Change-Id: Ibb525e9a9e2fc90248b74f45f3cdcb0be7487c3a
|
| |/
|
|
|
|
|
|
|
|
| |
supports voice recognition as well as echo cancellation and/or noise
reduction via the AT+BRSF bitmask
Tag: #feature
Bug: 172960943
Test: Manual
Change-Id: I40579d9b6d493d2b32fb260983eeb7c79cc0d525
|
| |
|
|
|
|
|
|
|
|
|
| |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
|
| |
|
|
|
|
|
|
|
|
|
| |
SystemApis and for hidden connect/disconnect APIs.
Hide some APIs that were previously marked as @UnsupportedAppUsage and re-add annotation as changing the permissions for these SystemApis would break the unsupported app contract that was previously there. Therefore, we're choosing to hide them until we have a good story on how to deal with them next release.
Bug: 148689314
Test: Manual
Merged-In: I33ee2c7ccd3827db3d23d6447cf82d9ffc36836a
Change-Id: I33ee2c7ccd3827db3d23d6447cf82d9ffc36836a
|
| |
|
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I6ab53570aca580fbee1fcc927871caa09780f58f
Merged-In: I6ab53570aca580fbee1fcc927871caa09780f58f
|
| |
|
|
|
|
| |
Bug: 143244793
Test: Manual
Change-Id: I399a1e0f93cb01c44817604edfcaa8fe5061142f
|
| |
|
|
|
|
| |
Bug: 145005327
Test: Manual
Change-Id: I43ad57feb7dd70f39005ad7a01bc7dac6fb7b639
|
| |
|
|
|
| |
Test: build pass
Change-Id: Ia3834207756afdcc06ccfd7bdc5c91c3e651bebe
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
| |
* Modify BluetoothHeadset so that phoneStateChanged method can
provide caller display name
Bug: 111378831
Test: runtest bluetooth, runtest -x BluetoothPhoneServiceTest.java
Change-Id: Ibc3611a50ec9f103fd235dde606ecbd10657e014
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.bluetooth.le
android.bluetooth
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: Ifcf24c0617acd7facc0e03f30a95c3a6b09b205c
Merged-In: I88a1311e27c5f9a5f9d1035db76034f86f650efc
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AudioService:
* Call setBtScoActiveDevice and setBluetoothScoOn both in AudioService's
broadcast receiver so that these two methods must be triggerred in
the same sequence as ACTIVE_DEVICE_CHANGED and AUDIO_STATE_CHANGED
intents are sent and we no longer need to handle race condition by
synchronously checking active device in setBluetoothScoOn
* Default sco audio mode when no headset is active should be virtual
voice call, as many HFP devices do not accept SCO audio without an
ongoing call
* Synchronize checkScoAudioState() method with mScoClients
* Add helper functions connectBluetoothScoHelper and
disconnectBluetoothScoHelper to call various SCO setup and tear down
methods based on sco audio mode
* Try raw, virtual call, and voice recognition mode when disconnecting
externally started SCO
* Add new sco state SCO_STATE_DEACTIVATING to allow back to back calling
of startBluetoothSco and stopBluetoothSco
Audio Manager:
* Modified AudioManager logic so that removed devices callback is called
before newly added devices
BluetoothHeadset:
* Modified BluetoothHeadset so that start and stop SCO using virtual
voice call no longer need a parameter and will use active device by
default
* Modified documentation around various sco mangement APIs to match
their expected behaviors
Bug: 76114959
Test: VoIP calls sanity test cases
Change-Id: Id50db88f4ff36069b0f392c81dd9d90c24cd2206
(cherry picked from commit 89f979849a5cf2fa4e16d4f24ab41409f16a9956)
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
These constants are used by GMSCore car module via reflection. Make
them system API.
Bug: 67052734
Test: Manual - and using make update-api
Change-Id: I0709c0e0eb9fcb9fb29d575e9b74927a70b2a924
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use BluetoothHeadset.isInbandRingingEnabled() API to check whether
in-band ringing is currently enabled in the system when deciding on
audio routes for ringtone
* Add this as a hidden internal API for system components
Bug: 71646213
Test: make, toggle in-band ringing from Development Settings and observe
whether Telecom service tries to open SCO when there is an
incoming call
Change-Id: I1ef0dd2b54ace7649ddd1f043f0ef5847743a5c4
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Call BluetoothHeadset.setActiveDevice(BluetoothDevice device) to set
a connected HFP/HSP device as active.
2. Listen for BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED intent
that will contain the latest active device (in EXTRA_DEVICE field).
If the active device could not be changed, the EXTRA_DEVICE
field could be null.
3. If setActiveDevice() is NOT in-progress, BluetoothA2dp.getActiveDevice()
can be used. If setActiveDevice() is in-progress, the result is undefined.
4. BluetoothHeadset.setActiveDevice() could be called by some other parts of
the system, so interested parties should always listen for
BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED intents and prepared
for active device updates.
Bug: 68951996
Test: manual
Change-Id: I22ca639a04fed7bf17df59c405ddeda90dafb8ff
|
| |
|
|
|
|
|
|
|
|
| |
There are some number of places where bluetooth APIs are used via
reflection from GMSCore. Add proper annotations.
Bug: 67052734
Test: Manual - and using make update-api
Change-Id: Ib6e3aa1ff5b6f9cdc78367f9be13ed00542d6f65
(cherry picked from commit 64bd35ef2cb40bbf9476a3bf63a763d5a32cc73b)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following hidden API methods are not implemented by the stack and
should be removed:
- getBatteryUsageHint()
- acceptIncomingConnect()
- rejectIncomingConnect()
The following hidden API methods are no longer needed due to lack of
usage and should be removed:
- enableWBS()
- disableWBS()
- bindResponse()
Bug: 70336991
Test: make
Change-Id: I75bd6735573e4cbc61b5bef8722b8badac2e9170
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Binder object may become null between null check and actual invocation
if using a instance private variable assignable by service connection
callbacks
* The solution to this problem without locking is to assign existing
binder variable to a local final variable before the null check
* Any further invocation to a disconnected binder object will result in
RemoteException that is caught by the try-catch block
* Read and write to volatile variable is always atomic and hence thread-safe
* Removed unnecessary synchronization in BluetoothAdapter constructor
* Private mConnection objects should be final
* Simplfied several return statements where booleans can be returned
directly
* Removed unnecessary catches for NPE since there won't be any
Bug: 64724692
Test: make, pair and use devices, no functional change
Change-Id: Ifc9d6337c0d451a01484b61243230725d5314f8e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Manual style corrections with IDE assistance
* Variable name refactors are done through IDE
* Corrected general style errors such as:
- "final private var" -> "private final var"
- "&&", "+", "||" should not be at the end of line
- Non-static private variable should be like "mVar"
- Private static variable should be like "sVar"
- Code file should always end with newline
- Inherited methods should be annotated with @Override
and no @hide tags
- Public methods should always have a JavaDoc entry
- "int[] array" is preferred over "int array[]"
- private methods should be accessed without "this."
when there is no name collisions.
- "boolean ? true : false" -> boolean
- "boolean ? false : true" -> !boolean
- "boolean == true" OR "boolean != false" -> boolean
- "boolean != true" OR "boolean == false" -> !boolean
Bug: 63596319
Test: make checkbuild, no functional changes
Change-Id: Iabdc2be912a32dd63a53213d175cf1bfef268ccd
|
| |
|
|
|
|
|
|
| |
* Automatic style corrections through IDE
Bug: 63596319
Test: make checkbuild, no manual changes, no functional changes
Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
|
| |\
| |
| |
| |
| |
| | |
am: 874af710b7
Change-Id: Id65e6e11308c66893cb701af8909df9fee3a131f
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* Add related constants to BluetoothHeadset
Bug: 35874078
Test: make, test with supporting headsets
Change-Id: I9f49ea28efdf6de0e751a377d879fe13a47655d5
|
| |\|
| |
| |
| |
| |
| | |
am: c79c4240ec
Change-Id: I6aa50e541763adfa9ebe738d98d86152cf0cd1d5
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* Add related constants to BluetoothHeadset
Bug: 35874078
Test: make, test with supporting headsets
Change-Id: Ied089a065bf9caa0d03f681950fefa2ea990bb3e
|
| |\|
| |
| |
| |
| |
| | |
am: 5790bae2f4
Change-Id: I480ef38d5aa61aa153ee53d325e8b249c1eab222
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Per HFP 1.7.1 spec page 102 of 144
EXTRA_HF_INDICATORS_IND_ID should be int
EXTRA_HF_INDICATORS_IND_VALUE should be int
Bug: 35874078
Test: make, PTS test, unit tests
runtest -c com.android.bluetooth.btservice.RemoteDevicesTest bluetooth
Change-Id: Idd316a82bab164b6ea1701bb261b1cc3dee196f1
|
| |\|
| |
| |
| |
| |
| | |
am: ceaccbfe70
Change-Id: Ic3253ef666632aaaffe8e1547dc563cd3bca9e37
|