Loading core/java/android/bluetooth/BluetoothAdapter.java +17 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,8 @@ public final class BluetoothAdapter { if (getState() != STATE_ON) { return null; } if (!isMultipleAdvertisementSupported()) { if (!isMultipleAdvertisementSupported() && !isPeripheralModeSupported()) { Log.e(TAG, "bluetooth le advertising not supported"); return null; } synchronized(mLock) { Loading Loading @@ -916,6 +917,21 @@ public final class BluetoothAdapter { return false; } /** * Returns whether peripheral mode is supported. * * @hide */ public boolean isPeripheralModeSupported() { if (getState() != STATE_ON) return false; try { return mService.isPeripheralModeSupported(); } catch (RemoteException e) { Log.e(TAG, "failed to get peripheral mode capability: ", e); } return false; } /** * Return true if offloaded filters are supported * Loading core/java/android/bluetooth/IBluetooth.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ interface IBluetooth boolean configHciSnoopLog(boolean enable); boolean isMultiAdvertisementSupported(); boolean isPeripheralModeSupported(); boolean isOffloadedFilteringSupported(); boolean isOffloadedScanBatchingSupported(); boolean isActivityAndEnergyReportingSupported(); Loading core/java/android/bluetooth/le/BluetoothLeAdvertiser.java +2 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ public final class BluetoothLeAdvertiser { if (callback == null) { throw new IllegalArgumentException("callback cannot be null"); } if (!mBluetoothAdapter.isMultipleAdvertisementSupported()) { if (!mBluetoothAdapter.isMultipleAdvertisementSupported() && !mBluetoothAdapter.isPeripheralModeSupported()) { postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_FEATURE_UNSUPPORTED); return; Loading Loading
core/java/android/bluetooth/BluetoothAdapter.java +17 −1 Original line number Diff line number Diff line Loading @@ -464,7 +464,8 @@ public final class BluetoothAdapter { if (getState() != STATE_ON) { return null; } if (!isMultipleAdvertisementSupported()) { if (!isMultipleAdvertisementSupported() && !isPeripheralModeSupported()) { Log.e(TAG, "bluetooth le advertising not supported"); return null; } synchronized(mLock) { Loading Loading @@ -916,6 +917,21 @@ public final class BluetoothAdapter { return false; } /** * Returns whether peripheral mode is supported. * * @hide */ public boolean isPeripheralModeSupported() { if (getState() != STATE_ON) return false; try { return mService.isPeripheralModeSupported(); } catch (RemoteException e) { Log.e(TAG, "failed to get peripheral mode capability: ", e); } return false; } /** * Return true if offloaded filters are supported * Loading
core/java/android/bluetooth/IBluetooth.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -92,6 +92,7 @@ interface IBluetooth boolean configHciSnoopLog(boolean enable); boolean isMultiAdvertisementSupported(); boolean isPeripheralModeSupported(); boolean isOffloadedFilteringSupported(); boolean isOffloadedScanBatchingSupported(); boolean isActivityAndEnergyReportingSupported(); Loading
core/java/android/bluetooth/le/BluetoothLeAdvertiser.java +2 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ public final class BluetoothLeAdvertiser { if (callback == null) { throw new IllegalArgumentException("callback cannot be null"); } if (!mBluetoothAdapter.isMultipleAdvertisementSupported()) { if (!mBluetoothAdapter.isMultipleAdvertisementSupported() && !mBluetoothAdapter.isPeripheralModeSupported()) { postStartFailure(callback, AdvertiseCallback.ADVERTISE_FAILED_FEATURE_UNSUPPORTED); return; Loading