diff options
author | Jeff Sharkey <jsharkey@google.com> | 2021-04-21 22:40:20 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-04-21 22:40:20 +0000 |
commit | d4e014e265ca543ad8d6d277cacbfafdb799db6f (patch) | |
tree | 180a58757a3f9e9a5724e51671596da100b154f2 /service/java/com/android/server/bluetooth/BluetoothManagerService.java | |
parent | f8c54a14e89477fd7809275a0920a0481367f04b (diff) | |
parent | f0a1cae1d658c6915f9d663f1eca70f02c8c3581 (diff) |
Merge "Pass AttributionSource to AdapterService methods." into sc-dev
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothManagerService.java')
-rw-r--r-- | service/java/com/android/server/bluetooth/BluetoothManagerService.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java index a68103f68d..08c9c2a2c9 100644 --- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java +++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java @@ -347,7 +347,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { addActiveLog( BluetoothProtoEnums.ENABLE_DISABLE_REASON_FACTORY_RESET, mContext.getPackageName(), false); - mBluetooth.disable(); + mBluetooth.disable(mContext.getAttributionSource()); return true; } } catch (RemoteException e) { @@ -1714,7 +1714,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { try { mBluetoothLock.readLock().lock(); if (mBluetooth != null) { - return mBluetooth.getAddress(); + return mBluetooth.getAddressWithAttribution(mContext.getAttributionSource()); } } catch (RemoteException e) { Slog.e(TAG, @@ -1743,7 +1743,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { try { mBluetoothLock.readLock().lock(); if (mBluetooth != null) { - return mBluetooth.getName(); + return mBluetooth.getName(mContext.getAttributionSource()); } } catch (RemoteException e) { Slog.e(TAG, "getName(): Unable to retrieve name remotely. Returning cached name", e); @@ -1830,7 +1830,10 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } } else if (mBluetooth != null) { try { - storeNameAndAddress(mBluetooth.getName(), mBluetooth.getAddress()); + storeNameAndAddress( + mBluetooth.getName(mContext.getAttributionSource()), + mBluetooth.getAddressWithAttribution( + mContext.getAttributionSource())); } catch (RemoteException re) { Slog.e(TAG, "Unable to grab names", re); } @@ -2096,7 +2099,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { //Do enable request try { - if (!mBluetooth.enable(mQuietEnable)) { + if (!mBluetooth.enable(mQuietEnable, mContext.getAttributionSource())) { Slog.e(TAG, "IBluetooth.enable() returned false"); } } catch (RemoteException e) { @@ -2417,7 +2420,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } else if (mBluetooth != null) { //Enable bluetooth try { - if (!mBluetooth.enable(mQuietEnable)) { + if (!mBluetooth.enable(mQuietEnable, mContext.getAttributionSource())) { Slog.e(TAG, "IBluetooth.enable() returned false"); } } catch (RemoteException e) { @@ -2447,7 +2450,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { if (DBG) { Slog.d(TAG, "Sending off request."); } - if (!mBluetooth.disable()) { + if (!mBluetooth.disable(mContext.getAttributionSource())) { Slog.e(TAG, "IBluetooth.disable() returned false"); } } |