summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothCodecStatus.java
AgeCommit message (Collapse)Author
2022-03-08Hide Bluetooth codec classes constructorsEtienne Ruffieux
Added BluetoothCodecStatus Builder and hid constructor. Hid BluetoothCodecConfig constructor. Bug: 222540543 Bug: 222539659 Test: atest BluetoothCodecsTest Tag: #feature Change-Id: I6836e31ed4a689fb327b3ad94ab5df7d144da06a
2021-12-03Make BluetoothCodecConfig and BluetoothCodecStatus public.Etienne Ruffieux
Made BluetoothCodecConfig and BluetoothCodecStatus public, added Builder to BluetoothCodecConfig, added accessor for SOURCE_CODEC_TYPE_MAX and changed Arrays returns to List. Tag: #feature Bug: 200202780 Bug: 170678351 Test: BluetoothCodecConfigTest & BluetoothCodecStatusTest NoNonSdkCheck: Only user actually requested the changes Change-Id: Ic61b7087f53f45781f7e0eecca8b6d983093a22d
2020-11-21De-restrict BluetoothCodecStatus hidden APIs.Mathew Inwood
They were erroneously included in b/170729553 but should not have been. Tag: #feature Test: Manual Change-Id: Ia3bd3b55de19a89d41a025dc0e03dec850c1ab07
2020-10-29Add maxTargetSdk restriction to unused APIs.Mathew Inwood
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. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
2020-10-28Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang
This reverts commit bc9a809f18a3b0ec23cbc39802fb4928c2074ea3. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
2020-10-27Add maxTargetSdk restriction to unused APIs.Mathew Inwood
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 Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
2020-10-15Add @Nullable annotation to the parameter of Object.equals() methods.Roman Kalukiewicz
Those annotations could be inferred by some tools (like Kotlin), but the https://checkerframework.org/ doesn't check inherited annotations complaining about all equals() invocations that get nullable argument. The change was generated by running find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /' in the frameworks/base directory and by automatically adding and formatting required imports if needed. No manual edits. Bug: 170883422 Test: Annotation change only. Should have not impact. Exempt-From-Owner-Approval: Mechanical change not specific to any component. Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
2020-09-22Move all BluetoothCodecConfig and BluetoothCodecStatus APIs moved fromRahul Sabnis
the non-SDK API list to the blocklist in Android 11 back to the non-SDK API list. Tag: #feature Bug: 168812851 Test: atest BluetoothHostTest#testCodecMethodsAccessible Change-Id: I29983284b1a1c271d983c99b286e204604abdc72
2020-03-21Add BLUETOOTH_PRIVILEGED permission as a requirement for all new Bluetooth ↵Rahul Sabnis
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 Change-Id: I33ee2c7ccd3827db3d23d6447cf82d9ffc36836a
2019-12-06Resolve BluetoothA2dp hidden APIs to resolve dependenciesRahul Sabnis
Bug: 143240341 Test: Manual Change-Id: Ib55e0fb106fa7b91ef4d3559da12ea2c048f1ae5
2019-07-29Merge "Add helpers to check whether the BluetoothCodecConfig instance is ↵Cheney Ni
selectable" am: ed6755fa55 Change-Id: I7718d3f12541bcbb005f7e1930267a1393f9b19a
2019-07-23Add helpers to check whether the BluetoothCodecConfig instance is selectableCheney Ni
There will be a helper in the BluetoothCodecStatus to check whether the codec config is matched the selectable array. It uses 3 smaller helpers to confirm the codec config has none (wildcard matching), or one and only one value for the audio feeding parameters. Besides, this CL also adds a helper to compare whether two codec configs are similar or not, and uses NONE values as wildcard. Bug: 131147224 Bug: 133719424 Test: atest -t BluetoothInstrumentationTests:com.android.bluetooth.a2dp Change-Id: I7d8f1a16b8358c440841801d95471b2d010739ec
2019-03-09Merge "Change BluetoothCodecStatus.sameCapabilities() to public" am: ↵Ugo Yu
e622f7d0f0 am: 4aa43800b1 am: 56f02797e2 Change-Id: Id4006e0be9eca624d52a313fc6e492483cc53dbb
2019-02-28All Parcelable CREATOR fields are @NonNull.Jeff Sharkey
If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
2019-02-27Change BluetoothCodecStatus.sameCapabilities() to publicUgo Yu
- Public this API to help A2DP state machine check selectable codec capabilities status. Bug: 124254557 Bug: 125551347 Test: runtest bluetooth Change-Id: If44887f756d2e8348e8f76dfb67b77b993ffd8db
2019-01-25AudioDeviceBroker in audio serviceJean-Michel Trivi
New AudioDeviceBroker class running in audio service. Has dedicated message loop for handling audio device connections and disconnections. New helper classes for AudioDeviceBroker: - BtHelper for Bluetooth - AudioDeviceInventory to manage list of devices Bug: 112863932 Test: media CTS + audio CTS Verifier Change-Id: I3e8f662a9d82fa7245695888e14fac7f4fc6e728
2018-08-02Add @UnsupportedAppUsage annotationsMathew Inwood
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: I88a1311e27c5f9a5f9d1035db76034f86f650efc
2018-08-01Add @UnsupportedAppUsage annotationsMathew Inwood
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
2018-04-19Fix the implementation of BluetoothCodecStatus.equals()Pavlin Radoslavov
Previously, the BluetoothCodecStatus.equals() implementation was incorrect when comparing arrays of capabilities. In the new implementation, the arrays are compared correctly, and also the ordering of the capabilities in each array is ignored. Also, added unit tests for class BluetoothCodecConfig and class BluetoothCodecStatus. Bug: 73404858 Bug: 73379307 Test: Unit tests (in frameworks/base) runtest --path core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecConfigTest.java runtest --path core/tests/bluetoothtests/src/android/bluetooth/BluetoothCodecStatusTest.java Change-Id: If22087465397b7c4175c33f7d1909a15d957fb24
2017-08-24Fix checkstyle errors (2/2)Jack He
* 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
2017-08-24Fix checkstyle errors (1/2)Jack He
* Automatic style corrections through IDE Bug: 63596319 Test: make checkbuild, no manual changes, no functional changes Change-Id: I2397d55abc34c9b7a9b748bec6137778df3421a7
2017-01-31Update the A2DP Codec Config APIPavlin Radoslavov
Previously, the JNI upcall would contain only the current codec config. In the new API, the upcall contains: 1. The current codec config 2. The list of codecs containing the local codecs capabilities 3. The list of codecs containing the selectable codecs capabilities. This list is the intersection of the local codecs capabilities and the capabilities of the paired device. Also, refactored the Java internals to accomodate the extra information: * Added new class BluetoothCodecStatus that contains the extra info: current codec config, local codecs capabilities and selectable codecs capabilities * Renamed method getCodecConfig() to getCodecStatus() and return the corresponding BluetoothCodecStatus object. * Updates to class BluetoothCodecConfig: new methods isValid(), getCodecName(), and updated toString() so it is more user friendly * Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and EXTRA_PREVIOUS_CODEC_CONFIG. The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS; the latter is not really used. Test: A2DP streaming with headsets and switching the codecs Change-Id: Ia1af2c22e521e863e28a360610aca49f7e62d31b