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

Issue 2499913002: bluetooth: android: Implement RetrieveGattConnectedDevicesWithFilter

Created:
4 years, 1 month ago by ortuno
Modified:
3 years, 6 months ago
Reviewers:
scheib
CC:
agrieve+watch_chromium.org, chromium-reviews, ortuno+watch_chromium.org, scheib+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: android: Implement RetrieveGattConnectedDevicesWithFilter Also moves BluetoothDeviceWrapper into its own file: http://crbug.com/424792 BUG=630581

Patch Set 1 #

Patch Set 2 : Format #

Patch Set 3 : Add new test #

Patch Set 4 : Clean up #

Patch Set 5 : Comment why BluetoothDeviceWrapper is in a separate file #

Total comments: 5

Patch Set 6 : Avoid moving BluetoothDeviceWrapper #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+529 lines, -108 lines) Patch
M device/bluetooth/BUILD.gn View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
A device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothManager.java View 1 2 3 4 5 1 chunk +107 lines, -0 lines 0 comments Download
M device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java View 1 2 3 4 5 6 4 chunks +77 lines, -25 lines 0 comments Download
M device/bluetooth/android/wrappers.h View 1 chunk +3 lines, -0 lines 0 comments Download
M device/bluetooth/android/wrappers.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_android.h View 1 2 3 3 chunks +9 lines, -1 line 0 comments Download
M device/bluetooth/bluetooth_adapter_android.cc View 1 5 chunks +93 lines, -10 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_unittest.cc View 1 2 8 chunks +128 lines, -60 lines 0 comments Download
M device/bluetooth/bluetooth_device_android.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java View 1 2 3 4 5 6 4 chunks +63 lines, -0 lines 0 comments Download
M device/bluetooth/test/bluetooth_test.h View 1 3 chunks +4 lines, -3 lines 0 comments Download
M device/bluetooth/test/bluetooth_test.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/test/bluetooth_test_android.h View 1 3 chunks +8 lines, -0 lines 0 comments Download
M device/bluetooth/test/bluetooth_test_android.cc View 1 3 chunks +25 lines, -6 lines 0 comments Download
M device/bluetooth/test/bluetooth_test_mac.h View 1 1 chunk +1 line, -1 line 0 comments Download
M device/bluetooth/test/bluetooth_test_mac.mm View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (11 generated)
ortuno
scheib: PTAL
4 years ago (2016-11-28 03:20:50 UTC) #7
scheib
4 years ago (2016-11-28 20:42:22 UTC) #13
https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/androi...
File
device/bluetooth/android/java/src/org/chromium/device/bluetooth/BluetoothDeviceWrapper.java
(right):

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/androi...
device/bluetooth/android/java/src/org/chromium/device/bluetooth/BluetoothDeviceWrapper.java:21:
* BluetoothDeviceWrapper is in its own file because jni cannot direclty use the
nested class
Wrapper.java explains what the concept of a wrapper class is, maybe point more
directly to top of Wrappers.java for explanation of this class purpose.

When explaining why it's in its own file, cite http://crbug.com/505554 I can see
this being nice because you got tired of copy pasting the previous comments
explaining the use of 'Object' type, but does it fix anything more than that?

Probably we should explain at top of wrappers.java why there's this terribly
large file and everyhting isn't just split out: doing so would require a .h and
.cpp file for every split .java file that uses JNI. Or, maybe we should just
split out everything ;P.

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/androi...
device/bluetooth/android/java/src/org/chromium/device/bluetooth/BluetoothDeviceWrapper.java:26:
@JNINamespace("device")
This class needs JNINamespace because other classes from that namespace are
using it? It doesn't seem to be called directly by JNI.

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/androi...
device/bluetooth/android/java/src/org/chromium/device/bluetooth/BluetoothDeviceWrapper.java:28:
class BluetoothDeviceWrapper {
Can this still be "static class"?

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/blueto...
File device/bluetooth/bluetooth_adapter_unittest.cc (right):

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/blueto...
device/bluetooth/bluetooth_adapter_unittest.cc:930: #if defined(OS_MACOSX)
RetrieveConnectedPeripheralServiceUUIDs is confusing to me, and I don't see why
Mac and Android need to differ in the mechanism used to validate that calls were
made all the way to the Mock OS components. Let's pick one of either returning
the set of UUIDs requested, or just counts of calls (as
manager_get_connected_devices_attempts_ does). Or, explain in code why these are
different.

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/test/a...
File
device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
(right):

https://codereview.chromium.org/2499913002/diff/80001/device/bluetooth/test/a...
device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java:93:
public void simulateConnectedLowEnergyDevice(int deviceType) {
// c++ enum BluetoothTest::ConnectedDeviceType

Powered by Google App Engine
This is Rietveld 408576698