Address API feedback: rename to AntispoofKey
[Antispoofkey and AntiSpoofkey should be AntispoofKey]
Bug: 218682005
Test: Unit Test
Change-Id: I7328663895d8937eb9bdfc5ffebb18572692ccdd
diff --git a/nearby/framework/java/android/nearby/FastPairAntispoofkeyDeviceMetadata.java b/nearby/framework/java/android/nearby/FastPairAntispoofKeyDeviceMetadata.java
similarity index 78%
rename from nearby/framework/java/android/nearby/FastPairAntispoofkeyDeviceMetadata.java
rename to nearby/framework/java/android/nearby/FastPairAntispoofKeyDeviceMetadata.java
index f756020..32fd043 100644
--- a/nearby/framework/java/android/nearby/FastPairAntispoofkeyDeviceMetadata.java
+++ b/nearby/framework/java/android/nearby/FastPairAntispoofKeyDeviceMetadata.java
@@ -19,33 +19,33 @@
import android.annotation.Nullable;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataParcel;
/**
- * Class for a type of registered Fast Pair device keyed by modelID, or antiSpoofKey.
+ * Class for a type of registered Fast Pair device keyed by modelID, or antispoofKey.
* @hide
*/
@SystemApi
-public class FastPairAntispoofkeyDeviceMetadata {
+public class FastPairAntispoofKeyDeviceMetadata {
- FastPairAntispoofkeyDeviceMetadataParcel mMetadataParcel;
- FastPairAntispoofkeyDeviceMetadata(
- FastPairAntispoofkeyDeviceMetadataParcel metadataParcel) {
+ FastPairAntispoofKeyDeviceMetadataParcel mMetadataParcel;
+ FastPairAntispoofKeyDeviceMetadata(
+ FastPairAntispoofKeyDeviceMetadataParcel metadataParcel) {
this.mMetadataParcel = metadataParcel;
}
/**
- * Builder used to create FastPairAntisppofkeyDeviceMetadata.
+ * Builder used to create FastPairAntispoofKeyDeviceMetadata.
*/
public static final class Builder {
- private final FastPairAntispoofkeyDeviceMetadataParcel mBuilderParcel;
+ private final FastPairAntispoofKeyDeviceMetadataParcel mBuilderParcel;
/**
* Default constructor of Builder.
*/
public Builder() {
- mBuilderParcel = new FastPairAntispoofkeyDeviceMetadataParcel();
+ mBuilderParcel = new FastPairAntispoofKeyDeviceMetadataParcel();
mBuilderParcel.antiSpoofPublicKey = null;
mBuilderParcel.deviceMetadata = null;
}
@@ -78,11 +78,11 @@
}
/**
- * Build {@link FastPairAntispoofkeyDeviceMetadata} with the currently set configuration.
+ * Build {@link FastPairAntispoofKeyDeviceMetadata} with the currently set configuration.
*/
@NonNull
- public FastPairAntispoofkeyDeviceMetadata build() {
- return new FastPairAntispoofkeyDeviceMetadata(mBuilderParcel);
+ public FastPairAntispoofKeyDeviceMetadata build() {
+ return new FastPairAntispoofKeyDeviceMetadata(mBuilderParcel);
}
}
}
diff --git a/nearby/framework/java/android/nearby/FastPairDataProviderBase.java b/nearby/framework/java/android/nearby/FastPairDataProviderBase.java
index 57467b7..dfb8760 100644
--- a/nearby/framework/java/android/nearby/FastPairDataProviderBase.java
+++ b/nearby/framework/java/android/nearby/FastPairDataProviderBase.java
@@ -24,13 +24,13 @@
import android.nearby.aidl.ByteArrayParcel;
import android.nearby.aidl.FastPairAccountDevicesMetadataRequestParcel;
import android.nearby.aidl.FastPairAccountKeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataRequestParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataRequestParcel;
import android.nearby.aidl.FastPairEligibleAccountParcel;
import android.nearby.aidl.FastPairEligibleAccountsRequestParcel;
import android.nearby.aidl.FastPairManageAccountDeviceRequestParcel;
import android.nearby.aidl.FastPairManageAccountRequestParcel;
import android.nearby.aidl.IFastPairAccountDevicesMetadataCallback;
-import android.nearby.aidl.IFastPairAntispoofkeyDeviceMetadataCallback;
+import android.nearby.aidl.IFastPairAntispoofKeyDeviceMetadataCallback;
import android.nearby.aidl.IFastPairDataProvider;
import android.nearby.aidl.IFastPairEligibleAccountsCallback;
import android.nearby.aidl.IFastPairManageAccountCallback;
@@ -110,15 +110,15 @@
}
/**
- * Callback to be invoked when an antispoofkeyed device metadata is loaded.
+ * Callback to be invoked when an AntispoofKeyed device metadata is loaded.
*/
- public interface FastPairAntispoofkeyDeviceMetadataCallback {
+ public interface FastPairAntispoofKeyDeviceMetadataCallback {
/**
* Invoked once the meta data is loaded.
*/
- void onFastPairAntispoofkeyDeviceMetadataReceived(
- @NonNull FastPairAntispoofkeyDeviceMetadata metadata);
+ void onFastPairAntispoofKeyDeviceMetadataReceived(
+ @NonNull FastPairAntispoofKeyDeviceMetadata metadata);
/** Invoked in case of error. */
void onError(@ErrorCode int code, @Nullable String message);
}
@@ -166,9 +166,9 @@
* Fulfills the Fast Pair device metadata request by using callback to send back the
* device meta data of a given modelId.
*/
- public abstract void onLoadFastPairAntispoofkeyDeviceMetadata(
- @NonNull FastPairAntispoofkeyDeviceMetadataRequest request,
- @NonNull FastPairAntispoofkeyDeviceMetadataCallback callback);
+ public abstract void onLoadFastPairAntispoofKeyDeviceMetadata(
+ @NonNull FastPairAntispoofKeyDeviceMetadataRequest request,
+ @NonNull FastPairAntispoofKeyDeviceMetadataCallback callback);
/**
* Fulfills the account tied Fast Pair devices metadata request by using callback to send back
@@ -208,18 +208,18 @@
}
/**
- * Class for reading FastPairAntispoofkeyDeviceMetadataRequest.
+ * Class for reading FastPairAntispoofKeyDeviceMetadataRequest.
*/
- public static class FastPairAntispoofkeyDeviceMetadataRequest {
+ public static class FastPairAntispoofKeyDeviceMetadataRequest {
- private final FastPairAntispoofkeyDeviceMetadataRequestParcel mMetadataRequestParcel;
+ private final FastPairAntispoofKeyDeviceMetadataRequestParcel mMetadataRequestParcel;
- private FastPairAntispoofkeyDeviceMetadataRequest(
- final FastPairAntispoofkeyDeviceMetadataRequestParcel metaDataRequestParcel) {
+ private FastPairAntispoofKeyDeviceMetadataRequest(
+ final FastPairAntispoofKeyDeviceMetadataRequestParcel metaDataRequestParcel) {
this.mMetadataRequestParcel = metaDataRequestParcel;
}
- /** Get modelId, the key for FastPairAntispoofkeyDeviceMetadata. */
+ /** Get modelId, the key for FastPairAntispoofKeyDeviceMetadata. */
public @NonNull byte[] getModelId() {
return this.mMetadataRequestParcel.modelId;
}
@@ -338,26 +338,26 @@
}
/**
- * Callback class that sends back FastPairAntispoofkeyDeviceMetadata.
+ * Callback class that sends back FastPairAntispoofKeyDeviceMetadata.
*/
- private final class WrapperFastPairAntispoofkeyDeviceMetadataCallback implements
- FastPairAntispoofkeyDeviceMetadataCallback {
+ private final class WrapperFastPairAntispoofKeyDeviceMetadataCallback implements
+ FastPairAntispoofKeyDeviceMetadataCallback {
- private IFastPairAntispoofkeyDeviceMetadataCallback mCallback;
+ private IFastPairAntispoofKeyDeviceMetadataCallback mCallback;
- private WrapperFastPairAntispoofkeyDeviceMetadataCallback(
- IFastPairAntispoofkeyDeviceMetadataCallback callback) {
+ private WrapperFastPairAntispoofKeyDeviceMetadataCallback(
+ IFastPairAntispoofKeyDeviceMetadataCallback callback) {
mCallback = callback;
}
/**
- * Sends back FastPairAntispoofkeyDeviceMetadata.
+ * Sends back FastPairAntispoofKeyDeviceMetadata.
*/
@Override
- public void onFastPairAntispoofkeyDeviceMetadataReceived(
- @NonNull FastPairAntispoofkeyDeviceMetadata metadata) {
+ public void onFastPairAntispoofKeyDeviceMetadataReceived(
+ @NonNull FastPairAntispoofKeyDeviceMetadata metadata) {
try {
- mCallback.onFastPairAntispoofkeyDeviceMetadataReceived(metadata.mMetadataParcel);
+ mCallback.onFastPairAntispoofKeyDeviceMetadataReceived(metadata.mMetadataParcel);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
} catch (RuntimeException e) {
@@ -555,12 +555,12 @@
}
@Override
- public void loadFastPairAntispoofkeyDeviceMetadata(
- @NonNull FastPairAntispoofkeyDeviceMetadataRequestParcel requestParcel,
- IFastPairAntispoofkeyDeviceMetadataCallback callback) {
- onLoadFastPairAntispoofkeyDeviceMetadata(
- new FastPairAntispoofkeyDeviceMetadataRequest(requestParcel),
- new WrapperFastPairAntispoofkeyDeviceMetadataCallback(callback));
+ public void loadFastPairAntispoofKeyDeviceMetadata(
+ @NonNull FastPairAntispoofKeyDeviceMetadataRequestParcel requestParcel,
+ IFastPairAntispoofKeyDeviceMetadataCallback callback) {
+ onLoadFastPairAntispoofKeyDeviceMetadata(
+ new FastPairAntispoofKeyDeviceMetadataRequest(requestParcel),
+ new WrapperFastPairAntispoofKeyDeviceMetadataCallback(callback));
}
@Override
diff --git a/nearby/framework/java/android/nearby/aidl/FastPairAntispoofkeyDeviceMetadataParcel.aidl b/nearby/framework/java/android/nearby/aidl/FastPairAntispoofKeyDeviceMetadataParcel.aidl
similarity index 89%
rename from nearby/framework/java/android/nearby/aidl/FastPairAntispoofkeyDeviceMetadataParcel.aidl
rename to nearby/framework/java/android/nearby/aidl/FastPairAntispoofKeyDeviceMetadataParcel.aidl
index 8ca66d2..071d020 100644
--- a/nearby/framework/java/android/nearby/aidl/FastPairAntispoofkeyDeviceMetadataParcel.aidl
+++ b/nearby/framework/java/android/nearby/aidl/FastPairAntispoofKeyDeviceMetadataParcel.aidl
@@ -17,12 +17,12 @@
import android.nearby.aidl.FastPairDeviceMetadataParcel;
/**
- * Metadata of a Fast Pair device keyed by Antispoofkey,
+ * Metadata of a Fast Pair device keyed by AntispoofKey,
* Used by initial pairing without account association.
*
* {@hide}
*/
-parcelable FastPairAntispoofkeyDeviceMetadataParcel {
+parcelable FastPairAntispoofKeyDeviceMetadataParcel {
// Anti spoof public key.
byte[] antiSpoofPublicKey;
diff --git a/nearby/framework/java/android/nearby/aidl/FastPairAntispoofkeyDeviceMetadataRequestParcel.aidl b/nearby/framework/java/android/nearby/aidl/FastPairAntispoofKeyDeviceMetadataRequestParcel.aidl
similarity index 89%
rename from nearby/framework/java/android/nearby/aidl/FastPairAntispoofkeyDeviceMetadataRequestParcel.aidl
rename to nearby/framework/java/android/nearby/aidl/FastPairAntispoofKeyDeviceMetadataRequestParcel.aidl
index 175d73c..afdcf15 100644
--- a/nearby/framework/java/android/nearby/aidl/FastPairAntispoofkeyDeviceMetadataRequestParcel.aidl
+++ b/nearby/framework/java/android/nearby/aidl/FastPairAntispoofKeyDeviceMetadataRequestParcel.aidl
@@ -18,9 +18,9 @@
/**
* Request details for metadata of a Fast Pair device keyed by either
- * antispoofkey or modelId.
+ * antispoofKey or modelId.
* {@hide}
*/
-parcelable FastPairAntispoofkeyDeviceMetadataRequestParcel {
+parcelable FastPairAntispoofKeyDeviceMetadataRequestParcel {
byte[] modelId;
}
\ No newline at end of file
diff --git a/nearby/framework/java/android/nearby/aidl/IFastPairAntispoofkeyDeviceMetadataCallback.aidl b/nearby/framework/java/android/nearby/aidl/IFastPairAntispoofKeyDeviceMetadataCallback.aidl
similarity index 75%
rename from nearby/framework/java/android/nearby/aidl/IFastPairAntispoofkeyDeviceMetadataCallback.aidl
rename to nearby/framework/java/android/nearby/aidl/IFastPairAntispoofKeyDeviceMetadataCallback.aidl
index 87c9796..38abba4 100644
--- a/nearby/framework/java/android/nearby/aidl/IFastPairAntispoofkeyDeviceMetadataCallback.aidl
+++ b/nearby/framework/java/android/nearby/aidl/IFastPairAntispoofKeyDeviceMetadataCallback.aidl
@@ -14,14 +14,14 @@
package android.nearby.aidl;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataParcel;
/**
- * Provides callback interface for OEMs to send FastPair Antispoofkey Device metadata back.
+ * Provides callback interface for OEMs to send FastPair AntispoofKey Device metadata back.
*
* {@hide}
*/
-interface IFastPairAntispoofkeyDeviceMetadataCallback {
- void onFastPairAntispoofkeyDeviceMetadataReceived(in FastPairAntispoofkeyDeviceMetadataParcel metadata);
+interface IFastPairAntispoofKeyDeviceMetadataCallback {
+ void onFastPairAntispoofKeyDeviceMetadataReceived(in FastPairAntispoofKeyDeviceMetadataParcel metadata);
void onError(int code, String message);
}
\ No newline at end of file
diff --git a/nearby/framework/java/android/nearby/aidl/IFastPairDataProvider.aidl b/nearby/framework/java/android/nearby/aidl/IFastPairDataProvider.aidl
index 73aef9e..2956211 100644
--- a/nearby/framework/java/android/nearby/aidl/IFastPairDataProvider.aidl
+++ b/nearby/framework/java/android/nearby/aidl/IFastPairDataProvider.aidl
@@ -14,8 +14,8 @@
package android.nearby.aidl;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataRequestParcel;
-import android.nearby.aidl.IFastPairAntispoofkeyDeviceMetadataCallback;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataRequestParcel;
+import android.nearby.aidl.IFastPairAntispoofKeyDeviceMetadataCallback;
import android.nearby.aidl.FastPairAccountDevicesMetadataRequestParcel;
import android.nearby.aidl.IFastPairAccountDevicesMetadataCallback;
import android.nearby.aidl.FastPairEligibleAccountsRequestParcel;
@@ -31,8 +31,8 @@
* {@hide}
*/
oneway interface IFastPairDataProvider {
- void loadFastPairAntispoofkeyDeviceMetadata(in FastPairAntispoofkeyDeviceMetadataRequestParcel request,
- in IFastPairAntispoofkeyDeviceMetadataCallback callback);
+ void loadFastPairAntispoofKeyDeviceMetadata(in FastPairAntispoofKeyDeviceMetadataRequestParcel request,
+ in IFastPairAntispoofKeyDeviceMetadataCallback callback);
void loadFastPairAccountDevicesMetadata(in FastPairAccountDevicesMetadataRequestParcel request,
in IFastPairAccountDevicesMetadataCallback callback);
void loadFastPairEligibleAccounts(in FastPairEligibleAccountsRequestParcel request,
diff --git a/nearby/service/java/com/android/server/nearby/fastpair/FastPairAdvHandler.java b/nearby/service/java/com/android/server/nearby/fastpair/FastPairAdvHandler.java
index 4ee16b7..ac84199 100644
--- a/nearby/service/java/com/android/server/nearby/fastpair/FastPairAdvHandler.java
+++ b/nearby/service/java/com/android/server/nearby/fastpair/FastPairAdvHandler.java
@@ -83,7 +83,7 @@
// Use api to get anti spoofing key from model id.
try {
Rpcs.GetObservedDeviceResponse response =
- dataProvider.loadFastPairAntispoofkeyDeviceMetadata(model);
+ dataProvider.loadFastPairAntispoofKeyDeviceMetadata(model);
if (response == null) {
Log.e(TAG, "server does not have model id "
+ Hex.bytesToStringLowercase(model));
diff --git a/nearby/service/java/com/android/server/nearby/provider/FastPairDataProvider.java b/nearby/service/java/com/android/server/nearby/provider/FastPairDataProvider.java
index f4db578..35cb5d8 100644
--- a/nearby/service/java/com/android/server/nearby/provider/FastPairDataProvider.java
+++ b/nearby/service/java/com/android/server/nearby/provider/FastPairDataProvider.java
@@ -22,7 +22,7 @@
import android.nearby.FastPairDataProviderBase;
import android.nearby.aidl.ByteArrayParcel;
import android.nearby.aidl.FastPairAccountDevicesMetadataRequestParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataRequestParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataRequestParcel;
import android.nearby.aidl.FastPairEligibleAccountsRequestParcel;
import android.nearby.aidl.FastPairManageAccountDeviceRequestParcel;
import android.nearby.aidl.FastPairManageAccountRequestParcel;
@@ -81,20 +81,20 @@
}
/**
- * Loads FastPairAntispoofkeyDeviceMetadata.
+ * Loads FastPairAntispoofKeyDeviceMetadata.
*
* @throws IllegalStateException If ProxyFastPairDataProvider is not available.
*/
@WorkerThread
@Nullable
- public Rpcs.GetObservedDeviceResponse loadFastPairAntispoofkeyDeviceMetadata(byte[] modelId) {
+ public Rpcs.GetObservedDeviceResponse loadFastPairAntispoofKeyDeviceMetadata(byte[] modelId) {
if (mProxyFastPairDataProvider != null) {
- FastPairAntispoofkeyDeviceMetadataRequestParcel requestParcel =
- new FastPairAntispoofkeyDeviceMetadataRequestParcel();
+ FastPairAntispoofKeyDeviceMetadataRequestParcel requestParcel =
+ new FastPairAntispoofKeyDeviceMetadataRequestParcel();
requestParcel.modelId = modelId;
return Utils.convertToGetObservedDeviceResponse(
mProxyFastPairDataProvider
- .loadFastPairAntispoofkeyDeviceMetadata(requestParcel));
+ .loadFastPairAntispoofKeyDeviceMetadata(requestParcel));
}
throw new IllegalStateException("No ProxyFastPairDataProvider yet constructed");
}
diff --git a/nearby/service/java/com/android/server/nearby/provider/ProxyFastPairDataProvider.java b/nearby/service/java/com/android/server/nearby/provider/ProxyFastPairDataProvider.java
index 36b4478..f0ade6c 100644
--- a/nearby/service/java/com/android/server/nearby/provider/ProxyFastPairDataProvider.java
+++ b/nearby/service/java/com/android/server/nearby/provider/ProxyFastPairDataProvider.java
@@ -20,14 +20,14 @@
import android.content.Context;
import android.nearby.aidl.FastPairAccountDevicesMetadataRequestParcel;
import android.nearby.aidl.FastPairAccountKeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataRequestParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataRequestParcel;
import android.nearby.aidl.FastPairEligibleAccountParcel;
import android.nearby.aidl.FastPairEligibleAccountsRequestParcel;
import android.nearby.aidl.FastPairManageAccountDeviceRequestParcel;
import android.nearby.aidl.FastPairManageAccountRequestParcel;
import android.nearby.aidl.IFastPairAccountDevicesMetadataCallback;
-import android.nearby.aidl.IFastPairAntispoofkeyDeviceMetadataCallback;
+import android.nearby.aidl.IFastPairAntispoofKeyDeviceMetadataCallback;
import android.nearby.aidl.IFastPairDataProvider;
import android.nearby.aidl.IFastPairEligibleAccountsCallback;
import android.nearby.aidl.IFastPairManageAccountCallback;
@@ -218,25 +218,25 @@
}
/**
- * Invokes system api loadFastPairAntispoofkeyDeviceMetadata.
+ * Invokes system api loadFastPairAntispoofKeyDeviceMetadata.
*
* @return the Fast Pair AntispoofKeyDeviceMetadata of a given device.
*/
@WorkerThread
@Nullable
- FastPairAntispoofkeyDeviceMetadataParcel loadFastPairAntispoofkeyDeviceMetadata(
- FastPairAntispoofkeyDeviceMetadataRequestParcel requestParcel) {
+ FastPairAntispoofKeyDeviceMetadataParcel loadFastPairAntispoofKeyDeviceMetadata(
+ FastPairAntispoofKeyDeviceMetadataRequestParcel requestParcel) {
final CountDownLatch waitForCompletionLatch = new CountDownLatch(1);
- final AtomicReference<FastPairAntispoofkeyDeviceMetadataParcel> response =
+ final AtomicReference<FastPairAntispoofKeyDeviceMetadataParcel> response =
new AtomicReference<>();
mServiceMonitor.runOnBinder(new ServiceMonitor.BinderOperation() {
@Override
public void run(IBinder binder) throws RemoteException {
IFastPairDataProvider provider = IFastPairDataProvider.Stub.asInterface(binder);
- IFastPairAntispoofkeyDeviceMetadataCallback callback =
- new IFastPairAntispoofkeyDeviceMetadataCallback.Stub() {
- public void onFastPairAntispoofkeyDeviceMetadataReceived(
- FastPairAntispoofkeyDeviceMetadataParcel metadata) {
+ IFastPairAntispoofKeyDeviceMetadataCallback callback =
+ new IFastPairAntispoofKeyDeviceMetadataCallback.Stub() {
+ public void onFastPairAntispoofKeyDeviceMetadataReceived(
+ FastPairAntispoofKeyDeviceMetadataParcel metadata) {
response.set(metadata);
waitForCompletionLatch.countDown();
}
@@ -245,7 +245,7 @@
waitForCompletionLatch.countDown();
}
};
- provider.loadFastPairAntispoofkeyDeviceMetadata(requestParcel, callback);
+ provider.loadFastPairAntispoofKeyDeviceMetadata(requestParcel, callback);
}
@Override
diff --git a/nearby/service/java/com/android/server/nearby/provider/Utils.java b/nearby/service/java/com/android/server/nearby/provider/Utils.java
index b84dfe9..2c0cde6 100644
--- a/nearby/service/java/com/android/server/nearby/provider/Utils.java
+++ b/nearby/service/java/com/android/server/nearby/provider/Utils.java
@@ -19,7 +19,7 @@
import android.accounts.Account;
import android.annotation.Nullable;
import android.nearby.aidl.FastPairAccountKeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataParcel;
import android.nearby.aidl.FastPairDeviceMetadataParcel;
import android.nearby.aidl.FastPairDiscoveryItemParcel;
import android.nearby.aidl.FastPairEligibleAccountParcel;
@@ -298,7 +298,7 @@
}
private static @Nullable Rpcs.Device convertToDevice(
- FastPairAntispoofkeyDeviceMetadataParcel metadata) {
+ FastPairAntispoofKeyDeviceMetadataParcel metadata) {
Rpcs.Device.Builder deviceBuilder = Rpcs.Device.newBuilder();
if (metadata.antiSpoofPublicKey != null) {
@@ -341,7 +341,7 @@
}
private static @Nullable ByteString convertToImage(
- FastPairAntispoofkeyDeviceMetadataParcel metadata) {
+ FastPairAntispoofKeyDeviceMetadataParcel metadata) {
if (metadata.deviceMetadata == null || metadata.deviceMetadata.image == null) {
return null;
}
@@ -350,7 +350,7 @@
}
private static @Nullable Rpcs.ObservedDeviceStrings
- convertToObservedDeviceStrings(FastPairAntispoofkeyDeviceMetadataParcel metadata) {
+ convertToObservedDeviceStrings(FastPairAntispoofKeyDeviceMetadataParcel metadata) {
if (metadata.deviceMetadata == null) {
return null;
}
@@ -455,7 +455,7 @@
static @Nullable Rpcs.GetObservedDeviceResponse
convertToGetObservedDeviceResponse(
- @Nullable FastPairAntispoofkeyDeviceMetadataParcel metadata) {
+ @Nullable FastPairAntispoofKeyDeviceMetadataParcel metadata) {
if (metadata == null) {
return null;
}
diff --git a/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderBaseTest.java b/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderBaseTest.java
index fd9e294..68418f2 100644
--- a/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderBaseTest.java
+++ b/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderBaseTest.java
@@ -25,7 +25,7 @@
import android.accounts.Account;
import android.nearby.FastPairAccountKeyDeviceMetadata;
-import android.nearby.FastPairAntispoofkeyDeviceMetadata;
+import android.nearby.FastPairAntispoofKeyDeviceMetadata;
import android.nearby.FastPairDataProviderBase;
import android.nearby.FastPairDeviceMetadata;
import android.nearby.FastPairDiscoveryItem;
@@ -33,8 +33,8 @@
import android.nearby.aidl.ByteArrayParcel;
import android.nearby.aidl.FastPairAccountDevicesMetadataRequestParcel;
import android.nearby.aidl.FastPairAccountKeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataRequestParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataRequestParcel;
import android.nearby.aidl.FastPairDeviceMetadataParcel;
import android.nearby.aidl.FastPairDiscoveryItemParcel;
import android.nearby.aidl.FastPairEligibleAccountParcel;
@@ -42,7 +42,7 @@
import android.nearby.aidl.FastPairManageAccountDeviceRequestParcel;
import android.nearby.aidl.FastPairManageAccountRequestParcel;
import android.nearby.aidl.IFastPairAccountDevicesMetadataCallback;
-import android.nearby.aidl.IFastPairAntispoofkeyDeviceMetadataCallback;
+import android.nearby.aidl.IFastPairAntispoofKeyDeviceMetadataCallback;
import android.nearby.aidl.IFastPairDataProvider;
import android.nearby.aidl.IFastPairEligibleAccountsCallback;
import android.nearby.aidl.IFastPairManageAccountCallback;
@@ -178,9 +178,9 @@
genHappyPathFastPairAccountkeyDeviceMetadata(),
genHappyPathFastPairAccountkeyDeviceMetadata());
- private static final FastPairAntispoofkeyDeviceMetadataRequestParcel
+ private static final FastPairAntispoofKeyDeviceMetadataRequestParcel
FAST_PAIR_ANTI_SPOOF_KEY_DEVICE_METADATA_REQUEST_PARCEL =
- genFastPairAntispoofkeyDeviceMetadataRequestParcel();
+ genFastPairAntispoofKeyDeviceMetadataRequestParcel();
private static final FastPairAccountDevicesMetadataRequestParcel
FAST_PAIR_ACCOUNT_DEVICES_METADATA_REQUEST_PARCEL =
genFastPairAccountDevicesMetadataRequestParcel();
@@ -193,9 +193,9 @@
private static final FastPairManageAccountDeviceRequestParcel
FAST_PAIR_MANAGE_ACCOUNT_DEVICE_REQUEST_PARCEL =
genFastPairManageAccountDeviceRequestParcel();
- private static final FastPairAntispoofkeyDeviceMetadata
+ private static final FastPairAntispoofKeyDeviceMetadata
HAPPY_PATH_FAST_PAIR_ANTI_SPOOF_KEY_DEVICE_METADATA =
- genHappyPathFastPairAntispoofkeyDeviceMetadata();
+ genHappyPathFastPairAntispoofKeyDeviceMetadata();
@Captor private ArgumentCaptor<FastPairEligibleAccountParcel[]>
mFastPairEligibleAccountParcelsArgumentCaptor;
@@ -203,8 +203,8 @@
mFastPairAccountKeyDeviceMetadataParcelsArgumentCaptor;
@Mock private FastPairDataProviderBase mMockFastPairDataProviderBase;
- @Mock private IFastPairAntispoofkeyDeviceMetadataCallback.Stub
- mAntispoofkeyDeviceMetadataCallback;
+ @Mock private IFastPairAntispoofKeyDeviceMetadataCallback.Stub
+ mAntispoofKeyDeviceMetadataCallback;
@Mock private IFastPairAccountDevicesMetadataCallback.Stub mAccountDevicesMetadataCallback;
@Mock private IFastPairEligibleAccountsCallback.Stub mEligibleAccountsCallback;
@Mock private IFastPairManageAccountCallback.Stub mManageAccountCallback;
@@ -225,29 +225,29 @@
@Test
@SdkSuppress(minSdkVersion = 32, codeName = "T")
- public void testHappyPathLoadFastPairAntispoofkeyDeviceMetadata() throws Exception {
+ public void testHappyPathLoadFastPairAntispoofKeyDeviceMetadata() throws Exception {
// AOSP sends calls to OEM via Parcelable.
- mHappyPathFastPairDataProvider.asProvider().loadFastPairAntispoofkeyDeviceMetadata(
+ mHappyPathFastPairDataProvider.asProvider().loadFastPairAntispoofKeyDeviceMetadata(
FAST_PAIR_ANTI_SPOOF_KEY_DEVICE_METADATA_REQUEST_PARCEL,
- mAntispoofkeyDeviceMetadataCallback);
+ mAntispoofKeyDeviceMetadataCallback);
// OEM receives request and verifies that it is as expected.
- final ArgumentCaptor<FastPairDataProviderBase.FastPairAntispoofkeyDeviceMetadataRequest>
- fastPairAntispoofkeyDeviceMetadataRequestCaptor =
+ final ArgumentCaptor<FastPairDataProviderBase.FastPairAntispoofKeyDeviceMetadataRequest>
+ fastPairAntispoofKeyDeviceMetadataRequestCaptor =
ArgumentCaptor.forClass(
- FastPairDataProviderBase.FastPairAntispoofkeyDeviceMetadataRequest.class);
- verify(mMockFastPairDataProviderBase).onLoadFastPairAntispoofkeyDeviceMetadata(
- fastPairAntispoofkeyDeviceMetadataRequestCaptor.capture(),
- any(FastPairDataProviderBase.FastPairAntispoofkeyDeviceMetadataCallback.class));
- ensureHappyPathAsExpected(fastPairAntispoofkeyDeviceMetadataRequestCaptor.getValue());
+ FastPairDataProviderBase.FastPairAntispoofKeyDeviceMetadataRequest.class);
+ verify(mMockFastPairDataProviderBase).onLoadFastPairAntispoofKeyDeviceMetadata(
+ fastPairAntispoofKeyDeviceMetadataRequestCaptor.capture(),
+ any(FastPairDataProviderBase.FastPairAntispoofKeyDeviceMetadataCallback.class));
+ ensureHappyPathAsExpected(fastPairAntispoofKeyDeviceMetadataRequestCaptor.getValue());
// AOSP receives responses and verifies that it is as expected.
- final ArgumentCaptor<FastPairAntispoofkeyDeviceMetadataParcel>
- fastPairAntispoofkeyDeviceMetadataParcelCaptor =
- ArgumentCaptor.forClass(FastPairAntispoofkeyDeviceMetadataParcel.class);
- verify(mAntispoofkeyDeviceMetadataCallback).onFastPairAntispoofkeyDeviceMetadataReceived(
- fastPairAntispoofkeyDeviceMetadataParcelCaptor.capture());
- ensureHappyPathAsExpected(fastPairAntispoofkeyDeviceMetadataParcelCaptor.getValue());
+ final ArgumentCaptor<FastPairAntispoofKeyDeviceMetadataParcel>
+ fastPairAntispoofKeyDeviceMetadataParcelCaptor =
+ ArgumentCaptor.forClass(FastPairAntispoofKeyDeviceMetadataParcel.class);
+ verify(mAntispoofKeyDeviceMetadataCallback).onFastPairAntispoofKeyDeviceMetadataReceived(
+ fastPairAntispoofKeyDeviceMetadataParcelCaptor.capture());
+ ensureHappyPathAsExpected(fastPairAntispoofKeyDeviceMetadataParcelCaptor.getValue());
}
@Test
@@ -345,14 +345,14 @@
@Test
@SdkSuppress(minSdkVersion = 32, codeName = "T")
- public void testErrorPathLoadFastPairAntispoofkeyDeviceMetadata() throws Exception {
- mErrorPathFastPairDataProvider.asProvider().loadFastPairAntispoofkeyDeviceMetadata(
+ public void testErrorPathLoadFastPairAntispoofKeyDeviceMetadata() throws Exception {
+ mErrorPathFastPairDataProvider.asProvider().loadFastPairAntispoofKeyDeviceMetadata(
FAST_PAIR_ANTI_SPOOF_KEY_DEVICE_METADATA_REQUEST_PARCEL,
- mAntispoofkeyDeviceMetadataCallback);
- verify(mMockFastPairDataProviderBase).onLoadFastPairAntispoofkeyDeviceMetadata(
- any(FastPairDataProviderBase.FastPairAntispoofkeyDeviceMetadataRequest.class),
- any(FastPairDataProviderBase.FastPairAntispoofkeyDeviceMetadataCallback.class));
- verify(mAntispoofkeyDeviceMetadataCallback).onError(
+ mAntispoofKeyDeviceMetadataCallback);
+ verify(mMockFastPairDataProviderBase).onLoadFastPairAntispoofKeyDeviceMetadata(
+ any(FastPairDataProviderBase.FastPairAntispoofKeyDeviceMetadataRequest.class),
+ any(FastPairDataProviderBase.FastPairAntispoofKeyDeviceMetadataCallback.class));
+ verify(mAntispoofKeyDeviceMetadataCallback).onError(
eq(ERROR_CODE_BAD_REQUEST), eq(ERROR_STRING));
}
@@ -420,12 +420,12 @@
}
@Override
- public void onLoadFastPairAntispoofkeyDeviceMetadata(
- @NonNull FastPairAntispoofkeyDeviceMetadataRequest request,
- @NonNull FastPairAntispoofkeyDeviceMetadataCallback callback) {
- mMockFastPairDataProviderBase.onLoadFastPairAntispoofkeyDeviceMetadata(
+ public void onLoadFastPairAntispoofKeyDeviceMetadata(
+ @NonNull FastPairAntispoofKeyDeviceMetadataRequest request,
+ @NonNull FastPairAntispoofKeyDeviceMetadataCallback callback) {
+ mMockFastPairDataProviderBase.onLoadFastPairAntispoofKeyDeviceMetadata(
request, callback);
- callback.onFastPairAntispoofkeyDeviceMetadataReceived(
+ callback.onFastPairAntispoofKeyDeviceMetadataReceived(
HAPPY_PATH_FAST_PAIR_ANTI_SPOOF_KEY_DEVICE_METADATA);
}
@@ -478,10 +478,10 @@
}
@Override
- public void onLoadFastPairAntispoofkeyDeviceMetadata(
- @NonNull FastPairAntispoofkeyDeviceMetadataRequest request,
- @NonNull FastPairAntispoofkeyDeviceMetadataCallback callback) {
- mMockFastPairDataProviderBase.onLoadFastPairAntispoofkeyDeviceMetadata(
+ public void onLoadFastPairAntispoofKeyDeviceMetadata(
+ @NonNull FastPairAntispoofKeyDeviceMetadataRequest request,
+ @NonNull FastPairAntispoofKeyDeviceMetadataCallback callback) {
+ mMockFastPairDataProviderBase.onLoadFastPairAntispoofKeyDeviceMetadata(
request, callback);
callback.onError(ERROR_CODE_BAD_REQUEST, ERROR_STRING);
}
@@ -519,11 +519,11 @@
}
}
- /* Generates AntispoofkeyDeviceMetadataRequestParcel. */
- private static FastPairAntispoofkeyDeviceMetadataRequestParcel
- genFastPairAntispoofkeyDeviceMetadataRequestParcel() {
- FastPairAntispoofkeyDeviceMetadataRequestParcel requestParcel =
- new FastPairAntispoofkeyDeviceMetadataRequestParcel();
+ /* Generates AntispoofKeyDeviceMetadataRequestParcel. */
+ private static FastPairAntispoofKeyDeviceMetadataRequestParcel
+ genFastPairAntispoofKeyDeviceMetadataRequestParcel() {
+ FastPairAntispoofKeyDeviceMetadataRequestParcel requestParcel =
+ new FastPairAntispoofKeyDeviceMetadataRequestParcel();
requestParcel.modelId = REQUEST_MODEL_ID;
return requestParcel;
@@ -579,11 +579,11 @@
return requestParcel;
}
- /* Generates Happy Path AntispoofkeyDeviceMetadata. */
- private static FastPairAntispoofkeyDeviceMetadata
- genHappyPathFastPairAntispoofkeyDeviceMetadata() {
- FastPairAntispoofkeyDeviceMetadata.Builder builder =
- new FastPairAntispoofkeyDeviceMetadata.Builder();
+ /* Generates Happy Path AntispoofKeyDeviceMetadata. */
+ private static FastPairAntispoofKeyDeviceMetadata
+ genHappyPathFastPairAntispoofKeyDeviceMetadata() {
+ FastPairAntispoofKeyDeviceMetadata.Builder builder =
+ new FastPairAntispoofKeyDeviceMetadata.Builder();
builder.setAntiSpoofPublicKey(ANTI_SPOOFING_KEY);
builder.setFastPairDeviceMetadata(genHappyPathFastPairDeviceMetadata());
@@ -791,9 +791,9 @@
return builder.build();
}
- /* Verifies Happy Path AntispoofkeyDeviceMetadataRequest. */
+ /* Verifies Happy Path AntispoofKeyDeviceMetadataRequest. */
private static void ensureHappyPathAsExpected(
- FastPairDataProviderBase.FastPairAntispoofkeyDeviceMetadataRequest request) {
+ FastPairDataProviderBase.FastPairAntispoofKeyDeviceMetadataRequest request) {
assertThat(request.getModelId()).isEqualTo(REQUEST_MODEL_ID);
}
@@ -829,9 +829,9 @@
ensureHappyPathAsExpected(request.getAccountKeyDeviceMetadata());
}
- /* Verifies Happy Path AntispoofkeyDeviceMetadataParcel. */
+ /* Verifies Happy Path AntispoofKeyDeviceMetadataParcel. */
private static void ensureHappyPathAsExpected(
- FastPairAntispoofkeyDeviceMetadataParcel metadataParcel) {
+ FastPairAntispoofKeyDeviceMetadataParcel metadataParcel) {
assertThat(metadataParcel).isNotNull();
assertThat(metadataParcel.antiSpoofPublicKey).isEqualTo(ANTI_SPOOFING_KEY);
ensureHappyPathAsExpected(metadataParcel.deviceMetadata);
diff --git a/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/FastPairSeekerSnippet.kt b/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/FastPairSeekerSnippet.kt
index 8f5d120..4381d51 100644
--- a/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/FastPairSeekerSnippet.kt
+++ b/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/FastPairSeekerSnippet.kt
@@ -73,15 +73,15 @@
appContext.sendBroadcast(scanIntent)
}
- /** Puts a model id to FastPairAntiSpoofKeyDeviceMetadata pair into test data cache.
+ /** Puts a model id to FastPairAntispoofKeyDeviceMetadata pair into test data cache.
*
* @param modelId a string of model id to be associated with.
- * @param json a string of FastPairAntiSpoofKeyDeviceMetadata JSON object.
+ * @param json a string of FastPairAntispoofKeyDeviceMetadata JSON object.
*/
- @Rpc(description = "Puts a model id to FastPairAntiSpoofKeyDeviceMetadata pair into test data cache.")
- fun putAntiSpoofKeyDeviceMetadata(modelId: String, json: String) {
- Log.i("Puts a model id to FastPairAntiSpoofKeyDeviceMetadata pair into test data cache.")
- FastPairTestDataCache.putAntiSpoofKeyDeviceMetadata(modelId, json)
+ @Rpc(description = "Puts a model id to FastPairAntispoofKeyDeviceMetadata pair into test data cache.")
+ fun putAntispoofKeyDeviceMetadata(modelId: String, json: String) {
+ Log.i("Puts a model id to FastPairAntispoofKeyDeviceMetadata pair into test data cache.")
+ FastPairTestDataCache.putAntispoofKeyDeviceMetadata(modelId, json)
}
/** Puts an array of FastPairAccountKeyDeviceMetadata into test data cache.
diff --git a/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataCache.kt b/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataCache.kt
index ad2b40d..481f407 100644
--- a/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataCache.kt
+++ b/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataCache.kt
@@ -17,7 +17,7 @@
package android.nearby.multidevices.fastpair.seeker.dataprovider
import android.nearby.FastPairAccountKeyDeviceMetadata
-import android.nearby.FastPairAntispoofkeyDeviceMetadata
+import android.nearby.FastPairAntispoofKeyDeviceMetadata
import android.nearby.FastPairDeviceMetadata
import android.nearby.FastPairDiscoveryItem
import com.google.common.io.BaseEncoding
@@ -28,8 +28,8 @@
object FastPairTestDataCache {
private val gson = Gson()
val accountKeyDeviceMetadata = mutableListOf<FastPairAccountKeyDeviceMetadata>()
- val antiSpoofKeyDeviceMetadataMap =
- mutableMapOf<String, FastPairAntispoofkeyDeviceMetadata>()
+ val antispoofKeyDeviceMetadataMap =
+ mutableMapOf<String, FastPairAntispoofKeyDeviceMetadata>()
fun putAccountKeyDeviceMetadata(json: String) {
accountKeyDeviceMetadata +=
@@ -40,15 +40,15 @@
fun dumpAccountKeyDeviceMetadata(): String =
gson.toJson(accountKeyDeviceMetadata.map { FastPairAccountKeyDeviceMetadataData(it) })
- fun putAntiSpoofKeyDeviceMetadata(modelId: String, json: String) {
- antiSpoofKeyDeviceMetadataMap[modelId] =
- gson.fromJson(json, FastPairAntiSpoofKeyDeviceMetadataData::class.java)
- .toFastPairAntispoofkeyDeviceMetadata()
+ fun putAntispoofKeyDeviceMetadata(modelId: String, json: String) {
+ antispoofKeyDeviceMetadataMap[modelId] =
+ gson.fromJson(json, FastPairAntispoofKeyDeviceMetadataData::class.java)
+ .toFastPairAntispoofKeyDeviceMetadata()
}
fun reset() {
accountKeyDeviceMetadata.clear()
- antiSpoofKeyDeviceMetadataMap.clear()
+ antispoofKeyDeviceMetadataMap.clear()
}
data class FastPairAccountKeyDeviceMetadataData(
@@ -74,12 +74,12 @@
}
}
- data class FastPairAntiSpoofKeyDeviceMetadataData(
+ data class FastPairAntispoofKeyDeviceMetadataData(
@SerializedName("anti_spoofing_public_key_str") val antiSpoofPublicKey: String?,
@SerializedName("fast_pair_device_metadata") val deviceMeta: FastPairDeviceMetadataData?,
) {
- fun toFastPairAntispoofkeyDeviceMetadata(): FastPairAntispoofkeyDeviceMetadata {
- return FastPairAntispoofkeyDeviceMetadata.Builder()
+ fun toFastPairAntispoofKeyDeviceMetadata(): FastPairAntispoofKeyDeviceMetadata {
+ return FastPairAntispoofKeyDeviceMetadata.Builder()
.setAntiSpoofPublicKey(antiSpoofPublicKey?.base64Decode())
.setFastPairDeviceMetadata(deviceMeta?.toFastPairDeviceMetadata())
.build()
diff --git a/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataProvider.kt b/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataProvider.kt
index 9ff513a..53daebd 100644
--- a/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataProvider.kt
+++ b/nearby/tests/multidevices/clients/src/android/nearby/multidevices/fastpair/seeker/dataprovider/FastPairTestDataProvider.kt
@@ -23,17 +23,17 @@
class FastPairTestDataProvider : FastPairDataProviderBase(TAG) {
- override fun onLoadFastPairAntispoofkeyDeviceMetadata(
- request: FastPairAntispoofkeyDeviceMetadataRequest,
- callback: FastPairAntispoofkeyDeviceMetadataCallback
+ override fun onLoadFastPairAntispoofKeyDeviceMetadata(
+ request: FastPairAntispoofKeyDeviceMetadataRequest,
+ callback: FastPairAntispoofKeyDeviceMetadataCallback
) {
val requestedModelId = request.modelId.bytesToStringLowerCase()
- Log.d(TAG, "onLoadFastPairAntispoofkeyDeviceMetadata(modelId: $requestedModelId)")
+ Log.d(TAG, "onLoadFastPairAntispoofKeyDeviceMetadata(modelId: $requestedModelId)")
- val fastPairAntiSpoofKeyDeviceMetadata =
- FastPairTestDataCache.antiSpoofKeyDeviceMetadataMap[requestedModelId]
- if (fastPairAntiSpoofKeyDeviceMetadata != null) {
- callback.onFastPairAntispoofkeyDeviceMetadataReceived(fastPairAntiSpoofKeyDeviceMetadata)
+ val fastPairAntispoofKeyDeviceMetadata =
+ FastPairTestDataCache.antispoofKeyDeviceMetadataMap[requestedModelId]
+ if (fastPairAntispoofKeyDeviceMetadata != null) {
+ callback.onFastPairAntispoofKeyDeviceMetadataReceived(fastPairAntispoofKeyDeviceMetadata)
} else {
callback.onError(ERROR_CODE_BAD_REQUEST, "No metadata available for $requestedModelId")
}
diff --git a/nearby/tests/unit/src/com/android/server/nearby/provider/UtilsTest.java b/nearby/tests/unit/src/com/android/server/nearby/provider/UtilsTest.java
index 08a3c7c..6d04f2b 100644
--- a/nearby/tests/unit/src/com/android/server/nearby/provider/UtilsTest.java
+++ b/nearby/tests/unit/src/com/android/server/nearby/provider/UtilsTest.java
@@ -20,7 +20,7 @@
import android.accounts.Account;
import android.nearby.aidl.FastPairAccountKeyDeviceMetadataParcel;
-import android.nearby.aidl.FastPairAntispoofkeyDeviceMetadataParcel;
+import android.nearby.aidl.FastPairAntispoofKeyDeviceMetadataParcel;
import android.nearby.aidl.FastPairDeviceMetadataParcel;
import android.nearby.aidl.FastPairDiscoveryItemParcel;
import android.nearby.aidl.FastPairEligibleAccountParcel;
@@ -240,7 +240,7 @@
public void testHappyPathConvertToGetObservedDeviceResponse() {
Rpcs.GetObservedDeviceResponse response =
Utils.convertToGetObservedDeviceResponse(
- genHappyPathFastPairAntispoofkeyDeviceMetadataParcel());
+ genHappyPathFastPairAntispoofKeyDeviceMetadataParcel());
assertThat(response).isEqualTo(genHappyPathObservedDeviceResponse());
}
@@ -255,14 +255,14 @@
@SdkSuppress(minSdkVersion = 32, codeName = "T")
public void testConvertToGetObservedDeviceResponseWithEmptyInputNotCrash() {
Utils.convertToGetObservedDeviceResponse(
- genEmptyFastPairAntispoofkeyDeviceMetadataParcel());
+ genEmptyFastPairAntispoofKeyDeviceMetadataParcel());
}
@Test
@SdkSuppress(minSdkVersion = 32, codeName = "T")
public void testConvertToGetObservedDeviceResponseWithEmptyDeviceMetadataNotCrash() {
Utils.convertToGetObservedDeviceResponse(
- genFastPairAntispoofkeyDeviceMetadataParcelWithEmptyDeviceMetadata());
+ genFastPairAntispoofKeyDeviceMetadataParcelWithEmptyDeviceMetadata());
}
@Test
@@ -706,28 +706,28 @@
.build();
}
- private static FastPairAntispoofkeyDeviceMetadataParcel
- genHappyPathFastPairAntispoofkeyDeviceMetadataParcel() {
- FastPairAntispoofkeyDeviceMetadataParcel parcel =
- new FastPairAntispoofkeyDeviceMetadataParcel();
+ private static FastPairAntispoofKeyDeviceMetadataParcel
+ genHappyPathFastPairAntispoofKeyDeviceMetadataParcel() {
+ FastPairAntispoofKeyDeviceMetadataParcel parcel =
+ new FastPairAntispoofKeyDeviceMetadataParcel();
parcel.antiSpoofPublicKey = ANTI_SPOOFING_KEY;
parcel.deviceMetadata = genHappyPathFastPairDeviceMetadataParcel();
return parcel;
}
- private static FastPairAntispoofkeyDeviceMetadataParcel
- genFastPairAntispoofkeyDeviceMetadataParcelWithEmptyDeviceMetadata() {
- FastPairAntispoofkeyDeviceMetadataParcel parcel =
- new FastPairAntispoofkeyDeviceMetadataParcel();
+ private static FastPairAntispoofKeyDeviceMetadataParcel
+ genFastPairAntispoofKeyDeviceMetadataParcelWithEmptyDeviceMetadata() {
+ FastPairAntispoofKeyDeviceMetadataParcel parcel =
+ new FastPairAntispoofKeyDeviceMetadataParcel();
parcel.antiSpoofPublicKey = ANTI_SPOOFING_KEY;
parcel.deviceMetadata = genEmptyFastPairDeviceMetadataParcel();
return parcel;
}
- private static FastPairAntispoofkeyDeviceMetadataParcel
- genEmptyFastPairAntispoofkeyDeviceMetadataParcel() {
- return new FastPairAntispoofkeyDeviceMetadataParcel();
+ private static FastPairAntispoofKeyDeviceMetadataParcel
+ genEmptyFastPairAntispoofKeyDeviceMetadataParcel() {
+ return new FastPairAntispoofKeyDeviceMetadataParcel();
}
}