aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAdapter.java
diff options
context:
space:
mode:
authorLee Shombert <shombert@google.com>2022-01-04 08:10:15 -0800
committerLee Shombert <shombert@google.com>2022-01-04 08:13:59 -0800
commit22c36706af8b390b3ffce7c67a113906a98a76f0 (patch)
treeb166f156e91927ecd516edc27518aa9d9accd235 /framework/java/android/bluetooth/BluetoothAdapter.java
parent81c26c3865a9c014b7889f5ce62d345d5e359631 (diff)
Prepare PropertyInvalidatedCache for SystemApi
Bug: 152453213 Tag: #refactor This commit prepares PropertyInvalidatedCache to function as a system api. Specifically, the methods recompute() and bypass() which may be overridden by clients are now public (instead of protected). This forces an update to all existing clients, to accommodate the change in method visibility. Two small changes have been made as cleanup: 1. The awkwardly named debugCompareQueryResults() is now resultEquals(), which is more or less consistent with how other equality tests are named in Android. This name change affects two clients. 2. PackageManager has changed to use resultEquals() instead of maybeCheckConsistency(). This provides a simpler and more consistent use of the APIs. maybeCheckConsistency() has been made private. Test: atest PropertyInvalidatedCacheTests Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothAdapter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java
index 2d1ecfb5e0..856a8e1f81 100644
--- a/framework/java/android/bluetooth/BluetoothAdapter.java
+++ b/framework/java/android/bluetooth/BluetoothAdapter.java
@@ -1062,7 +1062,7 @@ public final class BluetoothAdapter {
8, BLUETOOTH_GET_STATE_CACHE_PROPERTY) {
@Override
@SuppressLint("AndroidFrameworkRequiresPermission")
- protected Integer recompute(Void query) {
+ public Integer recompute(Void query) {
try {
return mService.getState();
} catch (RemoteException e) {
@@ -2085,7 +2085,7 @@ public final class BluetoothAdapter {
8, BLUETOOTH_FILTERING_CACHE_PROPERTY) {
@Override
@SuppressLint("AndroidFrameworkRequiresPermission")
- protected Boolean recompute(Void query) {
+ public Boolean recompute(Void query) {
try {
mServiceLock.readLock().lock();
if (mService != null) {
@@ -2540,7 +2540,7 @@ public final class BluetoothAdapter {
*/
@Override
@SuppressLint("AndroidFrameworkRequiresPermission")
- protected Integer recompute(Void query) {
+ public Integer recompute(Void query) {
try {
return mService.getAdapterConnectionState();
} catch (RemoteException e) {
@@ -2605,7 +2605,7 @@ public final class BluetoothAdapter {
8, BLUETOOTH_PROFILE_CACHE_PROPERTY) {
@Override
@SuppressLint("AndroidFrameworkRequiresPermission")
- protected Integer recompute(Integer query) {
+ public Integer recompute(Integer query) {
try {
mServiceLock.readLock().lock();
if (mService != null) {