summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWei Wang <weiwa@google.com>2015-05-08 00:40:26 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-08 00:40:27 +0000
commit0a008049a21c5fbe36eac8047c5411c2e3aff41b (patch)
treef0562d59418b256e6fa81187197c29cec5d0e574 /core
parent78f12e43f08a1b2acda7b565a310c48e507f5e47 (diff)
parent46ab723d554e5b3b252c5fe5b0bc2f6bcb7941cf (diff)
downloadframeworks_base-0a008049a21c5fbe36eac8047c5411c2e3aff41b.zip
frameworks_base-0a008049a21c5fbe36eac8047c5411c2e3aff41b.tar.gz
frameworks_base-0a008049a21c5fbe36eac8047c5411c2e3aff41b.tar.bz2
Merge "Allow obtaining BLE capabilities in BLE scan only mode." into mnc-dev
Diffstat (limited to 'core')
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 0a77868..ec6f18d 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -28,14 +28,11 @@ import android.bluetooth.le.ScanRecord;
import android.bluetooth.le.ScanResult;
import android.bluetooth.le.ScanSettings;
import android.content.Context;
+import android.os.Binder;
import android.os.IBinder;
import android.os.ParcelUuid;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.app.ActivityThread;
-import android.os.SystemProperties;
-import android.provider.Settings;
-import android.os.Binder;
import android.util.Log;
import android.util.Pair;
@@ -1255,7 +1252,7 @@ public final class BluetoothAdapter {
* @return true if chipset supports on-chip filtering
*/
public boolean isOffloadedFilteringSupported() {
- if (getState() != STATE_ON) return false;
+ if (!getLeAccess()) return false;
try {
return mService.isOffloadedFilteringSupported();
} catch (RemoteException e) {
@@ -1270,7 +1267,7 @@ public final class BluetoothAdapter {
* @return true if chipset supports on-chip scan batching
*/
public boolean isOffloadedScanBatchingSupported() {
- if (getState() != STATE_ON) return false;
+ if (!getLeAccess()) return false;
try {
return mService.isOffloadedScanBatchingSupported();
} catch (RemoteException e) {
@@ -1286,7 +1283,7 @@ public final class BluetoothAdapter {
* @hide
*/
public boolean isHardwareTrackingFiltersAvailable() {
- if (getState() != STATE_ON) return false;
+ if (!getLeAccess()) return false;
try {
IBluetoothGatt iGatt = mManagerService.getBluetoothGatt();
if (iGatt == null) {