Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: chrome/browser/ui/android/bluetooth_chooser_android.cc

Issue 2210873003: bluetooth: Allow updates on chooser items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-fix-advertised-services
Patch Set: Make const Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/bluetooth_chooser_android.cc
diff --git a/chrome/browser/ui/android/bluetooth_chooser_android.cc b/chrome/browser/ui/android/bluetooth_chooser_android.cc
index a74e708852dcbac326affe2e31e41a756124ec1f..164963cf2540976d34dc0038949f363ef4226125 100644
--- a/chrome/browser/ui/android/bluetooth_chooser_android.cc
+++ b/chrome/browser/ui/android/bluetooth_chooser_android.cc
@@ -92,14 +92,19 @@ void BluetoothChooserAndroid::ShowDiscoveryState(DiscoveryState state) {
AttachCurrentThread(), java_dialog_.obj(), java_state);
}
-void BluetoothChooserAndroid::AddDevice(const std::string& device_id,
- const base::string16& device_name) {
+void BluetoothChooserAndroid::AddOrUpdateDevice(
+ const std::string& device_id,
+ bool should_update_name,
+ const base::string16& device_name,
+ bool is_gatt_connected,
+ bool is_paired,
+ const int8_t* rssi) {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jstring> java_device_id =
ConvertUTF8ToJavaString(env, device_id);
ScopedJavaLocalRef<jstring> java_device_name =
ConvertUTF16ToJavaString(env, device_name);
- Java_BluetoothChooserDialog_addDevice(
+ Java_BluetoothChooserDialog_addOrUpdateDevice(
env, java_dialog_.obj(), java_device_id.obj(), java_device_name.obj());
}
« no previous file with comments | « chrome/browser/ui/android/bluetooth_chooser_android.h ('k') | chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698