summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Fyodor Kupolov <fkupolov@google.com> 2015-07-09 23:02:29 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-07-09 23:02:29 +0000
commit9f73cd92d3e493cfc93b2cf85b58a186750f75e7 (patch)
treed846d002fa0f5755472b5172efd1fa7b9fdf9359
parent06566db8aa981d3d2d10d25724c54f9f54a1c98e (diff)
parent1e4be40109db63d23556612eb247cf2b3e4542e9 (diff)
am 1e4be401: am bda9c9f2: am a1790304: Do not return devices when caller has no location permission
* commit '1e4be40109db63d23556612eb247cf2b3e4542e9': Do not return devices when caller has no location permission
-rw-r--r--core/java/android/bluetooth/IBluetoothGatt.aidl2
-rw-r--r--core/java/android/bluetooth/le/BluetoothLeScanner.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/IBluetoothGatt.aidl b/core/java/android/bluetooth/IBluetoothGatt.aidl
index 72abeaf699c1..3660be7c8eb5 100644
--- a/core/java/android/bluetooth/IBluetoothGatt.aidl
+++ b/core/java/android/bluetooth/IBluetoothGatt.aidl
@@ -36,7 +36,7 @@ interface IBluetoothGatt {
void startScan(in int appIf, in boolean isServer, in ScanSettings settings,
in List<ScanFilter> filters,
- in List scanStorages);
+ in List scanStorages, in String callingPackage);
void stopScan(in int appIf, in boolean isServer);
void flushPendingBatchResults(in int appIf, in boolean isServer);
void startMultiAdvertising(in int appIf,
diff --git a/core/java/android/bluetooth/le/BluetoothLeScanner.java b/core/java/android/bluetooth/le/BluetoothLeScanner.java
index 2e6c4f03d8b2..e09ab5676de7 100644
--- a/core/java/android/bluetooth/le/BluetoothLeScanner.java
+++ b/core/java/android/bluetooth/le/BluetoothLeScanner.java
@@ -19,6 +19,7 @@ package android.bluetooth.le;
import android.Manifest;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
+import android.app.ActivityThread;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallbackWrapper;
@@ -313,7 +314,7 @@ public final class BluetoothLeScanner {
mClientIf = clientIf;
try {
mBluetoothGatt.startScan(mClientIf, false, mSettings, mFilters,
- mResultStorages);
+ mResultStorages, ActivityThread.currentOpPackageName());
} catch (RemoteException e) {
Log.e(TAG, "fail to start le scan: " + e);
mClientIf = -1;