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

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

Issue 2706763002: bluetooth: Increase min api for Android (Closed)
Patch Set: Increase min API for other classes Created 3 years, 8 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
« no previous file with comments | « no previous file | device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 package org.chromium.device.bluetooth; 5 package org.chromium.device.bluetooth;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.bluetooth.BluetoothAdapter; 8 import android.bluetooth.BluetoothAdapter;
9 import android.bluetooth.le.ScanSettings; 9 import android.bluetooth.le.ScanSettings;
10 import android.content.BroadcastReceiver; 10 import android.content.BroadcastReceiver;
(...skipping 11 matching lines...) Expand all
22 import java.util.List; 22 import java.util.List;
23 23
24 /** 24 /**
25 * Exposes android.bluetooth.BluetoothAdapter as necessary for C++ 25 * Exposes android.bluetooth.BluetoothAdapter as necessary for C++
26 * device::BluetoothAdapterAndroid, which implements the cross platform 26 * device::BluetoothAdapterAndroid, which implements the cross platform
27 * device::BluetoothAdapter. 27 * device::BluetoothAdapter.
28 * 28 *
29 * Lifetime is controlled by device::BluetoothAdapterAndroid. 29 * Lifetime is controlled by device::BluetoothAdapterAndroid.
30 */ 30 */
31 @JNINamespace("device") 31 @JNINamespace("device")
32 @TargetApi(Build.VERSION_CODES.LOLLIPOP) 32 @TargetApi(Build.VERSION_CODES.M)
33 final class ChromeBluetoothAdapter extends BroadcastReceiver { 33 final class ChromeBluetoothAdapter extends BroadcastReceiver {
34 private static final String TAG = "Bluetooth"; 34 private static final String TAG = "Bluetooth";
35 35
36 private long mNativeBluetoothAdapterAndroid; 36 private long mNativeBluetoothAdapterAndroid;
37 // mAdapter is final to ensure registerReceiver is followed by unregisterRec eiver. 37 // mAdapter is final to ensure registerReceiver is followed by unregisterRec eiver.
38 private final Wrappers.BluetoothAdapterWrapper mAdapter; 38 private final Wrappers.BluetoothAdapterWrapper mAdapter;
39 private ScanCallback mScanCallback; 39 private ScanCallback mScanCallback;
40 40
41 // ------------------------------------------------------------------------- -------------------- 41 // ------------------------------------------------------------------------- --------------------
42 // Construction and handler for C++ object destruction. 42 // Construction and handler for C++ object destruction.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Wrappers.BluetoothDeviceWrapper reference is not handled by jni_generator .py JavaToJni. 316 // Wrappers.BluetoothDeviceWrapper reference is not handled by jni_generator .py JavaToJni.
317 // http://crbug.com/505554 317 // http://crbug.com/505554
318 private native void nativeCreateOrUpdateDeviceOnScan(long nativeBluetoothAda pterAndroid, 318 private native void nativeCreateOrUpdateDeviceOnScan(long nativeBluetoothAda pterAndroid,
319 String address, Object bluetoothDeviceWrapper, int rssi, String[] ad vertisedUuids, 319 String address, Object bluetoothDeviceWrapper, int rssi, String[] ad vertisedUuids,
320 int txPower); 320 int txPower);
321 321
322 // Binds to BluetoothAdapterAndroid::nativeOnAdapterStateChanged 322 // Binds to BluetoothAdapterAndroid::nativeOnAdapterStateChanged
323 private native void nativeOnAdapterStateChanged( 323 private native void nativeOnAdapterStateChanged(
324 long nativeBluetoothAdapterAndroid, boolean powered); 324 long nativeBluetoothAdapterAndroid, boolean powered);
325 } 325 }
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698