Update UI when BT device is rename

* Using getAliasName() instead of getName()
* Add BluetoothDevice isConnected check, when BluetoothDevice is
  disconnected. Do not add to the show list.

Bug: 77783217
Test: make -j50 RunSettingsRoboTests
Change-Id: I183fc693eaefd690568ba2f1ec740258b2bb62c8
This commit is contained in:
hughchen
2018-04-20 10:01:59 +08:00
parent 37a6a91444
commit 615becb392
6 changed files with 18 additions and 10 deletions

View File

@@ -302,7 +302,7 @@ public class MediaOutputPreferenceControllerTest {
mController.updateState(mPreference);
assertThat(mPreference.isVisible()).isTrue();
assertThat(mPreference.getSummary()).isEqualTo(mBluetoothDevice.getName());
assertThat(mPreference.getSummary()).isEqualTo(TEST_DEVICE_NAME_1);
}
/**
@@ -323,7 +323,7 @@ public class MediaOutputPreferenceControllerTest {
mController.updateState(mPreference);
assertThat(mPreference.isVisible()).isTrue();
assertThat(mPreference.getSummary()).isEqualTo(mSecondBluetoothDevice.getName());
assertThat(mPreference.getSummary()).isEqualTo(TEST_DEVICE_NAME_2);
}
/**