Policies of silence mode:
1) If an active device (for A2DP or HFP) enters silence mode,
the active device for that profile will be set to null.
2) If a device exits silence mode while the A2DP or HFP active
device is null, the device will be set as the active device
for that profile.
3) If a device is disconnected, it exits silence mode.
4) If a device is set as the active device for A2DP or HFP,
while silence mode is enabled, then the device will exit
silence mode.
5) If a device is in silence mode, AVRCP position change event
and HFP AG indicators will be disabled.
6) If a device is not connected with A2DP or HFP, it cannot
enter silence mode.
Bug: 112323989
Test: Manual, runtest bluetooth
Change-Id: If7f340de38c350f17c37f00a3a2e871876baa20d
Add the new public Android APIs for the ASHA Hearing Aids Profile.
Bug: 119617521
Bug: 120222233
Test: Run with the new HearingAidProfileTest CTS test
Change-Id: I05fc3d565bd22b5000765122da7714d961dbc15b
The getProfileProxy will return false if Hearing Aids Profile is not
supported. Also the getSupportedProfiles will return the correct support
for Hearing Aids even when Bluetooth is disabled.
Test: Manual testing with configuration enabled and disabled.
Bug: 119617521
Change-Id: I146bd3bc36d4c474f7bca18a05b679fb8e70ca63
* Mark all BluetoothHealth related APIs as deprecated
* Make BluetoothAdapter#getProfileProxy(context, BluetoothProfile.HEALTH)
always return false
* Remove all logic behind BluetoothHealth APIs and add deprecation error log
* Health Device Profile (HDP) and MCAP protocol has been largely
replaced by BLE. New applications should use Bluetooth Low Energy
instead of legacy Bluetooth Health Device Profile
Bug: 111562841
Test: make, unit test, use Bluetooth
Change-Id: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892
Merged-In: If99a9d79e9e1b89b75b9b74bd3b1c965247a1892
(cherry picked from commit 2be70a11a2)
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
Fix the doc - intent BluetoothDevice.ACTION_UUID requries
android.Manifest.permission#BLUETOOTH_ADMIN instead of #BLUETOOTH to
receive. This is already enforced by Bluetooth service.
Bug: 113160320
Test: manual
Change-Id: I977d58e6d534f512da80bd6b13bebb515765626f
* Modify BluetoothHeadset so that phoneStateChanged method can
provide caller display name
Bug: 111378831
Test: runtest bluetooth, runtest -x BluetoothPhoneServiceTest.java
Change-Id: Ibc3611a50ec9f103fd235dde606ecbd10657e014
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
Synchronizing on a field doesn't lock the object in a predictable way.
Bug: 63389270
Test: Compile
Change-Id: Idd3111bc94d32bc4bb320a5c25da37fe68276337
Expose the LE Connection-oriented Channels APIs for applications to use.
Test: Run the SL4A ACTS test: BleCocTest
Bug: 70683224
Change-Id: I68128bc7154966ec065091c973351f8892da9b4d
Adding service solicitation uuid feature in
scan filter, So BLE Scanner can set scan filter for
advertising packets that includes the Service Solicitation
uuid, which can be one of the below types.
- List of 16 bit Service UUIDs
- List of 32 bit Service UUIDs
- List of 128 bit Service UUIDs
Test: BLE Scanner can do filter scan for advertising packets that
includes the Service Solicitation uuid.
Bug: 78483310
Change-Id: I3d83c50e446fca06a76db002dad716759c145d6e
After user switched, Bluetooth process will be restarted to run as
secondary user and some system process like AudioService keeps as
primary user. When BluetoothA2dp did rebind, it still used primary UID
for those system process and caused they could not invoke A2DP APIs.
This changes to use current user ID when rebinding to A2dpService and
system process can get correct A2DP proxy after user switched.
Bug: 112469503
Test: manual
Change-Id: If5ee945b0dcf2044ef2baedd762751fa6ef3d09a
Added a note in the Android API documentation for stopScan to make sure
that the flag FLAG_CANCEL_CURRENT is not used when creating the
PendingIntent parameter.
Bug: 77658091
Test: Just compile since not logic is changed
Change-Id: I55f33ae68679310ba4899708a2072a40fea0b3b4
This method is being used the Android Things instrumentation test apk.
Bug: 111654175
Test: tests pass
Change-Id: Id3fcd2d89789868e50048542fd1dfe25d9986103
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 89f979849a)
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
Creates the hidden BluetoothAdapter APIs which can be used to
control IO capability settings on the local Bluetooth device.
Bug: 36015413
Test: Used a test activity to control getting/setting the value and
attempting pairing.
Change-Id: Ibbfdc5ae5a1d56c6e3d003ab3bf5d095dcb583e4
(cherry picked from commit 6043b7b90a27a836241bfc05e71eb46ce04c66cf)