diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-08 02:08:28 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-03-08 02:08:28 +0000 |
commit | 22389fee67a014fed221aadadcfbc1dc9cd7335f (patch) | |
tree | 24b5864c0fccfd1ae7549e3616dbc5ee1aa5bafb /framework/java/android/bluetooth/BluetoothAdapter.java | |
parent | 4739b8feb4c2a5becbb584b1f62f0e5321079d17 (diff) | |
parent | c4c4f9227fb198e838b5b7de5d1a048f2d3a0c52 (diff) |
Snap for 8270536 from c4c4f9227fb198e838b5b7de5d1a048f2d3a0c52 to tm-release
Change-Id: I11136ce6eeaed10d012ef29fb7c081cbc5c1ced2
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index 936a08569b..5767abb2b5 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -32,7 +32,6 @@ import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.app.PendingIntent; -import android.app.PropertyInvalidatedCache; import android.bluetooth.BluetoothDevice.AddressType; import android.bluetooth.BluetoothDevice.Transport; import android.bluetooth.BluetoothProfile.ConnectionPolicy; @@ -57,6 +56,7 @@ import android.os.Binder; import android.os.BluetoothServiceManager; import android.os.Build; import android.os.IBinder; +import android.os.IpcDataCache; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ResultReceiver; @@ -1125,13 +1125,13 @@ public final class BluetoothAdapter { } /** - * There are several instances of PropertyInvalidatedCache used in this class. + * There are several instances of IpcDataCache used in this class. * BluetoothCache wraps up the common code. All caches are created with a maximum of * eight entries, and the key is in the bluetooth module. The name is set to the api. */ - private static class BluetoothCache<Q, R> extends PropertyInvalidatedCache<Q, R> { - BluetoothCache(String api, PropertyInvalidatedCache.QueryHandler query) { - super(8, PropertyInvalidatedCache.MODULE_BLUETOOTH, api, api, query); + private static class BluetoothCache<Q, R> extends IpcDataCache<Q, R> { + BluetoothCache(String api, IpcDataCache.QueryHandler query) { + super(8, IpcDataCache.MODULE_BLUETOOTH, api, api, query); }}; /** @@ -1139,7 +1139,7 @@ public final class BluetoothAdapter { * enforces the bluetooth module. */ private static void invalidateCache(@NonNull String api) { - PropertyInvalidatedCache.invalidateCache(PropertyInvalidatedCache.MODULE_BLUETOOTH, api); + IpcDataCache.invalidateCache(IpcDataCache.MODULE_BLUETOOTH, api); } /** @@ -1147,8 +1147,8 @@ public final class BluetoothAdapter { */ private static final String GET_STATE_API = "getState"; - private final PropertyInvalidatedCache.QueryHandler<Void, Integer> mBluetoothGetStateQuery = - new PropertyInvalidatedCache.QueryHandler<>() { + private final IpcDataCache.QueryHandler<Void, Integer> mBluetoothGetStateQuery = + new IpcDataCache.QueryHandler<>() { @RequiresLegacyBluetoothPermission @RequiresNoPermission @AdapterState @@ -1174,7 +1174,7 @@ public final class BluetoothAdapter { return state; }}; - private final PropertyInvalidatedCache<Void, Integer> mBluetoothGetStateCache = + private final IpcDataCache<Void, Integer> mBluetoothGetStateCache = new BluetoothCache<Void, Integer>(GET_STATE_API, mBluetoothGetStateQuery); /** @hide */ @@ -2267,8 +2267,8 @@ public final class BluetoothAdapter { } } - private final PropertyInvalidatedCache.QueryHandler<Void, Boolean> mBluetoothFilteringQuery = - new PropertyInvalidatedCache.QueryHandler<>() { + private final IpcDataCache.QueryHandler<Void, Boolean> mBluetoothFilteringQuery = + new IpcDataCache.QueryHandler<>() { @RequiresLegacyBluetoothPermission @RequiresNoPermission @Override @@ -2290,7 +2290,7 @@ public final class BluetoothAdapter { private static final String FILTERING_API = "isOffloadedFilteringSupported"; - private final PropertyInvalidatedCache<Void, Boolean> mBluetoothFilteringCache = + private final IpcDataCache<Void, Boolean> mBluetoothFilteringCache = new BluetoothCache<Void, Boolean>(FILTERING_API, mBluetoothFilteringQuery); /** @hide */ @@ -2810,8 +2810,8 @@ public final class BluetoothAdapter { return supportedProfiles; } - private final PropertyInvalidatedCache.QueryHandler<Void, Integer> mBluetoothGetAdapterQuery = - new PropertyInvalidatedCache.QueryHandler<>() { + private final IpcDataCache.QueryHandler<Void, Integer> mBluetoothGetAdapterQuery = + new IpcDataCache.QueryHandler<>() { @RequiresLegacyBluetoothPermission @RequiresNoPermission @Override @@ -2836,7 +2836,7 @@ public final class BluetoothAdapter { }}; private static final String GET_CONNECTION_API = "getAdapterConnectionState"; - private final PropertyInvalidatedCache<Void, Integer> + private final IpcDataCache<Void, Integer> mBluetoothGetAdapterConnectionStateCache = new BluetoothCache<Void, Integer>(GET_CONNECTION_API, mBluetoothGetAdapterQuery); @@ -2872,8 +2872,8 @@ public final class BluetoothAdapter { return mBluetoothGetAdapterConnectionStateCache.query(null); } - private final PropertyInvalidatedCache.QueryHandler<Integer, Integer> mBluetoothProfileQuery = - new PropertyInvalidatedCache.QueryHandler<>() { + private final IpcDataCache.QueryHandler<Integer, Integer> mBluetoothProfileQuery = + new IpcDataCache.QueryHandler<>() { @RequiresNoPermission @Override public Integer apply(Integer query) { @@ -2896,7 +2896,7 @@ public final class BluetoothAdapter { }}; private static final String PROFILE_API = "getProfileConnectionState"; - private final PropertyInvalidatedCache<Integer, Integer> + private final IpcDataCache<Integer, Integer> mGetProfileConnectionStateCache = new BluetoothCache<Integer, Integer>(PROFILE_API, mBluetoothProfileQuery); |