summaryrefslogtreecommitdiff
path: root/packages/SettingsLib/src/com/android/settingslib/bluetooth/HfpClientProfile.java
Commit message (Collapse)AuthorAgeFilesLines
* Update LocalBluetoothProfile apihughchen2020-02-051-24/+10
| | | | | | | | | | | | | | | | This CL include following change: 1. Rename isPreferred() to isEnabled(). 2. Rename getPreferred() to getConnectionPolicy(). 3. Rename setPreferred() to setEnabled(). 4. Remove connect()/disconnect() since when call setEnabled() BT stack will base on input state to do connect/disconnect automatically. 5. Add/update test case. Bug: 141582844 Test: make -j42 RunSettingsLibRoboTests Change-Id: I9aa7d5157028671fcda705bf5cb957c26c4204ad
* Update connect/disconnect Bluetooth apihughchen2020-01-101-11/+11
| | | | | | | | | | | | | This CL is used to update following Bluetooth api: 1. Use setConnectionPolicy(device, CONNECTION_POLICY_ALLOWED) instead of connect(device) when connect to profile. 2. Use setConnectionPolicy(device, CONNECTION_POLICY_FORBIDDEN) instead of disconnect(device) when disconnect to profile. Fixes: 141582844 Test: manually Change-Id: Ifba1fbc3855c4406b8b9b98e9abe19bae987aff9
* Update Bluetooth api on SettingsLibhughchen2019-12-101-8/+8
| | | | | | | | | | | | | | | This CL is used to update Bluetooth api. - Use getConnectionPolicy() instead of getPriority() - Use setConnectionPolicy() instead of setPriority() - Use BluetoothProfile.CONNECTION_POLICY_ALLOWED instead of BluetoothProfile.PRIORITY_ON - Use BluetoothProfile.CONNECTION_POLICY_FORBIDDEN instead of BluetoothProfile.PRIORITY_OFF Fixes: 141582844 Test: manually Change-Id: I2d7438d48acde155e2b411fd98cb59961c8d75c1
* Make BluetoothUuid constants and some functions System ApisRahul Sabnis2019-12-041-1/+1
| | | | | | Bug: 143245929 Test: Manual Change-Id: I5519a379a2bb5d56fe25745d8bdeaa5cf52d9e92
* Move SettingsLib icons to android.Amin Shaikh2019-01-251-1/+1
| | | | | | Bug: 122263617 Test: make Change-Id: I11ce02f3f65f429fd4375a5522c060c8080f4813
* Remove duplicate log of BluetoothProfile.ServiceListenerChienyuan2019-01-031-2/+0
| | | | | | | | | BluetoothProfile will print log when service connected/disconnected, we don't need to print it at LocalBluetoothProfile. Bug: 115587413 Test: build pass Change-Id: Iab3bb5d7a8840264a163ccf9a8f3508679d73b94
* Merge "Rename method isConnectable()" am: e238a19aa5 am: 78e8da5e79Leon Liao2018-09-261-1/+1
|\ | | | | | | | | | | am: 8735efab03 Change-Id: Ib8a4674ab16d60b8dc458c8eb97d0b24a0c48123
| * Merge "Rename method isConnectable()"Leon Liao2018-09-261-1/+1
| |\ | | | | | | | | | | | | | | | am: e238a19aa5 Change-Id: Ia19f7f53f62ff9839890e962b7b659c9f43fa3b1
| | * Rename method isConnectable()Leon Liao2018-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | LocalBluetoothProfile.isConnectable() checks whether the user can initiate a connection for a specific profile, not really whether the profile is connectable. Change-Id: If6c6cd1554acf35db2460ea6ddb65148a7e86e45 Bug: 79982487 Test: build
| * | Merge "Simplify logic for connect in HfpClientProfile"Chienyuan2018-09-121-19/+20
| |\| | | | | | | | | | | | | | | | am: 57d9052ce8 Change-Id: If8fed65f3e0760c4ba7e16908f3c720eefa60162
| | * Simplify logic for connect in HfpClientProfileChienyuan2018-09-121-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * connect: remove connected device check logic. HeadsetClientStateMachine will check it. * Remove member variable V and related checks. * wrap if/else statement in curly brackets. * add robotest for HfpClientProfile. Bug: 111812003 Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HfpClientProfileTest Change-Id: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c Merged-In: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c
| | * DO NOT MERGE: Reordered imports according to Android style.Fan Zhang2018-09-041-1/+1
| |/ | | | | | | | | Test: rebuild Change-Id: I7b1ad77039868c6a827478fbbb32e0fd5c9a29cf
* | Simplify logic for connect in HfpClientProfileChienyuan2018-09-111-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | * connect: remove connected device check logic. HeadsetClientStateMachine will check it. * Remove member variable V and related checks. * wrap if/else statement in curly brackets. * add robotest for HfpClientProfile. Bug: 111812003 Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HfpClientProfileTest Change-Id: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c (cherry picked from commit 2ecfa2abe6bee9318dcc5f0b4c3b3d3ec634f0e4)
* | Sort importsFan Zhang2018-08-281-1/+1
| | | | | | | | | | | | | | | | Having consistent import order will reduce chance of merge conflict between internal and external master Test: rebuild Change-Id: I9acb311ec05f72f0a37f08b0d26785841fe91de5
* | remove LocalBluetoothAdapter usagetimhypeng2018-08-171-7/+4
| | | | | | | | | | | | | | | | | | | | - replace LocalBluetoothAdapter with BluetoothAdapter.getDefaultAdapter() to call functions - remove LocalBluetoothAdapter from each Bluetooth profile constructor - no more pass LocalBluetoothAdapter to CachedBluetoothDeviceManager::addDevice() Bug: 111815935 Test: make -j50 RunSettingsLibRoboTests Change-Id: I2d2178c6e83034b08690d459973868a9ba583429
* | Remove mProfileManager in BluetoothEventManagerChienyuan2018-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | mProfileManager only use as parameter of mDeviceManager.addDevice(), CachedBluetoothDeviceManager can get it with mBtManager and remove it from argument. Then we can remove mProfileManager in BluetoothEventManager. Bug: 111966655 Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceManagerTest Change-Id: Iec325af8161629f666eee062f5acefe331b0711b
* | Rename the Utils class in settingslib.bluetoothKunhung Li2018-05-181-1/+1
|/ | | | | | | | Make it more unique to speficy related bluetooth, so change class name from Utils to BluetoothUtils. Bug: 78676509 Test: atest RunSettingsLibRoboTests Change-Id: I83baf214fef125a2c2b9bb2526d11f0c8838a82c
* Add Bluetooth callback for device connection state changedryanywlin2018-05-111-0/+5
| | | | | | | | | | With the new Multi-A2DP/HFP support, need to add profile connection state changed callback for every BT device connect/disconnect to profile. Bug: 76447449 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=LocalBluetoothProfileManagerTest -j28 Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=BluetoothEventManagerTest -j28 Change-Id: Iaaec369e8d10f9b1270491632fb5c91de1e28571
* Removed executable flag for Java source filesPavlin Radoslavov2018-02-231-0/+0
| | | | | Test: Code compilation Change-Id: Ibfb57c6af54ace94eb9f9915471738f2f09ca70a
* Bluetooth Multi ConnectJoseph Pirozzo2017-04-031-5/+0
| | | | | | | | | | | | | | Allow automotive bluetooth profiles to connect to issue multiple connect calls without disconnecting other devices. These client side profiles either support multiple connections or handle multiple connection requests gracefully. Bug: 36789202 Test: Manual, Connect to one paired device then attempt to connect to a second paired device, observe that HFP and PBAP are both connected on both devices. Change-Id: I8bd6aea2b8411ba5585b34292d8c6ec62c5c2f96
* Add Headset HF role to the settings menuSanket Agarwal2016-02-011-0/+233
- Makes the HF client a configurable item in Settings. You can enable/disable HF per item. - Disconnect works cleanly since Settings now disconnects HF and hence tear down the ACL. Bug: b/26808830 Change-Id: I062b64beac4c009a6075756b7f163c6455d77af2