diff --git a/res/xml/bluetooth_device_details_fragment.xml b/res/xml/bluetooth_device_details_fragment.xml index f6c0af662aa..b44a93db62f 100644 --- a/res/xml/bluetooth_device_details_fragment.xml +++ b/res/xml/bluetooth_device_details_fragment.xml @@ -46,6 +46,11 @@ android:key="action_buttons" settings:allowDividerBelow="true"/> + + " + SETTINGS_URI + + ""; + private static final int METADATA_FAST_PAIR_CUSTOMIZED_FIELDS = 25; + private BluetoothFeatureProvider mBluetoothFeatureProvider; @Mock @@ -54,4 +59,13 @@ public class BluetoothFeatureProviderImplTest { final Uri uri = mBluetoothFeatureProvider.getBluetoothDeviceSettingsUri(mBluetoothDevice); assertThat(uri.toString()).isEqualTo(SETTINGS_URI); } + + @Test + public void getBluetoothDeviceControlUri_returnsCorrectUri() { + when(mBluetoothDevice.getMetadata(METADATA_FAST_PAIR_CUSTOMIZED_FIELDS)).thenReturn( + CONTROL_METADATA.getBytes()); + assertThat( + mBluetoothFeatureProvider.getBluetoothDeviceControlUri(mBluetoothDevice)).isEqualTo( + SETTINGS_URI); + } }