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

Side by Side Diff: device/bluetooth/bluetooth_device_android.cc

Issue 1941923002: bluetooth: Return int8_t and use -128 for unknown tx power. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Fix extensions tests Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_device_android.h" 5 #include "device/bluetooth/bluetooth_device_android.h"
6 6
7 #include "base/android/context_utils.h" 7 #include "base/android/context_utils.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 env, Java_ChromeBluetoothDevice_getUuids(env, j_device_.obj()).obj(), 133 env, Java_ChromeBluetoothDevice_getUuids(env, j_device_.obj()).obj(),
134 &uuid_strings); 134 &uuid_strings);
135 BluetoothDevice::UUIDList uuids; 135 BluetoothDevice::UUIDList uuids;
136 uuids.reserve(uuid_strings.size()); 136 uuids.reserve(uuid_strings.size());
137 for (auto uuid_string : uuid_strings) { 137 for (auto uuid_string : uuid_strings) {
138 uuids.push_back(BluetoothUUID(uuid_string)); 138 uuids.push_back(BluetoothUUID(uuid_string));
139 } 139 }
140 return uuids; 140 return uuids;
141 } 141 }
142 142
143 int16_t BluetoothDeviceAndroid::GetInquiryRSSI() const { 143 base::Optional<int8_t> BluetoothDeviceAndroid::GetInquiryRSSI() const {
144 NOTIMPLEMENTED(); 144 NOTIMPLEMENTED();
145 return kUnknownPower; 145 return base::Optional<int8_t>();
146 } 146 }
147 147
148 int16_t BluetoothDeviceAndroid::GetInquiryTxPower() const { 148 base::Optional<int8_t> BluetoothDeviceAndroid::GetInquiryTxPower() const {
149 NOTIMPLEMENTED(); 149 NOTIMPLEMENTED();
150 return kUnknownPower; 150 return base::Optional<int8_t>();
151 } 151 }
152 152
153 bool BluetoothDeviceAndroid::ExpectingPinCode() const { 153 bool BluetoothDeviceAndroid::ExpectingPinCode() const {
154 NOTIMPLEMENTED(); 154 NOTIMPLEMENTED();
155 return false; 155 return false;
156 } 156 }
157 157
158 bool BluetoothDeviceAndroid::ExpectingPasskey() const { 158 bool BluetoothDeviceAndroid::ExpectingPasskey() const {
159 NOTIMPLEMENTED(); 159 NOTIMPLEMENTED();
160 return false; 160 return false;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 AttachCurrentThread(), j_device_.obj(), 295 AttachCurrentThread(), j_device_.obj(),
296 base::android::GetApplicationContext()); 296 base::android::GetApplicationContext());
297 } 297 }
298 298
299 void BluetoothDeviceAndroid::DisconnectGatt() { 299 void BluetoothDeviceAndroid::DisconnectGatt() {
300 Java_ChromeBluetoothDevice_disconnectGatt(AttachCurrentThread(), 300 Java_ChromeBluetoothDevice_disconnectGatt(AttachCurrentThread(),
301 j_device_.obj()); 301 j_device_.obj());
302 } 302 }
303 303
304 } // namespace device 304 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698