summaryrefslogtreecommitdiffstats
path: root/device
diff options
context:
space:
mode:
authorscheib <scheib@chromium.org>2016-02-26 15:24:24 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-26 23:25:36 +0000
commit7b0ec9c32bf336aeb7e2563005c85122b2c58d3c (patch)
tree595921f6fabb9e1811454a6ce1243abc18be3db4 /device
parentd1e45374111c047fc69c8719434bf14417f74d2e (diff)
downloadchromium_src-7b0ec9c32bf336aeb7e2563005c85122b2c58d3c.zip
chromium_src-7b0ec9c32bf336aeb7e2563005c85122b2c58d3c.tar.gz
chromium_src-7b0ec9c32bf336aeb7e2563005c85122b2c58d3c.tar.bz2
bluetooth: android: register for adapter on/off events followup.
Followup changes requested by tedchoc on https://codereview.chromium.org/1711393002 BUG=543060 Review URL: https://codereview.chromium.org/1745463002 Cr-Commit-Position: refs/heads/master@{#378022}
Diffstat (limited to 'device')
-rw-r--r--device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
index 54a8eb9..a7751f7 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
@@ -34,7 +34,8 @@ final class ChromeBluetoothAdapter extends BroadcastReceiver {
private static final String TAG = "Bluetooth";
private long mNativeBluetoothAdapterAndroid;
- private Wrappers.BluetoothAdapterWrapper mAdapter;
+ // mAdapter is final to ensure registerReceiver is followed by unregisterReceiver.
+ private final Wrappers.BluetoothAdapterWrapper mAdapter;
private int mNumDiscoverySessions;
private ScanCallback mScanCallback;