Loading framework/java/android/bluetooth/BluetoothAdapter.java +32 −0 Original line number Diff line number Diff line Loading @@ -497,6 +497,34 @@ public final class BluetoothAdapter { } } /** * Returns a {@link BluetoothLeAdvertiser} object for Bluetooth LE Advertising operations. */ public BluetoothLeAdvertiser getBluetoothLeAdvertiser() { // TODO: Return null if this feature is not supported by hardware. try { IBluetoothGatt iGatt = mManagerService.getBluetoothGatt(); return new BluetoothLeAdvertiser(iGatt); } catch (RemoteException e) { Log.e(TAG, "failed to get BluetoothLeAdvertiser, error: " + e); return null; } } /** * Returns a {@link BluetoothLeScanner} object for Bluetooth LE scan operations. */ public BluetoothLeScanner getBluetoothLeScanner() { // TODO: Return null if BLE scan is not supported by hardware. try { IBluetoothGatt iGatt = mManagerService.getBluetoothGatt(); return new BluetoothLeScanner(iGatt); } catch (RemoteException e) { Log.e(TAG, "failed to get BluetoothLeScanner, error: " + e); return null; } } /** * Interface for BLE advertising callback. * Loading Loading @@ -2024,6 +2052,10 @@ public final class BluetoothAdapter { } } @Override public void onMultiAdvertiseCallback(int status) { // no op } /** * Callback reporting LE ATT MTU. * @hide Loading framework/java/android/bluetooth/BluetoothGatt.java +9 −1 Original line number Diff line number Diff line Loading @@ -583,6 +583,14 @@ public final class BluetoothGatt implements BluetoothProfile { + state + " status=" + status); } /** * @hide */ @Override public void onMultiAdvertiseCallback(int status) { // no op. } /** * Callback invoked when the MTU for a given connection changes * @hide Loading framework/java/android/bluetooth/BluetoothLeAdvertiseScanData.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.bluetooth; parcelable BluetoothLeAdvertiseScanData.AdvertisementData; No newline at end of file Loading
framework/java/android/bluetooth/BluetoothAdapter.java +32 −0 Original line number Diff line number Diff line Loading @@ -497,6 +497,34 @@ public final class BluetoothAdapter { } } /** * Returns a {@link BluetoothLeAdvertiser} object for Bluetooth LE Advertising operations. */ public BluetoothLeAdvertiser getBluetoothLeAdvertiser() { // TODO: Return null if this feature is not supported by hardware. try { IBluetoothGatt iGatt = mManagerService.getBluetoothGatt(); return new BluetoothLeAdvertiser(iGatt); } catch (RemoteException e) { Log.e(TAG, "failed to get BluetoothLeAdvertiser, error: " + e); return null; } } /** * Returns a {@link BluetoothLeScanner} object for Bluetooth LE scan operations. */ public BluetoothLeScanner getBluetoothLeScanner() { // TODO: Return null if BLE scan is not supported by hardware. try { IBluetoothGatt iGatt = mManagerService.getBluetoothGatt(); return new BluetoothLeScanner(iGatt); } catch (RemoteException e) { Log.e(TAG, "failed to get BluetoothLeScanner, error: " + e); return null; } } /** * Interface for BLE advertising callback. * Loading Loading @@ -2024,6 +2052,10 @@ public final class BluetoothAdapter { } } @Override public void onMultiAdvertiseCallback(int status) { // no op } /** * Callback reporting LE ATT MTU. * @hide Loading
framework/java/android/bluetooth/BluetoothGatt.java +9 −1 Original line number Diff line number Diff line Loading @@ -583,6 +583,14 @@ public final class BluetoothGatt implements BluetoothProfile { + state + " status=" + status); } /** * @hide */ @Override public void onMultiAdvertiseCallback(int status) { // no op. } /** * Callback invoked when the MTU for a given connection changes * @hide Loading
framework/java/android/bluetooth/BluetoothLeAdvertiseScanData.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.bluetooth; parcelable BluetoothLeAdvertiseScanData.AdvertisementData; No newline at end of file