diff options
| author | Rahul Sabnis <rahulsabnis@google.com> | 2022-01-12 14:06:51 -0800 |
|---|---|---|
| committer | Rahul Sabnis <rahulsabnis@google.com> | 2022-01-12 16:56:12 -0800 |
| commit | 088a3081274623aedf3f2158e6acca14580e81dc (patch) | |
| tree | e35724b93e9b377c64a75352215b0ced328ef647 /core/java/android/bluetooth/BluetoothDevice.java | |
| parent | c3e03c1c3df71f687aa1c6609ecdd2ee23fdd922 (diff) | |
Temporarily comment out usages of PropertyInvalidatedCache in Bluetooth code
while it is pending migration to module-utils
Tag: #feature
Bug: 210468958
Test: Manual
Change-Id: Iab59d235ca59fe2b5863fb4714eaccbc64fa915c
Diffstat (limited to 'core/java/android/bluetooth/BluetoothDevice.java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothDevice.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index 93f026860856..1edf5cc96b0d 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -23,8 +23,7 @@ import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SuppressLint; -import android.annotation.SystemApi; -import android.app.PropertyInvalidatedCache; +import android.annotation.SystemApi; //import android.app.PropertyInvalidatedCache; import android.bluetooth.annotations.RequiresBluetoothConnectPermission; import android.bluetooth.annotations.RequiresBluetoothLocationPermission; import android.bluetooth.annotations.RequiresBluetoothScanPermission; @@ -1597,6 +1596,7 @@ public final class BluetoothDevice implements Parcelable, Attributable { return false; } + /* private static final String BLUETOOTH_BONDING_CACHE_PROPERTY = "cache_key.bluetooth.get_bond_state"; private final PropertyInvalidatedCache<BluetoothDevice, Integer> mBluetoothBondCache = @@ -1612,16 +1612,19 @@ public final class BluetoothDevice implements Parcelable, Attributable { } } }; + */ /** @hide */ - public void disableBluetoothGetBondStateCache() { + /* public void disableBluetoothGetBondStateCache() { mBluetoothBondCache.disableLocal(); - } + } */ /** @hide */ + /* public static void invalidateBluetoothGetBondStateCache() { PropertyInvalidatedCache.invalidateCache(BLUETOOTH_BONDING_CACHE_PROPERTY); } + */ /** * Get the bond state of the remote device. @@ -1643,13 +1646,11 @@ public final class BluetoothDevice implements Parcelable, Attributable { return BOND_NONE; } try { - return mBluetoothBondCache.query(this); - } catch (RuntimeException e) { - if (e.getCause() instanceof RemoteException) { - Log.e(TAG, "", e); - } else { - throw e; - } + //return mBluetoothBondCache.query(this); + return sService.getBondState(this, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "failed to ", e); + e.rethrowFromSystemServer(); } return BOND_NONE; } |
