summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeremy Klein <jlklein@google.com> 2016-09-28 15:50:05 +0000
committer android-build-merger <android-build-merger@google.com> 2016-09-28 15:50:05 +0000
commit70a220be4f6feccb51bceaf6bdb5f9a5c39c9726 (patch)
treea5ad8e7d1323aed74292ae550b5a0b70d14fe46e
parent463d85cd929e5306ca5c6b44d3d0dc8b3b20068e (diff)
parent8002b2751229fce068dfe95c59c782e9180c2e81 (diff)
Remove unused mContext from BluetoothGatt[Server]. am: adc26ec1b4 am: 140e5cce70
am: 8002b27512 Change-Id: If05a528312cf0a5499c6ed122961124dc0d8e917
-rw-r--r--core/java/android/bluetooth/BluetoothDevice.java2
-rw-r--r--core/java/android/bluetooth/BluetoothGatt.java4
-rw-r--r--core/java/android/bluetooth/BluetoothGattServer.java4
-rw-r--r--core/java/android/bluetooth/BluetoothManager.java2
4 files changed, 4 insertions, 8 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 6d6dfebced2c..cd5eff29237c 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -1596,7 +1596,7 @@ public final class BluetoothDevice implements Parcelable {
// BLE is not supported
return null;
}
- BluetoothGatt gatt = new BluetoothGatt(context, iGatt, this, transport);
+ BluetoothGatt gatt = new BluetoothGatt(iGatt, this, transport);
gatt.connect(autoConnect, callback);
return gatt;
} catch (RemoteException e) {Log.e(TAG, "", e);}
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 17145f2e146a..2bb901221c5b 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -41,7 +41,6 @@ public final class BluetoothGatt implements BluetoothProfile {
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private final Context mContext;
private IBluetoothGatt mService;
private BluetoothGattCallback mCallback;
private int mClientIf;
@@ -492,9 +491,8 @@ public final class BluetoothGatt implements BluetoothProfile {
}
};
- /*package*/ BluetoothGatt(Context context, IBluetoothGatt iGatt, BluetoothDevice device,
+ /*package*/ BluetoothGatt(IBluetoothGatt iGatt, BluetoothDevice device,
int transport) {
- mContext = context;
mService = iGatt;
mDevice = device;
mTransport = transport;
diff --git a/core/java/android/bluetooth/BluetoothGattServer.java b/core/java/android/bluetooth/BluetoothGattServer.java
index c2bcbb2df636..5ffceba5e11d 100644
--- a/core/java/android/bluetooth/BluetoothGattServer.java
+++ b/core/java/android/bluetooth/BluetoothGattServer.java
@@ -44,7 +44,6 @@ public final class BluetoothGattServer implements BluetoothProfile {
private static final boolean DBG = true;
private static final boolean VDBG = false;
- private final Context mContext;
private BluetoothAdapter mAdapter;
private IBluetoothGatt mService;
private BluetoothGattServerCallback mCallback;
@@ -298,8 +297,7 @@ public final class BluetoothGattServer implements BluetoothProfile {
/**
* Create a BluetoothGattServer proxy object.
*/
- /*package*/ BluetoothGattServer(Context context, IBluetoothGatt iGatt, int transport) {
- mContext = context;
+ /*package*/ BluetoothGattServer(IBluetoothGatt iGatt, int transport) {
mService = iGatt;
mAdapter = BluetoothAdapter.getDefaultAdapter();
mCallback = null;
diff --git a/core/java/android/bluetooth/BluetoothManager.java b/core/java/android/bluetooth/BluetoothManager.java
index 00058a979094..29283e793ce9 100644
--- a/core/java/android/bluetooth/BluetoothManager.java
+++ b/core/java/android/bluetooth/BluetoothManager.java
@@ -236,7 +236,7 @@ public final class BluetoothManager {
Log.e(TAG, "Fail to get GATT Server connection");
return null;
}
- BluetoothGattServer mGattServer = new BluetoothGattServer(context, iGatt,transport);
+ BluetoothGattServer mGattServer = new BluetoothGattServer(iGatt,transport);
Boolean regStatus = mGattServer.registerCallback(callback);
return regStatus? mGattServer : null;
} catch (RemoteException e) {