@Test public void testIsBluetoothEnabled() throws Exception { when(mMockBluetoothAdapter.isEnabled()).thenReturn(false); assertThat("should be false as the device doesn't have Bluetooth enabled", mBluetoothManager.isBluetoothEnabled(), is(false)); when(mMockBluetoothAdapter.isEnabled()).thenReturn(true); assertThat("should be true as the device's Bluetooth is enabled", mBluetoothManager.isBluetoothEnabled(), is(true)); }
public boolean isBluetoothEnabled() { return (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()); }
BluetoothManager { public boolean isBluetoothEnabled() { return (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()); } }
BluetoothManager { public boolean isBluetoothEnabled() { return (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()); } private  BluetoothManager(Context context); private  BluetoothManager(Context context, BluetoothAdapter bluetoothAdapter,
                             SharedPreferences sharedPreferences); }
BluetoothManager { public boolean isBluetoothEnabled() { return (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()); } private  BluetoothManager(Context context); private  BluetoothManager(Context context, BluetoothAdapter bluetoothAdapter,
                             SharedPreferences sharedPreferences); static BluetoothManager getInstance(Context context); static BluetoothManager getInstance(Context context, BluetoothAdapter bluetoothAdapter,
                                               SharedPreferences sharedPreferences); synchronized boolean bind(BluetoothManagerListener listener); synchronized void release(BluetoothManagerListener listener); boolean isBluetoothSupported(); boolean isBleSupported(); @TargetApi(21) FeatureSupportedStatus isBleMultipleAdvertisementSupported(); @TargetApi(21) FeatureSupportedStatus isBleOffloadedScanBatchingSupported(); @TargetApi(21) FeatureSupportedStatus isBleOffloadedFilteringSupported(); boolean isBluetoothEnabled(); boolean setBluetoothEnabled(boolean enable); BluetoothAdapter getBluetoothAdapter(); String getBluetoothMacAddress(); String getBluetoothName(); BluetoothDevice getRemoteDevice(String address); }
BluetoothManager { public boolean isBluetoothEnabled() { return (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()); } private  BluetoothManager(Context context); private  BluetoothManager(Context context, BluetoothAdapter bluetoothAdapter,
                             SharedPreferences sharedPreferences); static BluetoothManager getInstance(Context context); static BluetoothManager getInstance(Context context, BluetoothAdapter bluetoothAdapter,
                                               SharedPreferences sharedPreferences); synchronized boolean bind(BluetoothManagerListener listener); synchronized void release(BluetoothManagerListener listener); boolean isBluetoothSupported(); boolean isBleSupported(); @TargetApi(21) FeatureSupportedStatus isBleMultipleAdvertisementSupported(); @TargetApi(21) FeatureSupportedStatus isBleOffloadedScanBatchingSupported(); @TargetApi(21) FeatureSupportedStatus isBleOffloadedFilteringSupported(); boolean isBluetoothEnabled(); boolean setBluetoothEnabled(boolean enable); BluetoothAdapter getBluetoothAdapter(); String getBluetoothMacAddress(); String getBluetoothName(); BluetoothDevice getRemoteDevice(String address);  }