Index: device/bluetooth/bluetooth_device_android.cc |
diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc |
index ce76d20b169b8667980d7833366732b7a95be885..3189be37ba168f0697fc1464671ad2fdc796dd1e 100644 |
--- a/device/bluetooth/bluetooth_device_android.cc |
+++ b/device/bluetooth/bluetooth_device_android.cc |
@@ -100,6 +100,10 @@ uint16_t BluetoothDeviceAndroid::GetAppearance() const { |
} |
base::Optional<std::string> BluetoothDeviceAndroid::GetName() const { |
+ if (!IsGattConnected() && advertised_name_) { |
+ return advertised_name_; |
+ } |
+ |
auto name = |
Java_ChromeBluetoothDevice_getName(AttachCurrentThread(), j_device_); |
if (name.is_null()) |