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

Side by Side Diff: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java

Issue 1395783005: bluetooth: android: BluetoothRemoteGattServiceAndroid::GetUUID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed jyasskin comments Created 5 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.device.bluetooth;
6
7 import org.chromium.base.Log;
8 import org.chromium.base.annotations.CalledByNative;
9 import org.chromium.base.annotations.JNINamespace;
10
11 /**
12 * Exposes android.bluetooth.BluetoothGattService as necessary
13 * for C++ device::BluetoothRemoteGattServiceAndroid.
14 *
15 * Lifetime is controlled by
16 * device::BluetoothRemoteGattServiceAndroid.
17 */
18 @JNINamespace("device")
19 final class ChromeBluetoothRemoteGattService {
20 private static final String TAG = "Bluetooth";
21
22 final Wrappers.BluetoothGattServiceWrapper mService;
23
24 private ChromeBluetoothRemoteGattService(Wrappers.BluetoothGattServiceWrappe r serviceWrapper) {
25 mService = serviceWrapper;
26 Log.v(TAG, "ChromeBluetoothRemoteGattService created.");
27 }
28
29 // ------------------------------------------------------------------------- --------------------
30 // BluetoothRemoteGattServiceAndroid methods implemented in java:
31
32 // Implements BluetoothRemoteGattServiceAndroid::Create.
33 // 'Object' type must be used because inner class Wrappers.BluetoothGattServ iceWrapper reference
34 // is not handled by jni_generator.py JavaToJni. http://crbug.com/505554
35 @CalledByNative
36 private static ChromeBluetoothRemoteGattService create(Object serviceWrapper ) {
37 return new ChromeBluetoothRemoteGattService(
38 (Wrappers.BluetoothGattServiceWrapper) serviceWrapper);
39 }
40
41 // Implements BluetoothRemoteGattServiceAndroid::GetUUID.
42 @CalledByNative
43 private String getUUID() {
44 return mService.getUuid().toString();
45 }
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698