Align with Bluetooth metadata API changes

* Align with the changes of Bluetooth metadata APIs.
* Move metadata utils from Settings to SettingsLib.

Bug: 124448651
Test: make RunSettingsRoboTests
Change-Id: Ic9ad91536ef3ff6807a08bbffa3dd796ef1ad523
This commit is contained in:
Ugo Yu
2019-03-05 16:43:08 +08:00
parent dc4f7ce282
commit 9f11ccf319
8 changed files with 64 additions and 131 deletions

View File

@@ -33,8 +33,8 @@ public class BluetoothFeatureProviderImpl implements BluetoothFeatureProvider {
@Override
public Uri getBluetoothDeviceSettingsUri(BluetoothDevice bluetoothDevice) {
final String uriString = bluetoothDevice.getMetadata(
final byte[] uriByte = bluetoothDevice.getMetadata(
BluetoothDevice.METADATA_ENHANCED_SETTINGS_UI_URI);
return uriString != null ? Uri.parse(uriString) : null;
return uriByte == null ? null : Uri.parse(new String(uriByte));
}
}