Merge "Move load account info inside try block fix exception not catch" into tm-dev
diff --git a/framework-t/api/system-current.txt b/framework-t/api/system-current.txt
index 03f9c8e..9fe55ce 100644
--- a/framework-t/api/system-current.txt
+++ b/framework-t/api/system-current.txt
@@ -123,7 +123,6 @@
public static class FastPairDataProviderService.FastPairManageAccountDeviceRequest {
method @NonNull public android.accounts.Account getAccount();
method @NonNull public android.nearby.FastPairAccountKeyDeviceMetadata getAccountKeyDeviceMetadata();
- method @Nullable public String getBleAddress();
method public int getRequestType();
}
@@ -138,32 +137,22 @@
}
public class FastPairDeviceMetadata {
- method @Nullable public String getAssistantSetupHalfSheet();
- method @Nullable public String getAssistantSetupNotification();
method public int getBleTxPower();
- method @Nullable public String getConfirmPinDescription();
- method @Nullable public String getConfirmPinTitle();
method @Nullable public String getConnectSuccessCompanionAppInstalled();
method @Nullable public String getConnectSuccessCompanionAppNotInstalled();
method public int getDeviceType();
method @Nullable public String getDownloadCompanionAppDescription();
method @Nullable public String getFailConnectGoToSettingsDescription();
- method @Nullable public String getFastPairTvConnectDeviceNoAccountDescription();
method @Nullable public byte[] getImage();
method @Nullable public String getImageUrl();
method @Nullable public String getInitialNotificationDescription();
method @Nullable public String getInitialNotificationDescriptionNoAccount();
method @Nullable public String getInitialPairingDescription();
method @Nullable public String getIntentUri();
- method @Nullable public String getLocale();
method @Nullable public String getName();
method @Nullable public String getOpenCompanionAppDescription();
method @Nullable public String getRetroactivePairingDescription();
method @Nullable public String getSubsequentPairingDescription();
- method @Nullable public String getSyncContactsDescription();
- method @Nullable public String getSyncContactsTitle();
- method @Nullable public String getSyncSmsDescription();
- method @Nullable public String getSyncSmsTitle();
method public float getTriggerDistance();
method @Nullable public String getTrueWirelessImageUrlCase();
method @Nullable public String getTrueWirelessImageUrlLeftBud();
@@ -177,32 +166,22 @@
public static final class FastPairDeviceMetadata.Builder {
ctor public FastPairDeviceMetadata.Builder();
method @NonNull public android.nearby.FastPairDeviceMetadata build();
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setAssistantSetupHalfSheet(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setAssistantSetupNotification(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setBleTxPower(int);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConfirmPinDescription(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConfirmPinTitle(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConnectSuccessCompanionAppInstalled(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setConnectSuccessCompanionAppNotInstalled(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setDeviceType(int);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setDownloadCompanionAppDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setFailConnectGoToSettingsDescription(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setFastPairTvConnectDeviceNoAccountDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setImage(@Nullable byte[]);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setImageUrl(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialNotificationDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialNotificationDescriptionNoAccount(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setInitialPairingDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setIntentUri(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setLocale(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setName(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setOpenCompanionAppDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setRetroactivePairingDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSubsequentPairingDescription(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncContactsDescription(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncContactsTitle(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncSmsDescription(@Nullable String);
- method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setSyncSmsTitle(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTriggerDistance(float);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlCase(@Nullable String);
method @NonNull public android.nearby.FastPairDeviceMetadata.Builder setTrueWirelessImageUrlLeftBud(@Nullable String);
@@ -217,24 +196,15 @@
method @Nullable public String getActionUrl();
method public int getActionUrlType();
method @Nullable public String getAppName();
- method public int getAttachmentType();
method @Nullable public byte[] getAuthenticationPublicKeySecp256r1();
- method @Nullable public byte[] getBleRecordBytes();
- method public int getDebugCategory();
- method @Nullable public String getDebugMessage();
method @Nullable public String getDescription();
method @Nullable public String getDeviceName();
method @Nullable public String getDisplayUrl();
- method @Nullable public String getEntityId();
- method @Nullable public String getFeatureGraphicUrl();
method public long getFirstObservationTimestampMillis();
- method @Nullable public String getGroupId();
method @Nullable public String getIconFfeUrl();
method @Nullable public byte[] getIconPng();
method @Nullable public String getId();
method public long getLastObservationTimestampMillis();
- method public int getLastUserExperience();
- method public long getLostMillis();
method @Nullable public String getMacAddress();
method @Nullable public String getPackageName();
method public long getPendingAppInstallTimestampMillis();
@@ -243,7 +213,6 @@
method @Nullable public String getTitle();
method @Nullable public String getTriggerId();
method public int getTxPower();
- method public int getType();
}
public static final class FastPairDiscoveryItem.Builder {
@@ -252,24 +221,15 @@
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setActionUrl(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setActionUrlType(int);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAppName(@Nullable String);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAttachmentType(int);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setAuthenticationPublicKeySecp256r1(@Nullable byte[]);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setBleRecordBytes(@Nullable byte[]);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDebugCategory(int);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDebugMessage(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDescription(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDeviceName(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setDisplayUrl(@Nullable String);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setEntityId(@Nullable String);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setFeatureGraphicUrl(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setFirstObservationTimestampMillis(long);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setGroupId(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setIconFfeUrl(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setIconPng(@Nullable byte[]);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setId(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLastObservationTimestampMillis(long);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLastUserExperience(int);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setLostMillis(long);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setMacAddress(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setPackageName(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setPendingAppInstallTimestampMillis(long);
@@ -278,7 +238,6 @@
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTitle(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTriggerId(@Nullable String);
method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setTxPower(int);
- method @NonNull public android.nearby.FastPairDiscoveryItem.Builder setType(int);
}
public class FastPairEligibleAccount {
@@ -445,10 +404,8 @@
field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2
field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0
field public static final int SCAN_MODE_NO_POWER = -1; // 0xffffffff
- field public static final int SCAN_TYPE_EXPOSURE_NOTIFICATION = 4; // 0x4
field public static final int SCAN_TYPE_FAST_PAIR = 1; // 0x1
- field public static final int SCAN_TYPE_NEARBY_PRESENCE = 3; // 0x3
- field public static final int SCAN_TYPE_NEARBY_SHARE = 2; // 0x2
+ field public static final int SCAN_TYPE_NEARBY_PRESENCE = 2; // 0x2
}
public static final class ScanRequest.Builder {
diff --git a/nearby/framework/java/android/nearby/FastPairDataProviderService.java b/nearby/framework/java/android/nearby/FastPairDataProviderService.java
index c6a1a65..b6c840d 100644
--- a/nearby/framework/java/android/nearby/FastPairDataProviderService.java
+++ b/nearby/framework/java/android/nearby/FastPairDataProviderService.java
@@ -479,15 +479,6 @@
return this.mRequestParcel.account;
}
/**
- * Get BleAddress.
- *
- * @hide
- */
- @SystemApi
- public @Nullable String getBleAddress() {
- return this.mRequestParcel.bleAddress;
- }
- /**
* Get account key device metadata.
*
* @hide
diff --git a/nearby/framework/java/android/nearby/FastPairDeviceMetadata.java b/nearby/framework/java/android/nearby/FastPairDeviceMetadata.java
index ea75271..04845c0 100644
--- a/nearby/framework/java/android/nearby/FastPairDeviceMetadata.java
+++ b/nearby/framework/java/android/nearby/FastPairDeviceMetadata.java
@@ -149,17 +149,6 @@
}
/**
- * Get Locale of the device.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getLocale() {
- return mMetadataParcel.locale;
- }
-
- /**
* Get InitialNotificationDescription, which is a translated string of
* "Tap to pair. Earbuds will be tied to %s" based on locale.
*
@@ -325,111 +314,6 @@
}
/**
- * Get ConfirmPinTitle, which is a translated string of
- * based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getConfirmPinTitle() {
- return mMetadataParcel.confirmPinTitle;
- }
-
- /**
- * Get ConfirmPinDescription, which is a translated string of "confirm pin" based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getConfirmPinDescription() {
- return mMetadataParcel.confirmPinDescription;
- }
-
- /**
- * Get SyncContactsTitle, which is a translated string of "sync contacts title" based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getSyncContactsTitle() {
- return mMetadataParcel.syncContactsTitle;
- }
-
- /**
- * Get SyncContactsDescription, which is a translated string of "sync contacts description"
- * based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getSyncContactsDescription() {
- return mMetadataParcel.syncContactsDescription;
- }
-
- /**
- * Get SyncSmsTitle, which is a translated string of "sync sms title" based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getSyncSmsTitle() {
- return mMetadataParcel.syncSmsTitle;
- }
-
- /**
- * Get SyncSmsDescription, which is a translated string of "sync sms description" based on
- * locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getSyncSmsDescription() {
- return mMetadataParcel.syncSmsDescription;
- }
-
- /**
- * Get AssistantSetupHalfSheet, which is a translated string of
- * "Tap to set up your Google Assistant" based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getAssistantSetupHalfSheet() {
- return mMetadataParcel.assistantSetupHalfSheet;
- }
-
- /**
- * Get AssistantSetupNotification, which is a translated string of
- * "Tap to set up your Google Assistant" based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getAssistantSetupNotification() {
- return mMetadataParcel.assistantSetupNotification;
- }
-
- /**
- * Get FastPairTvConnectDeviceNoAccountDescription, which is a translated string of
- * "Select connect to pair your %s with this device" based on locale.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getFastPairTvConnectDeviceNoAccountDescription() {
- return mMetadataParcel.fastPairTvConnectDeviceNoAccountDescription;
- }
-
- /**
* Builder used to create FastPairDeviceMetadata.
*
* @hide
@@ -457,7 +341,6 @@
mBuilderParcel.trueWirelessImageUrlLeftBud = null;
mBuilderParcel.trueWirelessImageUrlRightBud = null;
mBuilderParcel.trueWirelessImageUrlCase = null;
- mBuilderParcel.locale = null;
mBuilderParcel.initialNotificationDescription = null;
mBuilderParcel.initialNotificationDescriptionNoAccount = null;
mBuilderParcel.openCompanionAppDescription = null;
@@ -472,15 +355,6 @@
mBuilderParcel.retroactivePairingDescription = null;
mBuilderParcel.waitLaunchCompanionAppDescription = null;
mBuilderParcel.failConnectGoToSettingsDescription = null;
- mBuilderParcel.confirmPinTitle = null;
- mBuilderParcel.confirmPinDescription = null;
- mBuilderParcel.syncContactsTitle = null;
- mBuilderParcel.syncContactsDescription = null;
- mBuilderParcel.syncSmsTitle = null;
- mBuilderParcel.syncSmsDescription = null;
- mBuilderParcel.assistantSetupHalfSheet = null;
- mBuilderParcel.assistantSetupNotification = null;
- mBuilderParcel.fastPairTvConnectDeviceNoAccountDescription = null;
}
/**
@@ -628,20 +502,6 @@
}
/**
- * Set Locale.
- *
- * @param locale Device locale.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setLocale(@Nullable String locale) {
- mBuilderParcel.locale = locale;
- return this;
- }
-
- /**
* Set InitialNotificationDescription.
*
* @param initialNotificationDescription Initial notification description.
@@ -862,140 +722,6 @@
}
/**
- * Set ConfirmPinTitle.
- *
- * @param confirmPinTitle Title of the UI to ask the user to confirm the pin code.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setConfirmPinTitle(@Nullable String confirmPinTitle) {
- mBuilderParcel.confirmPinTitle = confirmPinTitle;
- return this;
- }
-
- /**
- * Set ConfirmPinDescription.
- *
- * @param confirmPinDescription Description of the UI to ask the user to confirm the pin
- * code.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setConfirmPinDescription(@Nullable String confirmPinDescription) {
- mBuilderParcel.confirmPinDescription = confirmPinDescription;
- return this;
- }
-
- /**
- * Set SyncContactsTitle.
- *
- * @param syncContactsTitle Title of the UI to ask the user to confirm to sync contacts.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setSyncContactsTitle(@Nullable String syncContactsTitle) {
- mBuilderParcel.syncContactsTitle = syncContactsTitle;
- return this;
- }
-
- /**
- * Set SyncContactsDescription.
- *
- * @param syncContactsDescription Description of the UI to ask the user to confirm to sync
- * contacts.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setSyncContactsDescription(@Nullable String syncContactsDescription) {
- mBuilderParcel.syncContactsDescription = syncContactsDescription;
- return this;
- }
-
- /**
- * Set SyncSmsTitle.
- *
- * @param syncSmsTitle Title of the UI to ask the user to confirm to sync SMS.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setSyncSmsTitle(@Nullable String syncSmsTitle) {
- mBuilderParcel.syncSmsTitle = syncSmsTitle;
- return this;
- }
-
- /**
- * Set SyncSmsDescription.
- *
- * @param syncSmsDescription Description of the UI to ask the user to confirm to sync SMS.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setSyncSmsDescription(@Nullable String syncSmsDescription) {
- mBuilderParcel.syncSmsDescription = syncSmsDescription;
- return this;
- }
-
- /**
- * Set AssistantSetupHalfSheet.
- *
- * @param assistantSetupHalfSheet Description in half sheet to ask user setup google
- * assistant.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setAssistantSetupHalfSheet(@Nullable String assistantSetupHalfSheet) {
- mBuilderParcel.assistantSetupHalfSheet = assistantSetupHalfSheet;
- return this;
- }
-
- /**
- * Set AssistantSetupNotification.
- *
- * @param assistantSetupNotification Description in notification to ask user setup google
- * assistant.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setAssistantSetupNotification(
- @Nullable String assistantSetupNotification) {
- mBuilderParcel.assistantSetupNotification = assistantSetupNotification;
- return this;
- }
-
- /**
- * Set FastPairTvConnectDeviceNoAccountDescription.
- *
- * @param fastPairTvConnectDeviceNoAccountDescription Description of the connect device
- * action on TV, when user is not logged
- * in.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setFastPairTvConnectDeviceNoAccountDescription(
- @Nullable String fastPairTvConnectDeviceNoAccountDescription) {
- mBuilderParcel.fastPairTvConnectDeviceNoAccountDescription =
- fastPairTvConnectDeviceNoAccountDescription;
- return this;
- }
-
- /**
* Build {@link FastPairDeviceMetadata} with the currently set configuration.
*
* @hide
diff --git a/nearby/framework/java/android/nearby/FastPairDiscoveryItem.java b/nearby/framework/java/android/nearby/FastPairDiscoveryItem.java
index bc6a6f8..ce7413a 100644
--- a/nearby/framework/java/android/nearby/FastPairDiscoveryItem.java
+++ b/nearby/framework/java/android/nearby/FastPairDiscoveryItem.java
@@ -48,16 +48,6 @@
}
/**
- * Get Type.
- *
- * @hide
- */
- @SystemApi
- public int getType() {
- return mMetadataParcel.type;
- }
-
- /**
* Get MacAddress.
*
* @hide
@@ -205,27 +195,6 @@
}
/**
- * Get GroupId.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getGroupId() {
- return mMetadataParcel.groupId;
- }
-
- /**
- * Get AttachmentType.
- *
- * @hide
- */
- @SystemApi
- public int getAttachmentType() {
- return mMetadataParcel.attachmentType;
- }
-
- /**
* Get PackageName.
*
* @hide
@@ -237,17 +206,6 @@
}
/**
- * Get FeatureGraphicUrl.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getFeatureGraphicUrl() {
- return mMetadataParcel.featureGraphicUrl;
- }
-
- /**
* Get TriggerId.
*
* @hide
@@ -283,69 +241,6 @@
}
/**
- * Get DebugMessage.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getDebugMessage() {
- return mMetadataParcel.debugMessage;
- }
-
- /**
- * Get DebugCategory.
- *
- * @hide
- */
- @SystemApi
- public int getDebugCategory() {
- return mMetadataParcel.debugCategory;
- }
-
- /**
- * Get LostMillis.
- */
- public long getLostMillis() {
- return mMetadataParcel.lostMillis;
- }
-
- /**
- * Get LastUserExperience.
- *
- * @hide
- */
- @SystemApi
- public int getLastUserExperience() {
- return mMetadataParcel.lastUserExperience;
- }
-
- /**
- * Get BleRecordBytes. Raw bytes of {@link android.bluetooth.le.ScanRecord}.
- * It is the most recent BLE advertisement related to this item.
- *
- * @return the most recent BLE advertisement in raw bytes of
- * {@link android.bluetooth.le.ScanRecord}.
- * @hide
- */
- @SystemApi
- @Nullable
- public byte[] getBleRecordBytes() {
- return mMetadataParcel.bleRecordBytes;
- }
-
- /**
- * Get EntityId.
- *
- * @hide
- */
- @SystemApi
- @Nullable
- public String getEntityId() {
- return mMetadataParcel.entityId;
- }
-
- /**
* Get authenticationPublicKeySecp256r1, which is same as AntiSpoof public key, see
* <a href="https://developers.google.com/nearby/fast-pair/spec#data_format">Data Format</a>.
*
@@ -394,20 +289,6 @@
}
/**
- * Set Nearby Type.
- *
- * @param type Nearby type.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setType(int type) {
- mBuilderParcel.type = type;
- return this;
- }
-
- /**
* Set MacAddress.
*
* @param macAddress Fast Pair device rotating mac address.
@@ -608,35 +489,6 @@
}
/**
- * Set GroupId.
- *
- * @param groupId ID used for associating several DiscoveryItems. These items may be
- * visually displayed together.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setGroupId(@Nullable String groupId) {
- mBuilderParcel.groupId = groupId;
- return this;
- }
-
- /**
- * Set AttachmentType.
- *
- * @param attachmentType Whether the attachment is created in debug namespace.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setAttachmentType(int attachmentType) {
- mBuilderParcel.attachmentType = attachmentType;
- return this;
- }
-
- /**
* Set PackageName.
*
* @param packageName Package name of the App that owns this item.
@@ -651,21 +503,6 @@
}
/**
- * Set FeatureGraphicUrl.
- *
- * @param featureGraphicUrl The "feature" graphic image url used for large sized list view
- * entries.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setFeatureGraphicUrl(@Nullable String featureGraphicUrl) {
- mBuilderParcel.featureGraphicUrl = featureGraphicUrl;
- return this;
- }
-
- /**
* Set TriggerId.
*
* @param triggerId TriggerId identifies the trigger/beacon that is attached with a message.
@@ -708,94 +545,6 @@
}
/**
- * Set DebugMessage.
- *
- * @param debugMessage Message written to bugreport for 3P developers.(No sensitive info)
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setDebugMessage(@Nullable String debugMessage) {
- mBuilderParcel.debugMessage = debugMessage;
- return this;
- }
-
- /**
- * Set DebugCategory.
- *
- * @param debugCategory Weather the item is filtered out on server.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setDebugCategory(int debugCategory) {
- mBuilderParcel.debugCategory = debugCategory;
- return this;
- }
-
- /**
- * Set LostMillis.
- *
- * @param lostMillis Client timestamp when the trigger (e.g. beacon) was last lost
- * (e.g. when Messages told us the beacon's no longer nearby).
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setLostMillis(long lostMillis) {
- mBuilderParcel.lostMillis = lostMillis;
- return this;
- }
-
- /**
- * Set LastUserExperience.
- *
- * @param lastUserExperience The kind of experience the user last had with this (e.g. if
- * they dismissed the notification, that's bad; but if they tapped
- * it, that's good).
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setLastUserExperience(int lastUserExperience) {
- mBuilderParcel.lastUserExperience = lastUserExperience;
- return this;
- }
-
- /**
- * Set BleRecordBytes.
- *
- * @param bleRecordBytes The most recent BLE advertisement related to this item. Raw bytes
- * of {@link android.bluetooth.le.ScanRecord}.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setBleRecordBytes(@Nullable byte[] bleRecordBytes) {
- mBuilderParcel.bleRecordBytes = bleRecordBytes;
- return this;
- }
-
- /**
- * Set EntityId.
- *
- * @param entityId An ID generated on the server to uniquely identify content.
- * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
- * @hide
- */
- @SystemApi
- @NonNull
- public Builder setEntityId(@Nullable String entityId) {
- mBuilderParcel.entityId = entityId;
- return this;
- }
-
- /**
* Set authenticationPublicKeySecp256r1, which is same as AntiSpoof public key, see
* <a href="https://developers.google.com/nearby/fast-pair/spec#data_format">Data Format</a>
*
diff --git a/nearby/framework/java/android/nearby/ScanRequest.java b/nearby/framework/java/android/nearby/ScanRequest.java
index a90b72d..cf2dd43 100644
--- a/nearby/framework/java/android/nearby/ScanRequest.java
+++ b/nearby/framework/java/android/nearby/ScanRequest.java
@@ -44,12 +44,8 @@
/** Scan type for scanning devices using fast pair protocol. */
public static final int SCAN_TYPE_FAST_PAIR = 1;
- /** Scan type for scanning devices using nearby share protocol. */
- public static final int SCAN_TYPE_NEARBY_SHARE = 2;
/** Scan type for scanning devices using nearby presence protocol. */
- public static final int SCAN_TYPE_NEARBY_PRESENCE = 3;
- /** Scan type for scanning devices using exposure notification protocol. */
- public static final int SCAN_TYPE_EXPOSURE_NOTIFICATION = 4;
+ public static final int SCAN_TYPE_NEARBY_PRESENCE = 2;
/** Scan mode uses highest duty cycle. */
public static final int SCAN_MODE_LOW_LATENCY = 2;
@@ -130,9 +126,7 @@
*/
public static boolean isValidScanType(@ScanType int scanType) {
return scanType == SCAN_TYPE_FAST_PAIR
- || scanType == SCAN_TYPE_NEARBY_SHARE
- || scanType == SCAN_TYPE_NEARBY_PRESENCE
- || scanType == SCAN_TYPE_EXPOSURE_NOTIFICATION;
+ || scanType == SCAN_TYPE_NEARBY_PRESENCE;
}
/**
@@ -240,8 +234,7 @@
/** @hide **/
@Retention(RetentionPolicy.SOURCE)
- @IntDef({SCAN_TYPE_FAST_PAIR, SCAN_TYPE_NEARBY_SHARE, SCAN_TYPE_NEARBY_PRESENCE,
- SCAN_TYPE_EXPOSURE_NOTIFICATION})
+ @IntDef({SCAN_TYPE_FAST_PAIR, SCAN_TYPE_NEARBY_PRESENCE})
public @interface ScanType {
}
diff --git a/nearby/framework/java/android/nearby/aidl/FastPairDeviceMetadataParcel.aidl b/nearby/framework/java/android/nearby/aidl/FastPairDeviceMetadataParcel.aidl
index ef00321..d90f6a1 100644
--- a/nearby/framework/java/android/nearby/aidl/FastPairDeviceMetadataParcel.aidl
+++ b/nearby/framework/java/android/nearby/aidl/FastPairDeviceMetadataParcel.aidl
@@ -49,10 +49,6 @@
String trueWirelessImageUrlRightBud;
String trueWirelessImageUrlCase;
- // Stings to be displayed in notification surfaced for a device.
- // The locale of all of the Strings.
- String locale;
-
// The notification description for when the device is initially discovered.
String initialNotificationDescription;
@@ -100,31 +96,4 @@
// The description that indicates go to bluetooth settings when connection
// fail.
String failConnectGoToSettingsDescription;
-
- // The title of the UI to ask the user to confirm the pin code.
- String confirmPinTitle;
-
- // The description of the UI to ask the user to confirm the pin code.
- String confirmPinDescription;
-
- // The title of the UI to ask the user to confirm to sync contacts.
- String syncContactsTitle;
-
- // The description of the UI to ask the user to confirm to sync contacts.
- String syncContactsDescription;
-
- // The title of the UI to ask the user to confirm to sync SMS.
- String syncSmsTitle;
-
- // The description of the UI to ask the user to confirm to sync SMS.
- String syncSmsDescription;
-
- // The description in half sheet to ask user setup google assistant
- String assistantSetupHalfSheet;
-
- // The description in notification to ask user setup google assistant
- String assistantSetupNotification;
-
- // Description of the connect device action on TV, when user is not logged in.
- String fastPairTvConnectDeviceNoAccountDescription;
}
\ No newline at end of file
diff --git a/nearby/framework/java/android/nearby/aidl/FastPairDiscoveryItemParcel.aidl b/nearby/framework/java/android/nearby/aidl/FastPairDiscoveryItemParcel.aidl
index 5ba18bb..2cc2daa 100644
--- a/nearby/framework/java/android/nearby/aidl/FastPairDiscoveryItemParcel.aidl
+++ b/nearby/framework/java/android/nearby/aidl/FastPairDiscoveryItemParcel.aidl
@@ -26,8 +26,6 @@
// Online item: unique ID generated on server.
String id;
- int type;
-
// The most recent all upper case mac associated with this item.
// (Mac-to-DiscoveryItem is a many-to-many relationship)
String macAddress;
@@ -72,19 +70,9 @@
// Used in the second line of the notification, "Open in {} app"
String appName;
- // ID used for associating several DiscoveryItems. These items may be
- // visually displayed together.
- String groupId;
-
- // Whether the attachment is created in debug namespace
- int attachmentType;
-
// Package name of the App that owns this item.
String packageName;
- // The "feature" graphic image url used for large sized list view entries.
- String featureGraphicUrl;
-
// TriggerId identifies the trigger/beacon that is attached with a message.
// It's generated from server for online messages to synchronize formatting
// across client versions.
@@ -100,27 +88,6 @@
// A FIFE URL of the item icon displayed in Discovery item list.
String iconFifeUrl;
- // Message written to bugreport for 3P developers.(No sensitive info)
- // null if the item is valid
- String debugMessage;
-
- // Weather the item is filtered out on server.
- int debugCategory;
-
- // Client timestamp when the trigger (e.g. beacon) was last lost (e.g. when
- // Messages told us the beacon's no longer nearby).
- long lostMillis;
-
- // The kind of experience the user last had with this (e.g. if they dismissed
- // the notification, that's bad; but if they tapped it, that's good).
- int lastUserExperience;
-
- // The most recent BLE advertisement related to this item.
- byte[] bleRecordBytes;
-
- // An ID generated on the server to uniquely identify content.
- String entityId;
-
// Fast Pair antispoof key.
byte[] authenticationPublicKeySecp256r1;
}
\ No newline at end of file
diff --git a/nearby/framework/java/android/nearby/aidl/FastPairManageAccountDeviceRequestParcel.aidl b/nearby/framework/java/android/nearby/aidl/FastPairManageAccountDeviceRequestParcel.aidl
index 82cf550..59834b2 100644
--- a/nearby/framework/java/android/nearby/aidl/FastPairManageAccountDeviceRequestParcel.aidl
+++ b/nearby/framework/java/android/nearby/aidl/FastPairManageAccountDeviceRequestParcel.aidl
@@ -31,6 +31,4 @@
int requestType;
// Fast Pair account key-ed device metadata.
FastPairAccountKeyDeviceMetadataParcel accountKeyDeviceMetadata;
- // BLE address of the device at the device add time.
- String bleAddress;
}
\ No newline at end of file
diff --git a/nearby/halfsheet/src/com/android/nearby/halfsheet/utils/FastPairUtils.java b/nearby/halfsheet/src/com/android/nearby/halfsheet/utils/FastPairUtils.java
index 903ea90..00a365c 100644
--- a/nearby/halfsheet/src/com/android/nearby/halfsheet/utils/FastPairUtils.java
+++ b/nearby/halfsheet/src/com/android/nearby/halfsheet/utils/FastPairUtils.java
@@ -85,7 +85,6 @@
.setId(item.getModelId())
.setFirstObservationTimestampMillis(item.getFirstObservationTimestampMillis())
.setLastObservationTimestampMillis(item.getLastObservationTimestampMillis())
- .setType(Cache.NearbyType.NEARBY_DEVICE)
.setActionUrl(item.getActionUrl())
.setActionUrlType(Cache.ResolvedUrlType.APP)
.setTitle(
diff --git a/nearby/service/java/com/android/server/nearby/fastpair/cache/DiscoveryItem.java b/nearby/service/java/com/android/server/nearby/fastpair/cache/DiscoveryItem.java
index d975301..6065f99 100644
--- a/nearby/service/java/com/android/server/nearby/fastpair/cache/DiscoveryItem.java
+++ b/nearby/service/java/com/android/server/nearby/fastpair/cache/DiscoveryItem.java
@@ -92,23 +92,6 @@
return storedDiscoveryItem.build();
}
- /** @return True if the item is currently nearby. */
- public boolean isNearby() {
- return isNearby(mStoredDiscoveryItem, mClock.millis());
- }
-
- /**
- * Checks if the item is Nearby
- */
- static boolean isNearby(Cache.StoredDiscoveryItem item, long currentTimeMillis) {
- // A notification may disappear early, if we get a lost callback from Messages.
- // But regardless, if we haven't detected the thing in Xmin, consider it gone.
- return !isLost(item)
- && !isExpired(
- currentTimeMillis,
- item.getLastObservationTimestampMillis());
- }
-
/**
* Checks if store discovery item support fast pair or not.
*/
@@ -123,28 +106,6 @@
}
/**
- * Sets the pairing result to done.
- */
- public void setPairingProcessDone(boolean success) {
- setLastUserExperience(success ? Cache.StoredDiscoveryItem.ExperienceType.EXPERIENCE_GOOD
- : Cache.StoredDiscoveryItem.ExperienceType.EXPERIENCE_BAD);
- setLostMillis(mClock.millis());
- Log.d("FastPairDiscovery",
- "FastPair: set Lost when pairing process done, " + getId());
- }
-
- /**
- * Sets the store discovery item lost time.
- */
- public void setLostMillis(long lostMillis) {
- mStoredDiscoveryItem = mStoredDiscoveryItem.toBuilder().setLostMillis(lostMillis).build();
-
- mStoredDiscoveryItem = mStoredDiscoveryItem.toBuilder().clearRssi().build();
-
- mFastPairCacheManager.saveDiscoveryItem(this);
- }
-
- /**
* Sets the store discovery item mac address.
*/
public void setMacAddress(String address) {
@@ -154,29 +115,6 @@
}
/**
- * Sets the user experience to be good or bad.
- */
- public void setLastUserExperience(Cache.StoredDiscoveryItem.ExperienceType experienceType) {
- mStoredDiscoveryItem = mStoredDiscoveryItem.toBuilder()
- .setLastUserExperience(experienceType).build();
- mFastPairCacheManager.saveDiscoveryItem(this);
- }
-
- /**
- * Gets the user experience to be good or bad.
- */
- public Cache.StoredDiscoveryItem.ExperienceType getLastUserExperience() {
- return mStoredDiscoveryItem.getLastUserExperience();
- }
-
- /**
- * Checks if the item is lost.
- */
- private static boolean isLost(Cache.StoredDiscoveryItem item) {
- return item.getLastObservationTimestampMillis() <= item.getLostMillis();
- }
-
- /**
* Checks if the item is expired. Expired items are those over getItemExpirationMillis() eg. 2
* minutes
*/
@@ -226,39 +164,16 @@
/** Checks if the item has enough data to be shown */
public boolean isReadyForDisplay() {
- if (isOffline()) {
- return true;
- }
boolean hasUrlOrPopularApp = !mStoredDiscoveryItem.getActionUrl().isEmpty();
return !TextUtils.isEmpty(mStoredDiscoveryItem.getTitle()) && hasUrlOrPopularApp;
}
- /** Checks if the item has server error */
- public boolean isDisabledByServer() {
- return mStoredDiscoveryItem.getDebugCategory()
- == Cache.StoredDiscoveryItem.DebugMessageCategory.STATUS_DISABLED_BY_SERVER;
- }
-
- private boolean isOffline() {
- return isOfflineType(getType());
- }
-
- /** Checks if the item can be generated on client side. */
- private static boolean isOfflineType(Cache.NearbyType type) {
- return type == Cache.NearbyType.NEARBY_CHROMECAST || type == Cache.NearbyType.NEARBY_WEAR;
- }
-
/** Checks if the action url is app install */
public boolean isApp() {
return mStoredDiscoveryItem.getActionUrlType() == Cache.ResolvedUrlType.APP;
}
- /** Checks if it's device item. e.g. Chromecast / Wear */
- public boolean isDevice() {
- return isDeviceType(mStoredDiscoveryItem.getType());
- }
-
/** Returns true if an item is muted, or if state is unavailable. */
public boolean isMuted() {
return mStoredDiscoveryItem.getState() != Cache.StoredDiscoveryItem.State.STATE_ENABLED;
@@ -295,22 +210,12 @@
/** Gets hash code of UI related data so we can collapse identical items. */
public int getUiHashCode() {
- switch (mStoredDiscoveryItem.getType()) {
- case NEARBY_CHROMECAST:
- case NEARBY_WEAR:
- // For the special-case device types, show one item per type.
- return Objects.hashCode(mStoredDiscoveryItem.getType());
- case NEARBY_DEVICE:
- case NEARBY_TYPE_UNKNOWN:
- default:
- return Objects.hash(
- mStoredDiscoveryItem.getType(),
+ return Objects.hash(
mStoredDiscoveryItem.getTitle(),
mStoredDiscoveryItem.getDescription(),
mStoredDiscoveryItem.getAppName(),
mStoredDiscoveryItem.getDisplayUrl(),
mStoredDiscoveryItem.getMacAddress());
- }
}
// Getters below
@@ -324,14 +229,6 @@
}
/**
- * Returns the type of store discovery item.
- */
- @Nullable
- public Cache.NearbyType getType() {
- return mStoredDiscoveryItem.getType();
- }
-
- /**
* Returns the title of discovery item.
*/
@Nullable
@@ -410,15 +307,6 @@
return mStoredDiscoveryItem.getPackageName();
}
-
- /**
- * Returns the feature graph url of discovery item.
- */
- @Nullable
- private String getHeroImage() {
- return mStoredDiscoveryItem.getFeatureGraphicUrl();
- }
-
/**
* Returns the action url of discovery item.
*/
@@ -436,14 +324,6 @@
}
/**
- * Returns the ble record of discovery item.
- */
- @Nullable
- public byte[] getBleRecordBytes() {
- return mStoredDiscoveryItem.getBleRecordBytes().toByteArray();
- }
-
- /**
* Returns the TX power of discovery item.
*/
@Nullable
@@ -504,15 +384,6 @@
}
/**
- * Gets group id of storedDiscoveryItem.
- */
- @Nullable
- public String getGroupId() {
- return mStoredDiscoveryItem.getGroupId();
- }
-
-
- /**
* Compares this object to the specified object: 1. By device type. Device setups are 'greater
* than' beacons. 2. By relevance. More relevant items are 'greater than' less relevant items.
* 3.By distance. Nearer items are 'greater than' further items.
@@ -521,10 +392,6 @@
*/
@Override
public int compareTo(DiscoveryItem another) {
- if (getType() != another.getType()) {
- // For device type v.s. beacon type, rank device item higher.
- return isDevice() ? 1 : -1;
- }
// For items of the same relevance, compare distance.
Double distance1 = getEstimatedDistance();
Double distance2 = another.getEstimatedDistance();
@@ -534,12 +401,6 @@
return -distance1.compareTo(distance2);
}
-
- public Integer getTriggerIdAttachmentTypeHash() {
- return Objects.hash(mStoredDiscoveryItem.getTriggerId(),
- mStoredDiscoveryItem.getAttachmentType());
- }
-
@Nullable
public String getTriggerId() {
return mStoredDiscoveryItem.getTriggerId();
@@ -561,9 +422,7 @@
@Override
public String toString() {
return String.format(
- "[type=%s], [triggerId=%s], [id=%s], [title=%s], [url=%s], "
- + "[ready=%s], [macAddress=%s]",
- getType().name(),
+ "[triggerId=%s], [id=%s], [title=%s], [url=%s], [ready=%s], [macAddress=%s]",
getTriggerId(),
getId(),
getTitle(),
diff --git a/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java b/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java
index 607c579..5077ffe 100644
--- a/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java
+++ b/nearby/service/java/com/android/server/nearby/provider/ChreCommunication.java
@@ -75,7 +75,7 @@
}
public boolean available() {
- return mInjector.getContextHubManagerAdapter() != null;
+ return mContextHubClient != null;
}
/**
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 22e31cd..0f1c567 100644
--- a/nearby/service/java/com/android/server/nearby/provider/Utils.java
+++ b/nearby/service/java/com/android/server/nearby/provider/Utils.java
@@ -79,31 +79,11 @@
if (metadataParcel.discoveryItem.appName != null) {
storedDiscoveryItemBuilder.setAppName(metadataParcel.discoveryItem.appName);
}
- Cache.DiscoveryAttachmentType attachmentType =
- Cache.DiscoveryAttachmentType.forNumber(
- metadataParcel.discoveryItem.attachmentType);
- if (attachmentType != null) {
- storedDiscoveryItemBuilder.setAttachmentType(attachmentType);
- }
if (metadataParcel.discoveryItem.authenticationPublicKeySecp256r1 != null) {
storedDiscoveryItemBuilder.setAuthenticationPublicKeySecp256R1(
ByteString.copyFrom(
metadataParcel.discoveryItem.authenticationPublicKeySecp256r1));
}
- if (metadataParcel.discoveryItem.bleRecordBytes != null) {
- storedDiscoveryItemBuilder.setBleRecordBytes(
- ByteString.copyFrom(metadataParcel.discoveryItem.bleRecordBytes));
- }
- Cache.StoredDiscoveryItem.DebugMessageCategory debugMessageCategory =
- Cache.StoredDiscoveryItem.DebugMessageCategory.forNumber(
- metadataParcel.discoveryItem.debugCategory);
- if (debugMessageCategory != null) {
- storedDiscoveryItemBuilder.setDebugCategory(debugMessageCategory);
- }
- if (metadataParcel.discoveryItem.debugMessage != null) {
- storedDiscoveryItemBuilder.setDebugMessage(
- metadataParcel.discoveryItem.debugMessage);
- }
if (metadataParcel.discoveryItem.description != null) {
storedDiscoveryItemBuilder.setDescription(
metadataParcel.discoveryItem.description);
@@ -116,19 +96,8 @@
storedDiscoveryItemBuilder.setDisplayUrl(
metadataParcel.discoveryItem.displayUrl);
}
- if (metadataParcel.discoveryItem.entityId != null) {
- storedDiscoveryItemBuilder.setEntityId(
- metadataParcel.discoveryItem.entityId);
- }
- if (metadataParcel.discoveryItem.featureGraphicUrl != null) {
- storedDiscoveryItemBuilder.setFeatureGraphicUrl(
- metadataParcel.discoveryItem.featureGraphicUrl);
- }
storedDiscoveryItemBuilder.setFirstObservationTimestampMillis(
metadataParcel.discoveryItem.firstObservationTimestampMillis);
- if (metadataParcel.discoveryItem.groupId != null) {
- storedDiscoveryItemBuilder.setGroupId(metadataParcel.discoveryItem.groupId);
- }
if (metadataParcel.discoveryItem.iconFifeUrl != null) {
storedDiscoveryItemBuilder.setIconFifeUrl(
metadataParcel.discoveryItem.iconFifeUrl);
@@ -142,13 +111,6 @@
}
storedDiscoveryItemBuilder.setLastObservationTimestampMillis(
metadataParcel.discoveryItem.lastObservationTimestampMillis);
- Cache.StoredDiscoveryItem.ExperienceType experienceType =
- Cache.StoredDiscoveryItem.ExperienceType.forNumber(
- metadataParcel.discoveryItem.lastUserExperience);
- if (experienceType != null) {
- storedDiscoveryItemBuilder.setLastUserExperience(experienceType);
- }
- storedDiscoveryItemBuilder.setLostMillis(metadataParcel.discoveryItem.lostMillis);
if (metadataParcel.discoveryItem.macAddress != null) {
storedDiscoveryItemBuilder.setMacAddress(
metadataParcel.discoveryItem.macAddress);
@@ -173,30 +135,9 @@
storedDiscoveryItemBuilder.setTriggerId(metadataParcel.discoveryItem.triggerId);
}
storedDiscoveryItemBuilder.setTxPower(metadataParcel.discoveryItem.txPower);
- Cache.NearbyType type =
- Cache.NearbyType.forNumber(metadataParcel.discoveryItem.type);
- if (type != null) {
- storedDiscoveryItemBuilder.setType(type);
- }
}
if (metadataParcel.metadata != null) {
FastPairStrings.Builder stringsBuilder = FastPairStrings.newBuilder();
- if (metadataParcel.metadata.assistantSetupHalfSheet != null) {
- stringsBuilder.setAssistantHalfSheetDescription(
- metadataParcel.metadata.assistantSetupHalfSheet);
- }
- if (metadataParcel.metadata.assistantSetupNotification != null) {
- stringsBuilder.setAssistantNotificationDescription(
- metadataParcel.metadata.assistantSetupNotification);
- }
- if (metadataParcel.metadata.confirmPinDescription != null) {
- stringsBuilder.setConfirmPinDescription(
- metadataParcel.metadata.confirmPinDescription);
- }
- if (metadataParcel.metadata.confirmPinTitle != null) {
- stringsBuilder.setConfirmPinTitle(
- metadataParcel.metadata.confirmPinTitle);
- }
if (metadataParcel.metadata.connectSuccessCompanionAppInstalled != null) {
stringsBuilder.setPairingFinishedCompanionAppInstalled(
metadataParcel.metadata.connectSuccessCompanionAppInstalled);
@@ -209,10 +150,6 @@
stringsBuilder.setPairingFailDescription(
metadataParcel.metadata.failConnectGoToSettingsDescription);
}
- if (metadataParcel.metadata.fastPairTvConnectDeviceNoAccountDescription != null) {
- stringsBuilder.setFastPairTvConnectDeviceNoAccountDescription(
- metadataParcel.metadata.fastPairTvConnectDeviceNoAccountDescription);
- }
if (metadataParcel.metadata.initialNotificationDescription != null) {
stringsBuilder.setTapToPairWithAccount(
metadataParcel.metadata.initialNotificationDescription);
@@ -233,21 +170,6 @@
stringsBuilder.setSubsequentPairingDescription(
metadataParcel.metadata.subsequentPairingDescription);
}
- if (metadataParcel.metadata.syncContactsDescription != null) {
- stringsBuilder.setSyncContactsDescription(
- metadataParcel.metadata.syncContactsDescription);
- }
- if (metadataParcel.metadata.syncContactsTitle != null) {
- stringsBuilder.setSyncContactsTitle(
- metadataParcel.metadata.syncContactsTitle);
- }
- if (metadataParcel.metadata.syncSmsDescription != null) {
- stringsBuilder.setSyncSmsDescription(
- metadataParcel.metadata.syncSmsDescription);
- }
- if (metadataParcel.metadata.syncSmsTitle != null) {
- stringsBuilder.setSyncSmsTitle(metadataParcel.metadata.syncSmsTitle);
- }
if (metadataParcel.metadata.waitLaunchCompanionAppDescription != null) {
stringsBuilder.setWaitAppLaunchDescription(
metadataParcel.metadata.waitLaunchCompanionAppDescription);
@@ -357,20 +279,6 @@
}
Rpcs.ObservedDeviceStrings.Builder stringsBuilder = Rpcs.ObservedDeviceStrings.newBuilder();
- if (metadata.deviceMetadata.assistantSetupHalfSheet != null) {
- stringsBuilder
- .setAssistantSetupHalfSheet(metadata.deviceMetadata.assistantSetupHalfSheet);
- }
- if (metadata.deviceMetadata.assistantSetupNotification != null) {
- stringsBuilder.setAssistantSetupNotification(
- metadata.deviceMetadata.assistantSetupNotification);
- }
- if (metadata.deviceMetadata.confirmPinDescription != null) {
- stringsBuilder.setConfirmPinDescription(metadata.deviceMetadata.confirmPinDescription);
- }
- if (metadata.deviceMetadata.confirmPinTitle != null) {
- stringsBuilder.setConfirmPinTitle(metadata.deviceMetadata.confirmPinTitle);
- }
if (metadata.deviceMetadata.connectSuccessCompanionAppInstalled != null) {
stringsBuilder.setConnectSuccessCompanionAppInstalled(
metadata.deviceMetadata.connectSuccessCompanionAppInstalled);
@@ -387,10 +295,6 @@
stringsBuilder.setFailConnectGoToSettingsDescription(
metadata.deviceMetadata.failConnectGoToSettingsDescription);
}
- if (metadata.deviceMetadata.fastPairTvConnectDeviceNoAccountDescription != null) {
- stringsBuilder.setFastPairTvConnectDeviceNoAccountDescription(
- metadata.deviceMetadata.fastPairTvConnectDeviceNoAccountDescription);
- }
if (metadata.deviceMetadata.initialNotificationDescription != null) {
stringsBuilder.setInitialNotificationDescription(
metadata.deviceMetadata.initialNotificationDescription);
@@ -403,9 +307,6 @@
stringsBuilder.setInitialPairingDescription(
metadata.deviceMetadata.initialPairingDescription);
}
- if (metadata.deviceMetadata.locale != null) {
- stringsBuilder.setLocale(metadata.deviceMetadata.locale);
- }
if (metadata.deviceMetadata.openCompanionAppDescription != null) {
stringsBuilder.setOpenCompanionAppDescription(
metadata.deviceMetadata.openCompanionAppDescription);
@@ -418,22 +319,6 @@
stringsBuilder.setSubsequentPairingDescription(
metadata.deviceMetadata.subsequentPairingDescription);
}
- if (metadata.deviceMetadata.syncContactsDescription != null) {
- stringsBuilder.setSyncContactsDescription(
- metadata.deviceMetadata.syncContactsDescription);
- }
- if (metadata.deviceMetadata.syncContactsTitle != null) {
- stringsBuilder.setSyncContactsTitle(
- metadata.deviceMetadata.syncContactsTitle);
- }
- if (metadata.deviceMetadata.syncSmsDescription != null) {
- stringsBuilder.setSyncSmsDescription(
- metadata.deviceMetadata.syncSmsDescription);
- }
- if (metadata.deviceMetadata.syncSmsTitle != null) {
- stringsBuilder.setSyncSmsTitle(
- metadata.deviceMetadata.syncSmsTitle);
- }
if (metadata.deviceMetadata.unableToConnectDescription != null) {
stringsBuilder.setUnableToConnectDescription(
metadata.deviceMetadata.unableToConnectDescription);
@@ -513,28 +398,18 @@
discoveryItemParcel.actionUrl = storedDiscoveryItem.getActionUrl();
discoveryItemParcel.actionUrlType = storedDiscoveryItem.getActionUrlType().getNumber();
discoveryItemParcel.appName = storedDiscoveryItem.getAppName();
- discoveryItemParcel.attachmentType = storedDiscoveryItem.getAttachmentType().getNumber();
discoveryItemParcel.authenticationPublicKeySecp256r1 =
storedDiscoveryItem.getAuthenticationPublicKeySecp256R1().toByteArray();
- discoveryItemParcel.bleRecordBytes = storedDiscoveryItem.getBleRecordBytes().toByteArray();
- discoveryItemParcel.debugCategory = storedDiscoveryItem.getDebugCategory().getNumber();
- discoveryItemParcel.debugMessage = storedDiscoveryItem.getDebugMessage();
discoveryItemParcel.description = storedDiscoveryItem.getDescription();
discoveryItemParcel.deviceName = storedDiscoveryItem.getDeviceName();
discoveryItemParcel.displayUrl = storedDiscoveryItem.getDisplayUrl();
- discoveryItemParcel.entityId = storedDiscoveryItem.getEntityId();
- discoveryItemParcel.featureGraphicUrl = storedDiscoveryItem.getFeatureGraphicUrl();
discoveryItemParcel.firstObservationTimestampMillis =
storedDiscoveryItem.getFirstObservationTimestampMillis();
- discoveryItemParcel.groupId = storedDiscoveryItem.getGroupId();
discoveryItemParcel.iconFifeUrl = storedDiscoveryItem.getIconFifeUrl();
discoveryItemParcel.iconPng = storedDiscoveryItem.getIconPng().toByteArray();
discoveryItemParcel.id = storedDiscoveryItem.getId();
discoveryItemParcel.lastObservationTimestampMillis =
storedDiscoveryItem.getLastObservationTimestampMillis();
- discoveryItemParcel.lastUserExperience =
- storedDiscoveryItem.getLastUserExperience().getNumber();
- discoveryItemParcel.lostMillis = storedDiscoveryItem.getLostMillis();
discoveryItemParcel.macAddress = storedDiscoveryItem.getMacAddress();
discoveryItemParcel.packageName = storedDiscoveryItem.getPackageName();
discoveryItemParcel.pendingAppInstallTimestampMillis =
@@ -544,7 +419,6 @@
discoveryItemParcel.title = storedDiscoveryItem.getTitle();
discoveryItemParcel.triggerId = storedDiscoveryItem.getTriggerId();
discoveryItemParcel.txPower = storedDiscoveryItem.getTxPower();
- discoveryItemParcel.type = storedDiscoveryItem.getType().getNumber();
return discoveryItemParcel;
}
@@ -564,27 +438,17 @@
FastPairStrings fpStrings = storedDiscoveryItem.getFastPairStrings();
FastPairDeviceMetadataParcel metadataParcel = new FastPairDeviceMetadataParcel();
- metadataParcel.assistantSetupHalfSheet = fpStrings.getAssistantHalfSheetDescription();
- metadataParcel.assistantSetupNotification = fpStrings.getAssistantNotificationDescription();
- metadataParcel.confirmPinDescription = fpStrings.getConfirmPinDescription();
- metadataParcel.confirmPinTitle = fpStrings.getConfirmPinTitle();
metadataParcel.connectSuccessCompanionAppInstalled =
fpStrings.getPairingFinishedCompanionAppInstalled();
metadataParcel.connectSuccessCompanionAppNotInstalled =
fpStrings.getPairingFinishedCompanionAppNotInstalled();
metadataParcel.failConnectGoToSettingsDescription = fpStrings.getPairingFailDescription();
- metadataParcel.fastPairTvConnectDeviceNoAccountDescription =
- fpStrings.getFastPairTvConnectDeviceNoAccountDescription();
metadataParcel.initialNotificationDescription = fpStrings.getTapToPairWithAccount();
metadataParcel.initialNotificationDescriptionNoAccount =
fpStrings.getTapToPairWithoutAccount();
metadataParcel.initialPairingDescription = fpStrings.getInitialPairingDescription();
metadataParcel.retroactivePairingDescription = fpStrings.getRetroactivePairingDescription();
metadataParcel.subsequentPairingDescription = fpStrings.getSubsequentPairingDescription();
- metadataParcel.syncContactsDescription = fpStrings.getSyncContactsDescription();
- metadataParcel.syncContactsTitle = fpStrings.getSyncContactsTitle();
- metadataParcel.syncSmsDescription = fpStrings.getSyncSmsDescription();
- metadataParcel.syncSmsTitle = fpStrings.getSyncSmsTitle();
metadataParcel.waitLaunchCompanionAppDescription = fpStrings.getWaitAppLaunchDescription();
Cache.FastPairInformation fpInformation = storedDiscoveryItem.getFastPairInformation();
diff --git a/nearby/service/java/com/android/server/nearby/util/DataUtils.java b/nearby/service/java/com/android/server/nearby/util/DataUtils.java
index 0b01bc0..8bb83e9 100644
--- a/nearby/service/java/com/android/server/nearby/util/DataUtils.java
+++ b/nearby/service/java/com/android/server/nearby/util/DataUtils.java
@@ -84,12 +84,6 @@
+ fastPairStrings.getRetroactivePairingDescription()
+ ", waitAppLaunchDescription=" + fastPairStrings.getWaitAppLaunchDescription()
+ ", pairingFailDescription=" + fastPairStrings.getPairingFailDescription()
- + ", assistantHalfSheetDescription="
- + fastPairStrings.getAssistantHalfSheetDescription()
- + ", assistantNotificationDescription="
- + fastPairStrings.getAssistantNotificationDescription()
- + ", fastPairTvConnectDeviceNoAccountDescription="
- + fastPairStrings.getFastPairTvConnectDeviceNoAccountDescription()
+ "]";
}
@@ -112,10 +106,6 @@
.setRetroactivePairingDescription(strings.getRetroactivePairingDescription())
.setWaitAppLaunchDescription(strings.getWaitLaunchCompanionAppDescription())
.setPairingFailDescription(strings.getFailConnectGoToSettingsDescription())
- .setAssistantHalfSheetDescription(strings.getAssistantSetupHalfSheet())
- .setAssistantNotificationDescription(strings.getAssistantSetupNotification())
- .setFastPairTvConnectDeviceNoAccountDescription(
- strings.getFastPairTvConnectDeviceNoAccountDescription())
.build();
}
}
diff --git a/nearby/service/proto/src/fastpair/cache.proto b/nearby/service/proto/src/fastpair/cache.proto
index 12731fb..d4c7c3d 100644
--- a/nearby/service/proto/src/fastpair/cache.proto
+++ b/nearby/service/proto/src/fastpair/cache.proto
@@ -112,9 +112,6 @@
string id = 1;
// REQUIRED
- NearbyType type = 2;
-
- // REQUIRED
// The most recent all upper case mac associated with this item.
// (Mac-to-DiscoveryItem is a many-to-many relationship)
string mac_address = 4;
@@ -164,28 +161,18 @@
// Used in the second line of the notification, "Open in {} app"
string app_name = 25;
- // ID used for associating several DiscoveryItems. These items may be
- // visually displayed together.
- string group_id = 26;
-
// The timestamp when the attachment was created on PBS server. In case there
// are duplicate
// items with the same scanId/groupID, only show the one with the latest
// timestamp.
int64 attachment_creation_sec = 28;
- // Whether the attachment is created in debug namespace
- DiscoveryAttachmentType attachment_type = 29;
-
// Package name of the App that owns this item.
string package_name = 30;
// The average star rating of the app.
float star_rating = 31;
- // The "feature" graphic image url used for large sized list view entries.
- string feature_graphic_url = 32;
-
// TriggerId identifies the trigger/beacon that is attached with a message.
// It's generated from server for online messages to synchronize formatting
// across client versions.
@@ -201,27 +188,6 @@
// A FIFE URL of the item icon displayed in Discovery item list.
string icon_fife_url = 49;
- // Message written to bugreport for 3P developers.(No sensitive info)
- // null if the item is valid
- string debug_message = 37;
-
- // Weather the item is filtered out on server.
- DebugMessageCategory debug_category = 38;
-
- // Client timestamp when the trigger (e.g. beacon) was last lost (e.g. when
- // Messages told us the beacon's no longer nearby).
- int64 lost_millis = 41;
-
- // The kind of expereince the user last had with this (e.g. if they dismissed
- // the notification, that's bad; but if they tapped it, that's good).
- ExperienceType last_user_experience = 42;
-
- // The most recent BLE advertisement related to this item.
- bytes ble_record_bytes = 43;
-
- // An ID generated on the server to uniquely identify content.
- string entity_id = 44;
-
// See equivalent field in NearbyItem.
bytes authentication_public_key_secp256r1 = 45;
@@ -235,7 +201,7 @@
FastPairStrings fast_pair_strings = 48;
// Deprecated fields.
- reserved 3, 12, 13, 14, 15, 16, 18, 21, 24, 27, 33, 35, 39, 40;
+ reserved 2, 3, 12, 13, 14, 15, 16, 18, 21, 24, 26, 27, 29, 32, 33, 35, 37, 38, 39, 40, 41, 42, 43, 44;
}
enum ResolvedUrlType {
RESOLVED_URL_TYPE_UNKNOWN = 0;
diff --git a/nearby/service/proto/src/fastpair/fast_pair_string.proto b/nearby/service/proto/src/fastpair/fast_pair_string.proto
index 6dfc19a..f318c1a 100644
--- a/nearby/service/proto/src/fastpair/fast_pair_string.proto
+++ b/nearby/service/proto/src/fastpair/fast_pair_string.proto
@@ -36,30 +36,5 @@
// Description when user fail to pair with device
optional string pairing_fail_description = 9;
- // Title to ask the user to confirm the pin code.
- optional string confirm_pin_title = 10;
-
- // Description to ask the user to confirm the pin code.
- optional string confirm_pin_description = 11;
-
- // The title of the UI to ask the user to confirm to sync contacts.
- optional string sync_contacts_title = 12;
-
- // The description of the UI to ask the user to confirm to sync contacts.
- optional string sync_contacts_description = 13;
-
- // The title of the UI to ask the user to confirm to sync SMS.
- optional string sync_sms_title = 14;
-
- // The description of the UI to ask the user to confirm to sync SMS.
- optional string sync_sms_description = 15;
-
- // The description for half sheet to ask user to setup google assistant.
- optional string assistant_half_sheet_description = 16;
-
- // The description for notification to ask user to setup google assistant.
- optional string assistant_notification_description = 17;
-
- // Description of the connect device action on TV, when user is not logged in.
- optional string fast_pair_tv_connect_device_no_account_description = 18;
+ reserved 10, 11, 12, 13, 14,15, 16, 17, 18;
}
diff --git a/nearby/service/proto/src/fastpair/rpcs.proto b/nearby/service/proto/src/fastpair/rpcs.proto
index 0399d09..bce4378 100644
--- a/nearby/service/proto/src/fastpair/rpcs.proto
+++ b/nearby/service/proto/src/fastpair/rpcs.proto
@@ -234,9 +234,6 @@
// Strings to be displayed in notifications surfaced for a device.
message ObservedDeviceStrings {
- // The locale of all of the strings.
- string locale = 1;
-
// The notification description for when the device is initially discovered.
string initial_notification_description = 2;
@@ -285,32 +282,7 @@
// fail.
string fail_connect_go_to_settings_description = 15;
- // The title of the UI to ask the user to confirm the pin code.
- string confirm_pin_title = 16;
-
- // The description of the UI to ask the user to confirm the pin code.
- string confirm_pin_description = 17;
-
- // The title of the UI to ask the user to confirm to sync contacts.
- string sync_contacts_title = 18;
-
- // The description of the UI to ask the user to confirm to sync contacts.
- string sync_contacts_description = 19;
-
- // The title of the UI to ask the user to confirm to sync SMS.
- string sync_sms_title = 20;
-
- // The description of the UI to ask the user to confirm to sync SMS.
- string sync_sms_description = 21;
-
- // The description in half sheet to ask user setup google assistant
- string assistant_setup_half_sheet = 22;
-
- // The description in notification to ask user setup google assistant
- string assistant_setup_notification = 23;
-
- // Description of the connect device action on TV, when user is not logged in.
- string fast_pair_tv_connect_device_no_account_description = 24;
+ reserved 1, 16, 17, 18, 19, 20, 21, 22, 23, 24;
}
// The buffer size range of a Fast Pair devices support dynamic buffer size.
diff --git a/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairAntispoofKeyDeviceMetadataTest.java b/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairAntispoofKeyDeviceMetadataTest.java
index 226efbb..65c061b 100644
--- a/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairAntispoofKeyDeviceMetadataTest.java
+++ b/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairAntispoofKeyDeviceMetadataTest.java
@@ -105,12 +105,7 @@
/* Verifies DeviceMetadata. */
private static void ensureFastPairDeviceMetadataAsExpected(FastPairDeviceMetadata metadata) {
- assertThat(metadata.getAssistantSetupHalfSheet()).isEqualTo(ASSISTANT_SETUP_HALFSHEET);
- assertThat(metadata.getAssistantSetupNotification())
- .isEqualTo(ASSISTANT_SETUP_NOTIFICATION);
assertThat(metadata.getBleTxPower()).isEqualTo(BLE_TX_POWER);
- assertThat(metadata.getConfirmPinDescription()).isEqualTo(CONFIRM_PIN_DESCRIPTION);
- assertThat(metadata.getConfirmPinTitle()).isEqualTo(CONFIRM_PIN_TITLE);
assertThat(metadata.getConnectSuccessCompanionAppInstalled())
.isEqualTo(CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
assertThat(metadata.getConnectSuccessCompanionAppNotInstalled())
@@ -120,8 +115,6 @@
.isEqualTo(DOWNLOAD_COMPANION_APP_DESCRIPTION);
assertThat(metadata.getFailConnectGoToSettingsDescription())
.isEqualTo(FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- assertThat(metadata.getFastPairTvConnectDeviceNoAccountDescription())
- .isEqualTo(FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
assertThat(metadata.getImage()).isEqualTo(IMAGE);
assertThat(metadata.getImageUrl()).isEqualTo(IMAGE_URL);
assertThat(metadata.getInitialNotificationDescription())
@@ -130,7 +123,6 @@
.isEqualTo(INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT);
assertThat(metadata.getInitialPairingDescription()).isEqualTo(INITIAL_PAIRING_DESCRIPTION);
assertThat(metadata.getIntentUri()).isEqualTo(INTENT_URI);
- assertThat(metadata.getLocale()).isEqualTo(LOCALE);
assertThat(metadata.getName()).isEqualTo(NAME);
assertThat(metadata.getOpenCompanionAppDescription())
.isEqualTo(OPEN_COMPANION_APP_DESCRIPTION);
@@ -138,10 +130,6 @@
.isEqualTo(RETRO_ACTIVE_PAIRING_DESCRIPTION);
assertThat(metadata.getSubsequentPairingDescription())
.isEqualTo(SUBSEQUENT_PAIRING_DESCRIPTION);
- assertThat(metadata.getSyncContactsDescription()).isEqualTo(SYNC_CONTACT_DESCRPTION);
- assertThat(metadata.getSyncContactsTitle()).isEqualTo(SYNC_CONTACTS_TITLE);
- assertThat(metadata.getSyncSmsDescription()).isEqualTo(SYNC_SMS_DESCRIPTION);
- assertThat(metadata.getSyncSmsTitle()).isEqualTo(SYNC_SMS_TITLE);
assertThat(metadata.getTriggerDistance()).isWithin(DELTA).of(TRIGGER_DISTANCE);
assertThat(metadata.getTrueWirelessImageUrlCase()).isEqualTo(TRUE_WIRELESS_IMAGE_URL_CASE);
assertThat(metadata.getTrueWirelessImageUrlLeftBud())
@@ -171,19 +159,13 @@
/* Generates FastPairDeviceMetadata. */
private static FastPairDeviceMetadata genFastPairDeviceMetadata() {
FastPairDeviceMetadata.Builder builder = new FastPairDeviceMetadata.Builder();
- builder.setAssistantSetupHalfSheet(ASSISTANT_SETUP_HALFSHEET);
- builder.setAssistantSetupNotification(ASSISTANT_SETUP_NOTIFICATION);
builder.setBleTxPower(BLE_TX_POWER);
- builder.setConfirmPinDescription(CONFIRM_PIN_DESCRIPTION);
- builder.setConfirmPinTitle(CONFIRM_PIN_TITLE);
builder.setConnectSuccessCompanionAppInstalled(CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
builder.setConnectSuccessCompanionAppNotInstalled(
CONNECT_SUCCESS_COMPANION_APP_NOT_INSTALLED);
builder.setDeviceType(DEVICE_TYPE);
builder.setDownloadCompanionAppDescription(DOWNLOAD_COMPANION_APP_DESCRIPTION);
builder.setFailConnectGoToSettingsDescription(FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- builder.setFastPairTvConnectDeviceNoAccountDescription(
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
builder.setImage(IMAGE);
builder.setImageUrl(IMAGE_URL);
builder.setInitialNotificationDescription(INITIAL_NOTIFICATION_DESCRIPTION);
@@ -191,15 +173,10 @@
INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT);
builder.setInitialPairingDescription(INITIAL_PAIRING_DESCRIPTION);
builder.setIntentUri(INTENT_URI);
- builder.setLocale(LOCALE);
builder.setName(NAME);
builder.setOpenCompanionAppDescription(OPEN_COMPANION_APP_DESCRIPTION);
builder.setRetroactivePairingDescription(RETRO_ACTIVE_PAIRING_DESCRIPTION);
builder.setSubsequentPairingDescription(SUBSEQUENT_PAIRING_DESCRIPTION);
- builder.setSyncContactsDescription(SYNC_CONTACT_DESCRPTION);
- builder.setSyncContactsTitle(SYNC_CONTACTS_TITLE);
- builder.setSyncSmsDescription(SYNC_SMS_DESCRIPTION);
- builder.setSyncSmsTitle(SYNC_SMS_TITLE);
builder.setTriggerDistance(TRIGGER_DISTANCE);
builder.setTrueWirelessImageUrlCase(TRUE_WIRELESS_IMAGE_URL_CASE);
builder.setTrueWirelessImageUrlLeftBud(TRUE_WIRELESS_IMAGE_URL_LEFT_BUD);
diff --git a/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderServiceTest.java b/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderServiceTest.java
index 171b6e8..160da56 100644
--- a/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderServiceTest.java
+++ b/nearby/tests/cts/fastpair/src/android/nearby/cts/FastPairDataProviderServiceTest.java
@@ -577,7 +577,6 @@
new FastPairManageAccountDeviceRequestParcel();
requestParcel.account = MANAGE_ACCOUNT;
requestParcel.requestType = MANAGE_ACCOUNT_REQUEST_TYPE;
- requestParcel.bleAddress = BLE_ADDRESS;
requestParcel.accountKeyDeviceMetadata =
genHappyPathFastPairAccountkeyDeviceMetadataParcel();
@@ -628,24 +627,15 @@
builder.setActionUrl(ACTION_URL);
builder.setActionUrlType(ACTION_URL_TYPE);
builder.setAppName(APP_NAME);
- builder.setAttachmentType(ATTACHMENT_TYPE);
builder.setAuthenticationPublicKeySecp256r1(AUTHENTICATION_PUBLIC_KEY_SEC_P256R1);
- builder.setBleRecordBytes(BLE_RECORD_BYTES);
- builder.setDebugCategory(DEBUG_CATEGORY);
- builder.setDebugMessage(DEBUG_MESSAGE);
builder.setDescription(DESCRIPTION);
builder.setDeviceName(DEVICE_NAME);
builder.setDisplayUrl(DISPLAY_URL);
- builder.setEntityId(ENTITY_ID);
- builder.setFeatureGraphicUrl(FEATURE_GRAPHIC_URL);
builder.setFirstObservationTimestampMillis(FIRST_OBSERVATION_TIMESTAMP_MILLIS);
- builder.setGroupId(GROUP_ID);
builder.setIconFfeUrl(ICON_FIFE_URL);
builder.setIconPng(ICON_PNG);
builder.setId(ID);
builder.setLastObservationTimestampMillis(LAST_OBSERVATION_TIMESTAMP_MILLIS);
- builder.setLastUserExperience(LAST_USER_EXPERIENCE);
- builder.setLostMillis(LOST_MILLIS);
builder.setMacAddress(MAC_ADDRESS);
builder.setPackageName(PACKAGE_NAME);
builder.setPendingAppInstallTimestampMillis(PENDING_APP_INSTALL_TIMESTAMP_MILLIS);
@@ -654,7 +644,6 @@
builder.setTitle(TITLE);
builder.setTriggerId(TRIGGER_ID);
builder.setTxPower(TX_POWER);
- builder.setType(TYPE);
return builder.build();
}
@@ -666,24 +655,15 @@
parcel.actionUrl = ACTION_URL;
parcel.actionUrlType = ACTION_URL_TYPE;
parcel.appName = APP_NAME;
- parcel.attachmentType = ATTACHMENT_TYPE;
parcel.authenticationPublicKeySecp256r1 = AUTHENTICATION_PUBLIC_KEY_SEC_P256R1;
- parcel.bleRecordBytes = BLE_RECORD_BYTES;
- parcel.debugCategory = DEBUG_CATEGORY;
- parcel.debugMessage = DEBUG_MESSAGE;
parcel.description = DESCRIPTION;
parcel.deviceName = DEVICE_NAME;
parcel.displayUrl = DISPLAY_URL;
- parcel.entityId = ENTITY_ID;
- parcel.featureGraphicUrl = FEATURE_GRAPHIC_URL;
parcel.firstObservationTimestampMillis = FIRST_OBSERVATION_TIMESTAMP_MILLIS;
- parcel.groupId = GROUP_ID;
parcel.iconFifeUrl = ICON_FIFE_URL;
parcel.iconPng = ICON_PNG;
parcel.id = ID;
parcel.lastObservationTimestampMillis = LAST_OBSERVATION_TIMESTAMP_MILLIS;
- parcel.lastUserExperience = LAST_USER_EXPERIENCE;
- parcel.lostMillis = LOST_MILLIS;
parcel.macAddress = MAC_ADDRESS;
parcel.packageName = PACKAGE_NAME;
parcel.pendingAppInstallTimestampMillis = PENDING_APP_INSTALL_TIMESTAMP_MILLIS;
@@ -692,7 +672,6 @@
parcel.title = TITLE;
parcel.triggerId = TRIGGER_ID;
parcel.txPower = TX_POWER;
- parcel.type = TYPE;
return parcel;
}
@@ -700,19 +679,13 @@
/* Generates Happy Path DeviceMetadata. */
private static FastPairDeviceMetadata genHappyPathFastPairDeviceMetadata() {
FastPairDeviceMetadata.Builder builder = new FastPairDeviceMetadata.Builder();
- builder.setAssistantSetupHalfSheet(ASSISTANT_SETUP_HALFSHEET);
- builder.setAssistantSetupNotification(ASSISTANT_SETUP_NOTIFICATION);
builder.setBleTxPower(BLE_TX_POWER);
- builder.setConfirmPinDescription(CONFIRM_PIN_DESCRIPTION);
- builder.setConfirmPinTitle(CONFIRM_PIN_TITLE);
builder.setConnectSuccessCompanionAppInstalled(CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
builder.setConnectSuccessCompanionAppNotInstalled(
CONNECT_SUCCESS_COMPANION_APP_NOT_INSTALLED);
builder.setDeviceType(DEVICE_TYPE);
builder.setDownloadCompanionAppDescription(DOWNLOAD_COMPANION_APP_DESCRIPTION);
builder.setFailConnectGoToSettingsDescription(FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- builder.setFastPairTvConnectDeviceNoAccountDescription(
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
builder.setImage(IMAGE);
builder.setImageUrl(IMAGE_URL);
builder.setInitialNotificationDescription(INITIAL_NOTIFICATION_DESCRIPTION);
@@ -720,15 +693,10 @@
INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT);
builder.setInitialPairingDescription(INITIAL_PAIRING_DESCRIPTION);
builder.setIntentUri(INTENT_URI);
- builder.setLocale(LOCALE);
builder.setName(NAME);
builder.setOpenCompanionAppDescription(OPEN_COMPANION_APP_DESCRIPTION);
builder.setRetroactivePairingDescription(RETRO_ACTIVE_PAIRING_DESCRIPTION);
builder.setSubsequentPairingDescription(SUBSEQUENT_PAIRING_DESCRIPTION);
- builder.setSyncContactsDescription(SYNC_CONTACT_DESCRPTION);
- builder.setSyncContactsTitle(SYNC_CONTACTS_TITLE);
- builder.setSyncSmsDescription(SYNC_SMS_DESCRIPTION);
- builder.setSyncSmsTitle(SYNC_SMS_TITLE);
builder.setTriggerDistance(TRIGGER_DISTANCE);
builder.setTrueWirelessImageUrlCase(TRUE_WIRELESS_IMAGE_URL_CASE);
builder.setTrueWirelessImageUrlLeftBud(TRUE_WIRELESS_IMAGE_URL_LEFT_BUD);
@@ -745,19 +713,13 @@
private static FastPairDeviceMetadataParcel genHappyPathFastPairDeviceMetadataParcel() {
FastPairDeviceMetadataParcel parcel = new FastPairDeviceMetadataParcel();
- parcel.assistantSetupHalfSheet = ASSISTANT_SETUP_HALFSHEET;
- parcel.assistantSetupNotification = ASSISTANT_SETUP_NOTIFICATION;
parcel.bleTxPower = BLE_TX_POWER;
- parcel.confirmPinDescription = CONFIRM_PIN_DESCRIPTION;
- parcel.confirmPinTitle = CONFIRM_PIN_TITLE;
parcel.connectSuccessCompanionAppInstalled = CONNECT_SUCCESS_COMPANION_APP_INSTALLED;
parcel.connectSuccessCompanionAppNotInstalled =
CONNECT_SUCCESS_COMPANION_APP_NOT_INSTALLED;
parcel.deviceType = DEVICE_TYPE;
parcel.downloadCompanionAppDescription = DOWNLOAD_COMPANION_APP_DESCRIPTION;
parcel.failConnectGoToSettingsDescription = FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION;
- parcel.fastPairTvConnectDeviceNoAccountDescription =
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION;
parcel.image = IMAGE;
parcel.imageUrl = IMAGE_URL;
parcel.initialNotificationDescription = INITIAL_NOTIFICATION_DESCRIPTION;
@@ -765,15 +727,10 @@
INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT;
parcel.initialPairingDescription = INITIAL_PAIRING_DESCRIPTION;
parcel.intentUri = INTENT_URI;
- parcel.locale = LOCALE;
parcel.name = NAME;
parcel.openCompanionAppDescription = OPEN_COMPANION_APP_DESCRIPTION;
parcel.retroactivePairingDescription = RETRO_ACTIVE_PAIRING_DESCRIPTION;
parcel.subsequentPairingDescription = SUBSEQUENT_PAIRING_DESCRIPTION;
- parcel.syncContactsDescription = SYNC_CONTACT_DESCRPTION;
- parcel.syncContactsTitle = SYNC_CONTACTS_TITLE;
- parcel.syncSmsDescription = SYNC_SMS_DESCRIPTION;
- parcel.syncSmsTitle = SYNC_SMS_TITLE;
parcel.triggerDistance = TRIGGER_DISTANCE;
parcel.trueWirelessImageUrlCase = TRUE_WIRELESS_IMAGE_URL_CASE;
parcel.trueWirelessImageUrlLeftBud = TRUE_WIRELESS_IMAGE_URL_LEFT_BUD;
@@ -830,7 +787,6 @@
FastPairDataProviderService.FastPairManageAccountDeviceRequest request) {
assertThat(request.getAccount()).isEqualTo(MANAGE_ACCOUNT);
assertThat(request.getRequestType()).isEqualTo(MANAGE_ACCOUNT_REQUEST_TYPE);
- assertThat(request.getBleAddress()).isEqualTo(BLE_ADDRESS);
ensureHappyPathAsExpected(request.getAccountKeyDeviceMetadata());
}
@@ -876,15 +832,8 @@
/* Verifies Happy Path DeviceMetadataParcel. */
private static void ensureHappyPathAsExpected(FastPairDeviceMetadataParcel metadataParcel) {
assertThat(metadataParcel).isNotNull();
-
- assertThat(metadataParcel.assistantSetupHalfSheet).isEqualTo(ASSISTANT_SETUP_HALFSHEET);
- assertThat(metadataParcel.assistantSetupNotification).isEqualTo(
- ASSISTANT_SETUP_NOTIFICATION);
-
assertThat(metadataParcel.bleTxPower).isEqualTo(BLE_TX_POWER);
- assertThat(metadataParcel.confirmPinDescription).isEqualTo(CONFIRM_PIN_DESCRIPTION);
- assertThat(metadataParcel.confirmPinTitle).isEqualTo(CONFIRM_PIN_TITLE);
assertThat(metadataParcel.connectSuccessCompanionAppInstalled).isEqualTo(
CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
assertThat(metadataParcel.connectSuccessCompanionAppNotInstalled).isEqualTo(
@@ -896,8 +845,6 @@
assertThat(metadataParcel.failConnectGoToSettingsDescription).isEqualTo(
FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- assertThat(metadataParcel.fastPairTvConnectDeviceNoAccountDescription).isEqualTo(
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
assertThat(metadataParcel.image).isEqualTo(IMAGE);
assertThat(metadataParcel.imageUrl).isEqualTo(IMAGE_URL);
@@ -908,7 +855,6 @@
assertThat(metadataParcel.initialPairingDescription).isEqualTo(INITIAL_PAIRING_DESCRIPTION);
assertThat(metadataParcel.intentUri).isEqualTo(INTENT_URI);
- assertThat(metadataParcel.locale).isEqualTo(LOCALE);
assertThat(metadataParcel.name).isEqualTo(NAME);
assertThat(metadataParcel.openCompanionAppDescription).isEqualTo(
@@ -919,10 +865,6 @@
assertThat(metadataParcel.subsequentPairingDescription).isEqualTo(
SUBSEQUENT_PAIRING_DESCRIPTION);
- assertThat(metadataParcel.syncContactsDescription).isEqualTo(SYNC_CONTACT_DESCRPTION);
- assertThat(metadataParcel.syncContactsTitle).isEqualTo(SYNC_CONTACTS_TITLE);
- assertThat(metadataParcel.syncSmsDescription).isEqualTo(SYNC_SMS_DESCRIPTION);
- assertThat(metadataParcel.syncSmsTitle).isEqualTo(SYNC_SMS_TITLE);
assertThat(metadataParcel.triggerDistance).isWithin(DELTA).of(TRIGGER_DISTANCE);
assertThat(metadataParcel.trueWirelessImageUrlCase).isEqualTo(TRUE_WIRELESS_IMAGE_URL_CASE);
@@ -943,12 +885,7 @@
/* Verifies Happy Path DeviceMetadata. */
private static void ensureHappyPathAsExpected(FastPairDeviceMetadata metadata) {
- assertThat(metadata.getAssistantSetupHalfSheet()).isEqualTo(ASSISTANT_SETUP_HALFSHEET);
- assertThat(metadata.getAssistantSetupNotification())
- .isEqualTo(ASSISTANT_SETUP_NOTIFICATION);
assertThat(metadata.getBleTxPower()).isEqualTo(BLE_TX_POWER);
- assertThat(metadata.getConfirmPinDescription()).isEqualTo(CONFIRM_PIN_DESCRIPTION);
- assertThat(metadata.getConfirmPinTitle()).isEqualTo(CONFIRM_PIN_TITLE);
assertThat(metadata.getConnectSuccessCompanionAppInstalled())
.isEqualTo(CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
assertThat(metadata.getConnectSuccessCompanionAppNotInstalled())
@@ -958,8 +895,6 @@
.isEqualTo(DOWNLOAD_COMPANION_APP_DESCRIPTION);
assertThat(metadata.getFailConnectGoToSettingsDescription())
.isEqualTo(FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- assertThat(metadata.getFastPairTvConnectDeviceNoAccountDescription())
- .isEqualTo(FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
assertThat(metadata.getImage()).isEqualTo(IMAGE);
assertThat(metadata.getImageUrl()).isEqualTo(IMAGE_URL);
assertThat(metadata.getInitialNotificationDescription())
@@ -968,7 +903,6 @@
.isEqualTo(INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT);
assertThat(metadata.getInitialPairingDescription()).isEqualTo(INITIAL_PAIRING_DESCRIPTION);
assertThat(metadata.getIntentUri()).isEqualTo(INTENT_URI);
- assertThat(metadata.getLocale()).isEqualTo(LOCALE);
assertThat(metadata.getName()).isEqualTo(NAME);
assertThat(metadata.getOpenCompanionAppDescription())
.isEqualTo(OPEN_COMPANION_APP_DESCRIPTION);
@@ -976,10 +910,6 @@
.isEqualTo(RETRO_ACTIVE_PAIRING_DESCRIPTION);
assertThat(metadata.getSubsequentPairingDescription())
.isEqualTo(SUBSEQUENT_PAIRING_DESCRIPTION);
- assertThat(metadata.getSyncContactsDescription()).isEqualTo(SYNC_CONTACT_DESCRPTION);
- assertThat(metadata.getSyncContactsTitle()).isEqualTo(SYNC_CONTACTS_TITLE);
- assertThat(metadata.getSyncSmsDescription()).isEqualTo(SYNC_SMS_DESCRIPTION);
- assertThat(metadata.getSyncSmsTitle()).isEqualTo(SYNC_SMS_TITLE);
assertThat(metadata.getTriggerDistance()).isWithin(DELTA).of(TRIGGER_DISTANCE);
assertThat(metadata.getTrueWirelessImageUrlCase()).isEqualTo(TRUE_WIRELESS_IMAGE_URL_CASE);
assertThat(metadata.getTrueWirelessImageUrlLeftBud())
@@ -1000,27 +930,18 @@
assertThat(itemParcel.actionUrl).isEqualTo(ACTION_URL);
assertThat(itemParcel.actionUrlType).isEqualTo(ACTION_URL_TYPE);
assertThat(itemParcel.appName).isEqualTo(APP_NAME);
- assertThat(itemParcel.attachmentType).isEqualTo(ATTACHMENT_TYPE);
assertThat(itemParcel.authenticationPublicKeySecp256r1)
.isEqualTo(AUTHENTICATION_PUBLIC_KEY_SEC_P256R1);
- assertThat(itemParcel.bleRecordBytes).isEqualTo(BLE_RECORD_BYTES);
- assertThat(itemParcel.debugCategory).isEqualTo(DEBUG_CATEGORY);
- assertThat(itemParcel.debugMessage).isEqualTo(DEBUG_MESSAGE);
assertThat(itemParcel.description).isEqualTo(DESCRIPTION);
assertThat(itemParcel.deviceName).isEqualTo(DEVICE_NAME);
assertThat(itemParcel.displayUrl).isEqualTo(DISPLAY_URL);
- assertThat(itemParcel.entityId).isEqualTo(ENTITY_ID);
- assertThat(itemParcel.featureGraphicUrl).isEqualTo(FEATURE_GRAPHIC_URL);
assertThat(itemParcel.firstObservationTimestampMillis)
.isEqualTo(FIRST_OBSERVATION_TIMESTAMP_MILLIS);
- assertThat(itemParcel.groupId).isEqualTo(GROUP_ID);
assertThat(itemParcel.iconFifeUrl).isEqualTo(ICON_FIFE_URL);
assertThat(itemParcel.iconPng).isEqualTo(ICON_PNG);
assertThat(itemParcel.id).isEqualTo(ID);
assertThat(itemParcel.lastObservationTimestampMillis)
.isEqualTo(LAST_OBSERVATION_TIMESTAMP_MILLIS);
- assertThat(itemParcel.lastUserExperience).isEqualTo(LAST_USER_EXPERIENCE);
- assertThat(itemParcel.lostMillis).isEqualTo(LOST_MILLIS);
assertThat(itemParcel.macAddress).isEqualTo(MAC_ADDRESS);
assertThat(itemParcel.packageName).isEqualTo(PACKAGE_NAME);
assertThat(itemParcel.pendingAppInstallTimestampMillis)
@@ -1030,7 +951,6 @@
assertThat(itemParcel.title).isEqualTo(TITLE);
assertThat(itemParcel.triggerId).isEqualTo(TRIGGER_ID);
assertThat(itemParcel.txPower).isEqualTo(TX_POWER);
- assertThat(itemParcel.type).isEqualTo(TYPE);
}
/* Verifies Happy Path FastPairDiscoveryItem. */
@@ -1038,27 +958,18 @@
assertThat(item.getActionUrl()).isEqualTo(ACTION_URL);
assertThat(item.getActionUrlType()).isEqualTo(ACTION_URL_TYPE);
assertThat(item.getAppName()).isEqualTo(APP_NAME);
- assertThat(item.getAttachmentType()).isEqualTo(ATTACHMENT_TYPE);
assertThat(item.getAuthenticationPublicKeySecp256r1())
.isEqualTo(AUTHENTICATION_PUBLIC_KEY_SEC_P256R1);
- assertThat(item.getBleRecordBytes()).isEqualTo(BLE_RECORD_BYTES);
- assertThat(item.getDebugCategory()).isEqualTo(DEBUG_CATEGORY);
- assertThat(item.getDebugMessage()).isEqualTo(DEBUG_MESSAGE);
assertThat(item.getDescription()).isEqualTo(DESCRIPTION);
assertThat(item.getDeviceName()).isEqualTo(DEVICE_NAME);
assertThat(item.getDisplayUrl()).isEqualTo(DISPLAY_URL);
- assertThat(item.getEntityId()).isEqualTo(ENTITY_ID);
- assertThat(item.getFeatureGraphicUrl()).isEqualTo(FEATURE_GRAPHIC_URL);
assertThat(item.getFirstObservationTimestampMillis())
.isEqualTo(FIRST_OBSERVATION_TIMESTAMP_MILLIS);
- assertThat(item.getGroupId()).isEqualTo(GROUP_ID);
assertThat(item.getIconFfeUrl()).isEqualTo(ICON_FIFE_URL);
assertThat(item.getIconPng()).isEqualTo(ICON_PNG);
assertThat(item.getId()).isEqualTo(ID);
assertThat(item.getLastObservationTimestampMillis())
.isEqualTo(LAST_OBSERVATION_TIMESTAMP_MILLIS);
- assertThat(item.getLastUserExperience()).isEqualTo(LAST_USER_EXPERIENCE);
- assertThat(item.getLostMillis()).isEqualTo(LOST_MILLIS);
assertThat(item.getMacAddress()).isEqualTo(MAC_ADDRESS);
assertThat(item.getPackageName()).isEqualTo(PACKAGE_NAME);
assertThat(item.getPendingAppInstallTimestampMillis())
@@ -1068,7 +979,6 @@
assertThat(item.getTitle()).isEqualTo(TITLE);
assertThat(item.getTriggerId()).isEqualTo(TRIGGER_ID);
assertThat(item.getTxPower()).isEqualTo(TX_POWER);
- assertThat(item.getType()).isEqualTo(TYPE);
}
/* Verifies Happy Path EligibleAccountParcel[]. */
diff --git a/nearby/tests/cts/fastpair/src/android/nearby/cts/ScanRequestTest.java b/nearby/tests/cts/fastpair/src/android/nearby/cts/ScanRequestTest.java
index 019f8ec..3a73b9f 100644
--- a/nearby/tests/cts/fastpair/src/android/nearby/cts/ScanRequestTest.java
+++ b/nearby/tests/cts/fastpair/src/android/nearby/cts/ScanRequestTest.java
@@ -21,10 +21,8 @@
import static android.nearby.ScanRequest.SCAN_MODE_LOW_LATENCY;
import static android.nearby.ScanRequest.SCAN_MODE_LOW_POWER;
import static android.nearby.ScanRequest.SCAN_MODE_NO_POWER;
-import static android.nearby.ScanRequest.SCAN_TYPE_EXPOSURE_NOTIFICATION;
import static android.nearby.ScanRequest.SCAN_TYPE_FAST_PAIR;
import static android.nearby.ScanRequest.SCAN_TYPE_NEARBY_PRESENCE;
-import static android.nearby.ScanRequest.SCAN_TYPE_NEARBY_SHARE;
import static com.google.common.truth.Truth.assertThat;
@@ -80,7 +78,7 @@
@SdkSuppress(minSdkVersion = 32, codeName = "T")
public void testSetWorkSource_nullValue() {
ScanRequest request = new ScanRequest.Builder()
- .setScanType(SCAN_TYPE_EXPOSURE_NOTIFICATION)
+ .setScanType(SCAN_TYPE_FAST_PAIR)
.setWorkSource(null)
.build();
@@ -94,14 +92,14 @@
public void testToString() {
WorkSource workSource = getWorkSource();
ScanRequest request = new ScanRequest.Builder()
- .setScanType(SCAN_TYPE_NEARBY_SHARE)
+ .setScanType(SCAN_TYPE_FAST_PAIR)
.setScanMode(SCAN_MODE_BALANCED)
.setBleEnabled(true)
.setWorkSource(workSource)
.build();
assertThat(request.toString()).isEqualTo(
- "Request[scanType=2, scanMode=SCAN_MODE_BALANCED, "
+ "Request[scanType=1, scanMode=SCAN_MODE_BALANCED, "
+ "enableBle=true, workSource=WorkSource{" + UID + " " + APP_NAME
+ "}, scanFilters=[]]");
}
@@ -132,9 +130,7 @@
@SdkSuppress(minSdkVersion = 32, codeName = "T")
public void test_isValidScanType() {
assertThat(ScanRequest.isValidScanType(SCAN_TYPE_FAST_PAIR)).isTrue();
- assertThat(ScanRequest.isValidScanType(SCAN_TYPE_NEARBY_SHARE)).isTrue();
assertThat(ScanRequest.isValidScanType(SCAN_TYPE_NEARBY_PRESENCE)).isTrue();
- assertThat(ScanRequest.isValidScanType(SCAN_TYPE_EXPOSURE_NOTIFICATION)).isTrue();
assertThat(ScanRequest.isValidScanType(0)).isFalse();
assertThat(ScanRequest.isValidScanType(5)).isFalse();
diff --git a/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/shared/android/nearby/fastpair/seeker/FastPairTestDataCache.kt b/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/shared/android/nearby/fastpair/seeker/FastPairTestDataCache.kt
index e08a122..4fb8832 100644
--- a/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/shared/android/nearby/fastpair/seeker/FastPairTestDataCache.kt
+++ b/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/shared/android/nearby/fastpair/seeker/FastPairTestDataCache.kt
@@ -109,31 +109,21 @@
}
data class FastPairDeviceMetadataData(
- @SerializedName("assistant_setup_half_sheet") val assistantSetupHalfSheet: String?,
- @SerializedName("assistant_setup_notification") val assistantSetupNotification: String?,
@SerializedName("ble_tx_power") val bleTxPower: Int,
- @SerializedName("confirm_pin_description") val confirmPinDescription: String?,
- @SerializedName("confirm_pin_title") val confirmPinTitle: String?,
@SerializedName("connect_success_companion_app_installed") val compAppInstalled: String?,
@SerializedName("connect_success_companion_app_not_installed") val comAppNotIns: String?,
@SerializedName("device_type") val deviceType: Int,
@SerializedName("download_companion_app_description") val downloadComApp: String?,
@SerializedName("fail_connect_go_to_settings_description") val failConnectDes: String?,
- @SerializedName("fast_pair_tv_connect_device_no_account_description") val accDes: String?,
@SerializedName("image_url") val imageUrl: String?,
@SerializedName("initial_notification_description") val initNotification: String?,
@SerializedName("initial_notification_description_no_account") val initNoAccount: String?,
@SerializedName("initial_pairing_description") val initialPairingDescription: String?,
@SerializedName("intent_uri") val intentUri: String?,
- @SerializedName("locale") val locale: String?,
@SerializedName("name") val name: String?,
@SerializedName("open_companion_app_description") val openCompanionAppDescription: String?,
@SerializedName("retroactive_pairing_description") val retroactivePairingDes: String?,
@SerializedName("subsequent_pairing_description") val subsequentPairingDescription: String?,
- @SerializedName("sync_contacts_description") val syncContactsDescription: String?,
- @SerializedName("sync_contacts_title") val syncContactsTitle: String?,
- @SerializedName("sync_sms_description") val syncSmsDescription: String?,
- @SerializedName("sync_sms_title") val syncSmsTitle: String?,
@SerializedName("trigger_distance") val triggerDistance: Double,
@SerializedName("case_url") val trueWirelessImageUrlCase: String?,
@SerializedName("left_bud_url") val trueWirelessImageUrlLeftBud: String?,
@@ -144,31 +134,21 @@
@SerializedName("wait_launch_companion_app_description") val waitLaunchCompApp: String?
) {
constructor(meta: FastPairDeviceMetadata) : this(
- assistantSetupHalfSheet = meta.assistantSetupHalfSheet,
- assistantSetupNotification = meta.assistantSetupNotification,
bleTxPower = meta.bleTxPower,
- confirmPinDescription = meta.confirmPinDescription,
- confirmPinTitle = meta.confirmPinTitle,
compAppInstalled = meta.connectSuccessCompanionAppInstalled,
comAppNotIns = meta.connectSuccessCompanionAppNotInstalled,
deviceType = meta.deviceType,
downloadComApp = meta.downloadCompanionAppDescription,
failConnectDes = meta.failConnectGoToSettingsDescription,
- accDes = meta.fastPairTvConnectDeviceNoAccountDescription,
imageUrl = meta.imageUrl,
initNotification = meta.initialNotificationDescription,
initNoAccount = meta.initialNotificationDescriptionNoAccount,
initialPairingDescription = meta.initialPairingDescription,
intentUri = meta.intentUri,
- locale = meta.locale,
name = meta.name,
openCompanionAppDescription = meta.openCompanionAppDescription,
retroactivePairingDes = meta.retroactivePairingDescription,
subsequentPairingDescription = meta.subsequentPairingDescription,
- syncContactsDescription = meta.syncContactsDescription,
- syncContactsTitle = meta.syncContactsTitle,
- syncSmsDescription = meta.syncSmsDescription,
- syncSmsTitle = meta.syncSmsTitle,
triggerDistance = meta.triggerDistance.toDouble(),
trueWirelessImageUrlCase = meta.trueWirelessImageUrlCase,
trueWirelessImageUrlLeftBud = meta.trueWirelessImageUrlLeftBud,
@@ -181,31 +161,21 @@
fun toFastPairDeviceMetadata(): FastPairDeviceMetadata {
return FastPairDeviceMetadata.Builder()
- .setAssistantSetupHalfSheet(assistantSetupHalfSheet)
- .setAssistantSetupNotification(assistantSetupNotification)
.setBleTxPower(bleTxPower)
- .setConfirmPinDescription(confirmPinDescription)
- .setConfirmPinTitle(confirmPinTitle)
.setConnectSuccessCompanionAppInstalled(compAppInstalled)
.setConnectSuccessCompanionAppNotInstalled(comAppNotIns)
.setDeviceType(deviceType)
.setDownloadCompanionAppDescription(downloadComApp)
.setFailConnectGoToSettingsDescription(failConnectDes)
- .setFastPairTvConnectDeviceNoAccountDescription(accDes)
.setImageUrl(imageUrl)
.setInitialNotificationDescription(initNotification)
.setInitialNotificationDescriptionNoAccount(initNoAccount)
.setInitialPairingDescription(initialPairingDescription)
.setIntentUri(intentUri)
- .setLocale(locale)
.setName(name)
.setOpenCompanionAppDescription(openCompanionAppDescription)
.setRetroactivePairingDescription(retroactivePairingDes)
.setSubsequentPairingDescription(subsequentPairingDescription)
- .setSyncContactsDescription(syncContactsDescription)
- .setSyncContactsTitle(syncContactsTitle)
- .setSyncSmsDescription(syncSmsDescription)
- .setSyncSmsTitle(syncSmsTitle)
.setTriggerDistance(triggerDistance.toFloat())
.setTrueWirelessImageUrlCase(trueWirelessImageUrlCase)
.setTrueWirelessImageUrlLeftBud(trueWirelessImageUrlLeftBud)
@@ -222,24 +192,15 @@
@SerializedName("action_url") val actionUrl: String?,
@SerializedName("action_url_type") val actionUrlType: Int,
@SerializedName("app_name") val appName: String?,
- @SerializedName("attachment_type") val attachmentType: Int,
@SerializedName("authentication_public_key_secp256r1") val authenticationPublicKey: String?,
- @SerializedName("ble_record_bytes") val bleRecordBytes: String?,
- @SerializedName("debug_category") val debugCategory: Int,
- @SerializedName("debug_message") val debugMessage: String?,
@SerializedName("description") val description: String?,
@SerializedName("device_name") val deviceName: String?,
@SerializedName("display_url") val displayUrl: String?,
- @SerializedName("entity_id") val entityId: String?,
- @SerializedName("feature_graphic_url") val featureGraphicUrl: String?,
@SerializedName("first_observation_timestamp_millis") val firstObservationMs: Long,
- @SerializedName("group_id") val groupId: String?,
@SerializedName("icon_fife_url") val iconFfeUrl: String?,
@SerializedName("icon_png") val iconPng: String?,
@SerializedName("id") val id: String?,
@SerializedName("last_observation_timestamp_millis") val lastObservationMs: Long,
- @SerializedName("last_user_experience") val lastUserExperience: Int,
- @SerializedName("lost_millis") val lostMillis: Long,
@SerializedName("mac_address") val macAddress: String?,
@SerializedName("package_name") val packageName: String?,
@SerializedName("pending_app_install_timestamp_millis") val pendingAppInstallMs: Long,
@@ -247,31 +208,21 @@
@SerializedName("state") val state: Int,
@SerializedName("title") val title: String?,
@SerializedName("trigger_id") val triggerId: String?,
- @SerializedName("tx_power") val txPower: Int,
- @SerializedName("type") val type: Int
+ @SerializedName("tx_power") val txPower: Int
) {
constructor(item: FastPairDiscoveryItem) : this(
actionUrl = item.actionUrl,
actionUrlType = item.actionUrlType,
appName = item.appName,
- attachmentType = item.attachmentType,
authenticationPublicKey = item.authenticationPublicKeySecp256r1?.base64Encode(),
- bleRecordBytes = item.bleRecordBytes?.base64Encode(),
- debugCategory = item.debugCategory,
- debugMessage = item.debugMessage,
description = item.description,
deviceName = item.deviceName,
displayUrl = item.displayUrl,
- entityId = item.entityId,
- featureGraphicUrl = item.featureGraphicUrl,
firstObservationMs = item.firstObservationTimestampMillis,
- groupId = item.groupId,
iconFfeUrl = item.iconFfeUrl,
iconPng = item.iconPng?.base64Encode(),
id = item.id,
lastObservationMs = item.lastObservationTimestampMillis,
- lastUserExperience = item.lastUserExperience,
- lostMillis = item.lostMillis,
macAddress = item.macAddress,
packageName = item.packageName,
pendingAppInstallMs = item.pendingAppInstallTimestampMillis,
@@ -279,8 +230,7 @@
state = item.state,
title = item.title,
triggerId = item.triggerId,
- txPower = item.txPower,
- type = item.type
+ txPower = item.txPower
)
fun toFastPairDiscoveryItem(): FastPairDiscoveryItem {
@@ -288,24 +238,15 @@
.setActionUrl(actionUrl)
.setActionUrlType(actionUrlType)
.setAppName(appName)
- .setAttachmentType(attachmentType)
.setAuthenticationPublicKeySecp256r1(authenticationPublicKey?.base64Decode())
- .setBleRecordBytes(bleRecordBytes?.base64Decode())
- .setDebugCategory(debugCategory)
- .setDebugMessage(debugMessage)
.setDescription(description)
.setDeviceName(deviceName)
.setDisplayUrl(displayUrl)
- .setEntityId(entityId)
- .setFeatureGraphicUrl(featureGraphicUrl)
.setFirstObservationTimestampMillis(firstObservationMs)
- .setGroupId(groupId)
.setIconFfeUrl(iconFfeUrl)
.setIconPng(iconPng?.base64Decode())
.setId(id)
.setLastObservationTimestampMillis(lastObservationMs)
- .setLastUserExperience(lastUserExperience)
- .setLostMillis(lostMillis)
.setMacAddress(macAddress)
.setPackageName(packageName)
.setPendingAppInstallTimestampMillis(pendingAppInstallMs)
@@ -314,7 +255,6 @@
.setTitle(title)
.setTriggerId(triggerId)
.setTxPower(txPower)
- .setType(type)
.build()
}
}
diff --git a/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/src/android/nearby/fastpair/seeker/dataprovider/FastPairTestDataProviderService.kt b/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/src/android/nearby/fastpair/seeker/dataprovider/FastPairTestDataProviderService.kt
index 3f5a803..aec1379 100644
--- a/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/src/android/nearby/fastpair/seeker/dataprovider/FastPairTestDataProviderService.kt
+++ b/nearby/tests/multidevices/clients/test_service/fastpair_seeker_data_provider/src/android/nearby/fastpair/seeker/dataprovider/FastPairTestDataProviderService.kt
@@ -20,7 +20,10 @@
import android.content.IntentFilter
import android.nearby.FastPairDataProviderService
import android.nearby.FastPairEligibleAccount
-import android.nearby.fastpair.seeker.*
+import android.nearby.fastpair.seeker.ACTION_RESET_TEST_DATA_CACHE
+import android.nearby.fastpair.seeker.ACTION_SEND_ACCOUNT_KEY_DEVICE_METADATA
+import android.nearby.fastpair.seeker.ACTION_SEND_ANTISPOOF_KEY_DEVICE_METADATA
+import android.nearby.fastpair.seeker.FAKE_TEST_ACCOUNT_NAME
import android.nearby.fastpair.seeker.data.FastPairTestDataManager
import android.util.Log
@@ -58,7 +61,9 @@
val fastPairAntispoofKeyDeviceMetadata =
testDataManager.testDataCache.getAntispoofKeyDeviceMetadata(requestedModelId)
if (fastPairAntispoofKeyDeviceMetadata != null) {
- callback.onFastPairAntispoofKeyDeviceMetadataReceived(fastPairAntispoofKeyDeviceMetadata)
+ callback.onFastPairAntispoofKeyDeviceMetadataReceived(
+ fastPairAntispoofKeyDeviceMetadata
+ )
} else {
Log.d(TAG, "No metadata available for $requestedModelId!")
callback.onError(ERROR_CODE_BAD_REQUEST, "No metadata available for $requestedModelId")
@@ -91,7 +96,8 @@
}
override fun onManageFastPairAccount(
- request: FastPairManageAccountRequest, callback: FastPairManageActionCallback
+ request: FastPairManageAccountRequest,
+ callback: FastPairManageActionCallback
) {
val requestedAccount = request.account
val requestType = request.requestType
@@ -101,19 +107,18 @@
}
override fun onManageFastPairAccountDevice(
- request: FastPairManageAccountDeviceRequest, callback: FastPairManageActionCallback
+ request: FastPairManageAccountDeviceRequest,
+ callback: FastPairManageActionCallback
) {
val requestedAccount = request.account
val requestType = request.requestType
val requestTypeString = if (requestType == MANAGE_REQUEST_ADD) "Add" else "Remove"
- val requestedBleAddress = request.bleAddress
val requestedAccountKeyDeviceMetadata = request.accountKeyDeviceMetadata
Log.d(
TAG,
"onManageFastPairAccountDevice(requestedAccount: $requestedAccount, " +
"requestType: $requestTypeString,"
)
- Log.d(TAG, "requestedBleAddress: $requestedBleAddress,")
val requestedAccountKeyDeviceMetadataInJson =
testDataManager.writeAccountKeyDeviceMetadata(requestedAccountKeyDeviceMetadata)
@@ -128,7 +133,7 @@
FastPairEligibleAccount.Builder()
.setAccount(Account(FAKE_TEST_ACCOUNT_NAME, "FakeTestAccount"))
.setOptIn(true)
- .build(),
+ .build()
)
private fun ByteArray.bytesToStringLowerCase(): String =
diff --git a/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_account_devicemeta_json.txt b/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_account_devicemeta_json.txt
index 6be58df..d3deb40 100644
--- a/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_account_devicemeta_json.txt
+++ b/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_account_devicemeta_json.txt
@@ -19,20 +19,10 @@
"subsequent_pairing_description": "Connect %s to this phone",
"retroactive_pairing_description": "Save device to %s for faster pairing to your other devices",
"wait_launch_companion_app_description": "This will take a few moments",
- "fail_connect_go_to_settings_description": "Try manually pairing to the device by going to Settings",
- "confirm_pin_title": "",
- "confirm_pin_description": "",
- "sync_contacts_title": "",
- "sync_contacts_description": "",
- "sync_sms_title": "",
- "sync_sms_description": "",
- "assistant_setup_half_sheet": "Get hands-free help on the go from Google Assistant",
- "assistant_setup_notification": "Tap to set up your Google Assistant",
- "fast_pair_tv_connect_device_no_account_description": "Select connect to pair your %s with this device"
+ "fail_connect_go_to_settings_description": "Try manually pairing to the device by going to Settings"
},
"fast_pair_discovery_item": {
"id": "",
- "type": 6,
"mac_address": "",
"action_url": "intent:#Intent;action=com.google.android.gms.nearby.discovery%3AACTION_MAGIC_PAIR;package=com.google.android.gms;component=com.google.android.gms\/.nearby.discovery.service.DiscoveryService;S.com.google.android.gms.nearby.discovery%3AEXTRA_COMPANION_APP=com.google.android.apps.wearables.maestro.companion;end",
"device_name": "",
@@ -47,19 +37,10 @@
"pending_app_install_timestamp_millis": 0,
"tx_power": 0,
"app_name": "",
- "group_id": "",
- "attachment_type": 0,
"package_name": "",
- "feature_graphic_url": "",
"trigger_id": "",
"icon_png": "",
"icon_fife_url": "https:\/\/lh3.googleusercontent.com\/2PffmZiopo2AjT8sshX0Se3jV-91cp4yOCIay2bBvZqKoKGVy5B4uyzdHsde6UrUSGaoCqV-h4edd5ZljA4oSGc",
- "debug_message": "",
- "debug_category": 0,
- "lost_millis": 0,
- "last_user_experience": 0,
- "ble_record_bytes": "",
- "entity_id": "",
"authentication_public_key_secp256r1": "z+grhW8lWVA34JUQhXOxMrk1WqVy+VpEDd2K+01ZJvS6KdV0OUg7FRMzq+ITuOqKO\/2TIRKEAEfMKdyk2Ob1Vw=="
}
}
diff --git a/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_antispoofkey_devicemeta_json.txt b/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_antispoofkey_devicemeta_json.txt
index c03d000..3611b03 100644
--- a/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_antispoofkey_devicemeta_json.txt
+++ b/nearby/tests/multidevices/host/test_data/fastpair/pixelbuds-a_antispoofkey_devicemeta_json.txt
@@ -10,7 +10,6 @@
"left_bud_url": "https:\/\/lh3.googleusercontent.com\/O8SVJ5E7CXUkpkym7ibZbp6wypuO7HaTFcslT_FjmEzJX4KHoIY_kzLTdK2kwJXiDBgg8cC__sG-JJ5aVnQtFjQ",
"right_bud_url": "https:\/\/lh3.googleusercontent.com\/X_FsRmEKH_fgKzvopyrlyWJAdczRel42Tih7p9-e-U48gBTaggGVQx70K27TzlqIaqYVuaNpTnGoUsKIgiy4WA",
"case_url": "https:\/\/lh3.googleusercontent.com\/mNZ7CGplQSpZhoY79jXDQU4B65eY2f0SndnYZLk1PSm8zKTYeRU7REmrLL_pptD6HpVI2F_oQ6xhhtZKOvB8EQ",
- "locale": "en-US",
"initial_notification_description": "Tap to pair. Earbuds will be tied to %s",
"initial_notification_description_no_account": "Tap to pair with this device",
"open_companion_app_description": "Tap to finish setup",
@@ -24,15 +23,6 @@
"subsequent_pairing_description": "Connect %s to this phone",
"retroactive_pairing_description": "Save device to %s for faster pairing to your other devices",
"wait_launch_companion_app_description": "This will take a few moments",
- "fail_connect_go_to_settings_description": "Try manually pairing to the device by going to Settings",
- "confirm_pin_title": "",
- "confirm_pin_description": "",
- "sync_contacts_title": "",
- "sync_contacts_description": "",
- "sync_sms_title": "",
- "sync_sms_description": "",
- "assistant_setup_half_sheet": "Get hands-free help on the go from Google Assistant",
- "assistant_setup_notification": "Tap to set up your Google Assistant",
- "fast_pair_tv_connect_device_no_account_description": "Select connect to pair your %s with this device"
+ "fail_connect_go_to_settings_description": "Try manually pairing to the device by going to Settings"
}
}
\ No newline at end of file
diff --git a/nearby/tests/multidevices/host/test_data/fastpair/simulator_account_devicemeta_json.txt b/nearby/tests/multidevices/host/test_data/fastpair/simulator_account_devicemeta_json.txt
index 392c443..ed60860 100644
--- a/nearby/tests/multidevices/host/test_data/fastpair/simulator_account_devicemeta_json.txt
+++ b/nearby/tests/multidevices/host/test_data/fastpair/simulator_account_devicemeta_json.txt
@@ -3,17 +3,12 @@
"account_key": "BPy5AaSyMfrFvMNgr6f7GA==",
"sha256_account_key_public_address": "jNGRz+Ni6ZuLd8hVF3lmGoJnF5byXBUyVi9CmnrF1so=",
"fast_pair_device_metadata": {
- "assistant_setup_half_sheet": "Get hands-free help on the go from Google Assistant",
- "assistant_setup_notification": "Tap to set up your Google Assistant",
"ble_tx_power": 0,
"case_url": "",
- "confirm_pin_description": "",
- "confirm_pin_title": "",
"connect_success_companion_app_installed": "Your device is ready to be set up",
"connect_success_companion_app_not_installed": "Download the device app on Google Play to see all available features",
"device_type": 0,
"fail_connect_go_to_settings_description": "Try manually pairing to the device by going to Settings",
- "fast_pair_tv_connect_device_no_account_description": "Select connect to pair your %s with this device",
"image_url": "https://lh3.googleusercontent.com/2PffmZiopo2AjT8sshX0Se3jV-91cp4yOCIay2bBvZqKoKGVy5B4uyzdHsde6UrUSGaoCqV-h4edd5ZljA4oSGc",
"initial_notification_description": "Tap to pair. Earbuds will be tied to %s",
"initial_notification_description_no_account": "Tap to pair with this device",
@@ -23,10 +18,6 @@
"retroactive_pairing_description": "Save device to %s for faster pairing to your other devices",
"right_bud_url": "",
"subsequent_pairing_description": "Connect %s to this phone",
- "sync_contacts_description": "",
- "sync_contacts_title": "",
- "sync_sms_description": "",
- "sync_sms_title": "",
"trigger_distance": 0,
"wait_launch_companion_app_description": "This will take a few moments"
},
@@ -34,24 +25,15 @@
"action_url": "intent:#Intent;action=com.google.android.gms.nearby.discovery%3AACTION_MAGIC_PAIR;package=com.google.android.gms;component=com.google.android.gms/.nearby.discovery.service.DiscoveryService;S.com.google.android.gms.nearby.discovery%3AEXTRA_COMPANION_APP=com.google.android.apps.wearables.maestro.companion;end",
"action_url_type": 2,
"app_name": "",
- "attachment_type": 0,
"authentication_public_key_secp256r1": "z+grhW8lWVA34JUQhXOxMrk1WqVy+VpEDd2K+01ZJvS6KdV0OUg7FRMzq+ITuOqKO/2TIRKEAEfMKdyk2Ob1Vw==",
- "ble_record_bytes": "",
- "debug_category": 0,
- "debug_message": "",
"description": "Tap to pair with this device",
"device_name": "",
"display_url": "",
- "entity_id": "",
- "feature_graphic_url": "",
"first_observation_timestamp_millis": 0,
- "group_id": "",
"icon_fife_url": "https://lh3.googleusercontent.com/2PffmZiopo2AjT8sshX0Se3jV-91cp4yOCIay2bBvZqKoKGVy5B4uyzdHsde6UrUSGaoCqV-h4edd5ZljA4oSGc",
"icon_png": "",
"id": "",
"last_observation_timestamp_millis": 0,
- "last_user_experience": 0,
- "lost_millis": 0,
"mac_address": "",
"package_name": "",
"pending_app_install_timestamp_millis": 0,
@@ -59,8 +41,7 @@
"state": 1,
"title": "Pixel Buds A-Series",
"trigger_id": "",
- "tx_power": 0,
- "type": 6
+ "tx_power": 0
}
}
]
\ No newline at end of file
diff --git a/nearby/tests/multidevices/host/test_data/fastpair/simulator_antispoofkey_devicemeta_json.txt b/nearby/tests/multidevices/host/test_data/fastpair/simulator_antispoofkey_devicemeta_json.txt
index 7cb29f4..fc9706a 100644
--- a/nearby/tests/multidevices/host/test_data/fastpair/simulator_antispoofkey_devicemeta_json.txt
+++ b/nearby/tests/multidevices/host/test_data/fastpair/simulator_antispoofkey_devicemeta_json.txt
@@ -1,34 +1,24 @@
{
"anti_spoofing_public_key_str": "sjp\/AOS7+VnTCaueeWorjdeJ8Nc32EOmpe\/QRhzY9+cMNELU1QA3jzgvUXdWW73nl6+EN01eXtLBu2Fw9CGmfA==",
"fast_pair_device_metadata": {
- "assistant_setup_half_sheet": "Get hands-free help on the go from Google Assistant",
- "assistant_setup_notification": "Tap to set up your Google Assistant",
"ble_tx_power": -10,
"case_url": "https://lh3.googleusercontent.com/mNZ7CGplQSpZhoY79jXDQU4B65eY2f0SndnYZLk1PSm8zKTYeRU7REmrLL_pptD6HpVI2F_oQ6xhhtZKOvB8EQ",
- "confirm_pin_description": "",
- "confirm_pin_title": "",
"connect_success_companion_app_installed": "Your device is ready to be set up",
"connect_success_companion_app_not_installed": "Download the device app on Google Play to see all available features",
"device_type": 7,
"download_companion_app_description": "Tap to download device app on Google Play and see all features",
"fail_connect_go_to_settings_description": "Try manually pairing to the device by going to Settings",
- "fast_pair_tv_connect_device_no_account_description": "Select connect to pair your %s with this device",
"image_url": "https://lh3.googleusercontent.com/THpAzISZGa5F86cMsBcTPhRWefBPc5dorBxWdOPCGvbFg6ZMHUjFuE-4kbLuoLoIMHf3Fd8jUvvcxnjp_Q",
"initial_notification_description": "Tap to pair. Earbuds will be tied to %s",
"initial_notification_description_no_account": "Tap to pair with this device",
"initial_pairing_description": "%s will appear on devices linked with %s",
"intent_uri": "intent:#Intent;action=com.google.android.gms.nearby.discovery%3AACTION_MAGIC_PAIR;package=com.google.android.gms;component=com.google.android.gms/.nearby.discovery.service.DiscoveryService;S.com.google.android.gms.nearby.discovery%3AEXTRA_COMPANION_APP=com.google.android.testapp;end",
"left_bud_url": "https://lh3.googleusercontent.com/O8SVJ5E7CXUkpkym7ibZbp6wypuO7HaTFcslT_FjmEzJX4KHoIY_kzLTdK2kwJXiDBgg8cC__sG-JJ5aVnQtFjQ",
- "locale": "en-US",
"name": "Fast Pair Provider Simulator",
"open_companion_app_description": "Tap to finish setup",
"retroactive_pairing_description": "Save device to %s for faster pairing to your other devices",
"right_bud_url": "https://lh3.googleusercontent.com/X_FsRmEKH_fgKzvopyrlyWJAdczRel42Tih7p9-e-U48gBTaggGVQx70K27TzlqIaqYVuaNpTnGoUsKIgiy4WA",
"subsequent_pairing_description": "Connect %s to this phone",
- "sync_contacts_description": "",
- "sync_contacts_title": "",
- "sync_sms_description": "",
- "sync_sms_title": "",
"trigger_distance": 0.6000000238418579,
"unable_to_connect_description": "Try manually pairing to the device",
"unable_to_connect_title": "Unable to connect",
diff --git a/nearby/tests/unit/src/android/nearby/ScanRequestTest.java b/nearby/tests/unit/src/android/nearby/ScanRequestTest.java
index 020f6d6..a45d8bb 100644
--- a/nearby/tests/unit/src/android/nearby/ScanRequestTest.java
+++ b/nearby/tests/unit/src/android/nearby/ScanRequestTest.java
@@ -18,10 +18,8 @@
import static android.nearby.ScanRequest.SCAN_MODE_BALANCED;
import static android.nearby.ScanRequest.SCAN_MODE_LOW_POWER;
-import static android.nearby.ScanRequest.SCAN_TYPE_EXPOSURE_NOTIFICATION;
import static android.nearby.ScanRequest.SCAN_TYPE_FAST_PAIR;
import static android.nearby.ScanRequest.SCAN_TYPE_NEARBY_PRESENCE;
-import static android.nearby.ScanRequest.SCAN_TYPE_NEARBY_SHARE;
import static com.google.common.truth.Truth.assertThat;
@@ -82,7 +80,7 @@
public void testSetWorkSource() {
WorkSource workSource = getWorkSource();
ScanRequest request = new ScanRequest.Builder()
- .setScanType(SCAN_TYPE_NEARBY_SHARE)
+ .setScanType(SCAN_TYPE_FAST_PAIR)
.setWorkSource(workSource)
.build();
@@ -93,7 +91,7 @@
@Test
public void testSetWorkSource_nullValue() {
ScanRequest request = new ScanRequest.Builder()
- .setScanType(SCAN_TYPE_EXPOSURE_NOTIFICATION)
+ .setScanType(SCAN_TYPE_FAST_PAIR)
.setWorkSource(null)
.build();
@@ -106,14 +104,14 @@
public void testToString() {
WorkSource workSource = getWorkSource();
ScanRequest request = new ScanRequest.Builder()
- .setScanType(SCAN_TYPE_NEARBY_SHARE)
+ .setScanType(SCAN_TYPE_FAST_PAIR)
.setScanMode(SCAN_MODE_BALANCED)
.setBleEnabled(true)
.setWorkSource(workSource)
.build();
assertThat(request.toString()).isEqualTo(
- "Request[scanType=2, scanMode=SCAN_MODE_BALANCED, "
+ "Request[scanType=1, scanMode=SCAN_MODE_BALANCED, "
+ "enableBle=true, workSource=WorkSource{1001 android.nearby.tests}, "
+ "scanFilters=[]]");
}
diff --git a/nearby/tests/unit/src/com/android/server/nearby/fastpair/testing/FakeDiscoveryItems.java b/nearby/tests/unit/src/com/android/server/nearby/fastpair/testing/FakeDiscoveryItems.java
index aa7e6f6..c406e47 100644
--- a/nearby/tests/unit/src/com/android/server/nearby/fastpair/testing/FakeDiscoveryItems.java
+++ b/nearby/tests/unit/src/com/android/server/nearby/fastpair/testing/FakeDiscoveryItems.java
@@ -42,7 +42,6 @@
item.setState(Cache.StoredDiscoveryItem.State.STATE_ENABLED);
item.setId(FAST_PAIR_ID);
item.setDescription(DEFAULT_DESCRIPITON);
- item.setType(Cache.NearbyType.NEARBY_DEVICE);
item.setTriggerId(triggerId);
item.setMacAddress(DEFAULT_MAC_ADDRESS);
item.setFirstObservationTimestampMillis(DEFAULT_TIMESTAMP);
diff --git a/nearby/tests/unit/src/com/android/server/nearby/metrics/NearbyMetricsTest.java b/nearby/tests/unit/src/com/android/server/nearby/metrics/NearbyMetricsTest.java
index c4d1ee2..91962ce 100644
--- a/nearby/tests/unit/src/com/android/server/nearby/metrics/NearbyMetricsTest.java
+++ b/nearby/tests/unit/src/com/android/server/nearby/metrics/NearbyMetricsTest.java
@@ -17,7 +17,7 @@
package com.android.server.nearby.metrics;
import static android.nearby.ScanRequest.SCAN_MODE_BALANCED;
-import static android.nearby.ScanRequest.SCAN_TYPE_NEARBY_SHARE;
+import static android.nearby.ScanRequest.SCAN_TYPE_FAST_PAIR;
import android.nearby.NearbyDeviceParcelable;
import android.nearby.PublicCredential;
@@ -59,7 +59,7 @@
private final ScanRequest.Builder mScanRequestBuilder =
new ScanRequest.Builder()
.setScanMode(SCAN_MODE_BALANCED)
- .setScanType(SCAN_TYPE_NEARBY_SHARE);
+ .setScanType(SCAN_TYPE_FAST_PAIR);
private final ScanRequest mScanRequest = mScanRequestBuilder.setWorkSource(mWorkSource).build();
private final ScanRequest mScanRequestWithEmptyWorkSource =
mScanRequestBuilder.setWorkSource(mEmptyWorkSource).build();
@@ -103,7 +103,7 @@
SESSION_ID,
NearbyStatsLog
.NEARBY_DEVICE_SCAN_STATE_CHANGED__SCAN_STATE__NEARBY_SCAN_STATE_STARTED,
- SCAN_TYPE_NEARBY_SHARE,
+ SCAN_TYPE_FAST_PAIR,
0,
0,
"",
@@ -119,7 +119,7 @@
SESSION_ID,
NearbyStatsLog
.NEARBY_DEVICE_SCAN_STATE_CHANGED__SCAN_STATE__NEARBY_SCAN_STATE_STARTED,
- SCAN_TYPE_NEARBY_SHARE,
+ SCAN_TYPE_FAST_PAIR,
0,
0,
"",
@@ -135,7 +135,7 @@
SESSION_ID,
NearbyStatsLog
.NEARBY_DEVICE_SCAN_STATE_CHANGED__SCAN_STATE__NEARBY_SCAN_STATE_STOPPED,
- SCAN_TYPE_NEARBY_SHARE,
+ SCAN_TYPE_FAST_PAIR,
0,
0,
"",
@@ -151,7 +151,7 @@
SESSION_ID,
NearbyStatsLog
.NEARBY_DEVICE_SCAN_STATE_CHANGED__SCAN_STATE__NEARBY_SCAN_STATE_STOPPED,
- SCAN_TYPE_NEARBY_SHARE,
+ SCAN_TYPE_FAST_PAIR,
0,
0,
"",
@@ -167,7 +167,7 @@
SESSION_ID,
NearbyStatsLog
.NEARBY_DEVICE_SCAN_STATE_CHANGED__SCAN_STATE__NEARBY_SCAN_STATE_DISCOVERED,
- SCAN_TYPE_NEARBY_SHARE,
+ SCAN_TYPE_FAST_PAIR,
SCAN_MEDIUM,
RSSI,
FAST_PAIR_MODEL_ID,
@@ -184,7 +184,7 @@
SESSION_ID,
NearbyStatsLog
.NEARBY_DEVICE_SCAN_STATE_CHANGED__SCAN_STATE__NEARBY_SCAN_STATE_DISCOVERED,
- SCAN_TYPE_NEARBY_SHARE,
+ SCAN_TYPE_FAST_PAIR,
SCAN_MEDIUM,
RSSI,
FAST_PAIR_MODEL_ID,
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 205d5c2..eeea319 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
@@ -310,13 +310,6 @@
private static void ensureHappyPathAsExpected(FastPairDeviceMetadataParcel metadataParcel) {
assertThat(metadataParcel).isNotNull();
- assertThat(metadataParcel.assistantSetupHalfSheet).isEqualTo(ASSISTANT_SETUP_HALFSHEET);
- assertThat(metadataParcel.assistantSetupNotification).isEqualTo(
- ASSISTANT_SETUP_NOTIFICATION);
-
-
- assertThat(metadataParcel.confirmPinDescription).isEqualTo(CONFIRM_PIN_DESCRIPTION);
- assertThat(metadataParcel.confirmPinTitle).isEqualTo(CONFIRM_PIN_TITLE);
assertThat(metadataParcel.connectSuccessCompanionAppInstalled).isEqualTo(
CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
assertThat(metadataParcel.connectSuccessCompanionAppNotInstalled).isEqualTo(
@@ -326,8 +319,6 @@
assertThat(metadataParcel.failConnectGoToSettingsDescription).isEqualTo(
FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- assertThat(metadataParcel.fastPairTvConnectDeviceNoAccountDescription).isEqualTo(
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
assertThat(metadataParcel.initialNotificationDescription).isEqualTo(
INITIAL_NOTIFICATION_DESCRIPTION);
@@ -341,10 +332,6 @@
assertThat(metadataParcel.subsequentPairingDescription).isEqualTo(
SUBSEQUENT_PAIRING_DESCRIPTION);
- assertThat(metadataParcel.syncContactsDescription).isEqualTo(SYNC_CONTACT_DESCRPTION);
- assertThat(metadataParcel.syncContactsTitle).isEqualTo(SYNC_CONTACTS_TITLE);
- assertThat(metadataParcel.syncSmsDescription).isEqualTo(SYNC_SMS_DESCRIPTION);
- assertThat(metadataParcel.syncSmsTitle).isEqualTo(SYNC_SMS_TITLE);
assertThat(metadataParcel.trueWirelessImageUrlCase).isEqualTo(TRUE_WIRELESS_IMAGE_URL_CASE);
assertThat(metadataParcel.trueWirelessImageUrlLeftBud).isEqualTo(
@@ -378,27 +365,18 @@
assertThat(itemParcel.actionUrl).isEqualTo(ACTION_URL);
assertThat(itemParcel.actionUrlType).isEqualTo(ACTION_URL_TYPE);
assertThat(itemParcel.appName).isEqualTo(APP_NAME);
- assertThat(itemParcel.attachmentType).isEqualTo(ATTACHMENT_TYPE);
assertThat(itemParcel.authenticationPublicKeySecp256r1)
.isEqualTo(AUTHENTICATION_PUBLIC_KEY_SEC_P256R1);
- assertThat(itemParcel.bleRecordBytes).isEqualTo(BLE_RECORD_BYTES);
- assertThat(itemParcel.debugCategory).isEqualTo(DEBUG_CATEGORY);
- assertThat(itemParcel.debugMessage).isEqualTo(DEBUG_MESSAGE);
assertThat(itemParcel.description).isEqualTo(DESCRIPTION);
assertThat(itemParcel.deviceName).isEqualTo(DEVICE_NAME);
assertThat(itemParcel.displayUrl).isEqualTo(DISPLAY_URL);
- assertThat(itemParcel.entityId).isEqualTo(ENTITY_ID);
- assertThat(itemParcel.featureGraphicUrl).isEqualTo(FEATURE_GRAPHIC_URL);
assertThat(itemParcel.firstObservationTimestampMillis)
.isEqualTo(FIRST_OBSERVATION_TIMESTAMP_MILLIS);
- assertThat(itemParcel.groupId).isEqualTo(GROUP_ID);
assertThat(itemParcel.iconFifeUrl).isEqualTo(ICON_FIFE_URL);
assertThat(itemParcel.iconPng).isEqualTo(ICON_PNG);
assertThat(itemParcel.id).isEqualTo(ID);
assertThat(itemParcel.lastObservationTimestampMillis)
.isEqualTo(LAST_OBSERVATION_TIMESTAMP_MILLIS);
- assertThat(itemParcel.lastUserExperience).isEqualTo(LAST_USER_EXPERIENCE);
- assertThat(itemParcel.lostMillis).isEqualTo(LOST_MILLIS);
assertThat(itemParcel.macAddress).isEqualTo(MAC_ADDRESS);
assertThat(itemParcel.packageName).isEqualTo(PACKAGE_NAME);
assertThat(itemParcel.pendingAppInstallTimestampMillis)
@@ -408,7 +386,6 @@
assertThat(itemParcel.title).isEqualTo(TITLE);
assertThat(itemParcel.triggerId).isEqualTo(TRIGGER_ID);
assertThat(itemParcel.txPower).isEqualTo(TX_POWER);
- assertThat(itemParcel.type).isEqualTo(TYPE);
}
private static FastPairEligibleAccountParcel genHappyPathFastPairEligibleAccountParcel() {
@@ -461,19 +438,13 @@
private static FastPairDeviceMetadataParcel genHappyPathFastPairDeviceMetadataParcel() {
FastPairDeviceMetadataParcel parcel = new FastPairDeviceMetadataParcel();
- parcel.assistantSetupHalfSheet = ASSISTANT_SETUP_HALFSHEET;
- parcel.assistantSetupNotification = ASSISTANT_SETUP_NOTIFICATION;
parcel.bleTxPower = BLE_TX_POWER;
- parcel.confirmPinDescription = CONFIRM_PIN_DESCRIPTION;
- parcel.confirmPinTitle = CONFIRM_PIN_TITLE;
parcel.connectSuccessCompanionAppInstalled = CONNECT_SUCCESS_COMPANION_APP_INSTALLED;
parcel.connectSuccessCompanionAppNotInstalled =
CONNECT_SUCCESS_COMPANION_APP_NOT_INSTALLED;
parcel.deviceType = DEVICE_TYPE;
parcel.downloadCompanionAppDescription = DOWNLOAD_COMPANION_APP_DESCRIPTION;
parcel.failConnectGoToSettingsDescription = FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION;
- parcel.fastPairTvConnectDeviceNoAccountDescription =
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION;
parcel.image = IMAGE;
parcel.imageUrl = IMAGE_URL;
parcel.initialNotificationDescription = INITIAL_NOTIFICATION_DESCRIPTION;
@@ -481,15 +452,10 @@
INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT;
parcel.initialPairingDescription = INITIAL_PAIRING_DESCRIPTION;
parcel.intentUri = INTENT_URI;
- parcel.locale = LOCALE;
parcel.name = NAME;
parcel.openCompanionAppDescription = OPEN_COMPANION_APP_DESCRIPTION;
parcel.retroactivePairingDescription = RETRO_ACTIVE_PAIRING_DESCRIPTION;
parcel.subsequentPairingDescription = SUBSEQUENT_PAIRING_DESCRIPTION;
- parcel.syncContactsDescription = SYNC_CONTACT_DESCRPTION;
- parcel.syncContactsTitle = SYNC_CONTACTS_TITLE;
- parcel.syncSmsDescription = SYNC_SMS_DESCRIPTION;
- parcel.syncSmsTitle = SYNC_SMS_TITLE;
parcel.triggerDistance = TRIGGER_DISTANCE;
parcel.trueWirelessImageUrlCase = TRUE_WIRELESS_IMAGE_URL_CASE;
parcel.trueWirelessImageUrlLeftBud = TRUE_WIRELESS_IMAGE_URL_LEFT_BUD;
@@ -508,30 +474,18 @@
storedDiscoveryItemBuilder.setActionUrl(ACTION_URL);
storedDiscoveryItemBuilder.setActionUrlType(Cache.ResolvedUrlType.WEBPAGE);
storedDiscoveryItemBuilder.setAppName(APP_NAME);
- storedDiscoveryItemBuilder.setAttachmentType(
- Cache.DiscoveryAttachmentType.DISCOVERY_ATTACHMENT_TYPE_NORMAL);
storedDiscoveryItemBuilder.setAuthenticationPublicKeySecp256R1(
ByteString.copyFrom(AUTHENTICATION_PUBLIC_KEY_SEC_P256R1));
- storedDiscoveryItemBuilder.setBleRecordBytes(ByteString.copyFrom(BLE_RECORD_BYTES));
- storedDiscoveryItemBuilder.setDebugCategory(
- Cache.StoredDiscoveryItem.DebugMessageCategory.STATUS_VALID_NOTIFICATION);
- storedDiscoveryItemBuilder.setDebugMessage(DEBUG_MESSAGE);
storedDiscoveryItemBuilder.setDescription(DESCRIPTION);
storedDiscoveryItemBuilder.setDeviceName(DEVICE_NAME);
storedDiscoveryItemBuilder.setDisplayUrl(DISPLAY_URL);
- storedDiscoveryItemBuilder.setEntityId(ENTITY_ID);
- storedDiscoveryItemBuilder.setFeatureGraphicUrl(FEATURE_GRAPHIC_URL);
storedDiscoveryItemBuilder.setFirstObservationTimestampMillis(
FIRST_OBSERVATION_TIMESTAMP_MILLIS);
- storedDiscoveryItemBuilder.setGroupId(GROUP_ID);
storedDiscoveryItemBuilder.setIconFifeUrl(ICON_FIFE_URL);
storedDiscoveryItemBuilder.setIconPng(ByteString.copyFrom(ICON_PNG));
storedDiscoveryItemBuilder.setId(ID);
storedDiscoveryItemBuilder.setLastObservationTimestampMillis(
LAST_OBSERVATION_TIMESTAMP_MILLIS);
- storedDiscoveryItemBuilder.setLastUserExperience(
- Cache.StoredDiscoveryItem.ExperienceType.EXPERIENCE_GOOD);
- storedDiscoveryItemBuilder.setLostMillis(LOST_MILLIS);
storedDiscoveryItemBuilder.setMacAddress(MAC_ADDRESS);
storedDiscoveryItemBuilder.setPackageName(PACKAGE_NAME);
storedDiscoveryItemBuilder.setPendingAppInstallTimestampMillis(
@@ -541,21 +495,14 @@
storedDiscoveryItemBuilder.setTitle(TITLE);
storedDiscoveryItemBuilder.setTriggerId(TRIGGER_ID);
storedDiscoveryItemBuilder.setTxPower(TX_POWER);
- storedDiscoveryItemBuilder.setType(Cache.NearbyType.NEARBY_PROXIMITY_BEACON);
FastPairStrings.Builder stringsBuilder = FastPairStrings.newBuilder();
- stringsBuilder.setAssistantHalfSheetDescription(ASSISTANT_SETUP_HALFSHEET);
- stringsBuilder.setAssistantNotificationDescription(ASSISTANT_SETUP_NOTIFICATION);
- stringsBuilder.setConfirmPinDescription(CONFIRM_PIN_DESCRIPTION);
- stringsBuilder.setConfirmPinTitle(CONFIRM_PIN_TITLE);
stringsBuilder.setPairingFinishedCompanionAppInstalled(
CONNECT_SUCCESS_COMPANION_APP_INSTALLED);
stringsBuilder.setPairingFinishedCompanionAppNotInstalled(
CONNECT_SUCCESS_COMPANION_APP_NOT_INSTALLED);
stringsBuilder.setPairingFailDescription(
FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION);
- stringsBuilder.setFastPairTvConnectDeviceNoAccountDescription(
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
stringsBuilder.setTapToPairWithAccount(
INITIAL_NOTIFICATION_DESCRIPTION);
stringsBuilder.setTapToPairWithoutAccount(
@@ -563,10 +510,6 @@
stringsBuilder.setInitialPairingDescription(INITIAL_PAIRING_DESCRIPTION);
stringsBuilder.setRetroactivePairingDescription(RETRO_ACTIVE_PAIRING_DESCRIPTION);
stringsBuilder.setSubsequentPairingDescription(SUBSEQUENT_PAIRING_DESCRIPTION);
- stringsBuilder.setSyncContactsDescription(SYNC_CONTACT_DESCRPTION);
- stringsBuilder.setSyncContactsTitle(SYNC_CONTACTS_TITLE);
- stringsBuilder.setSyncSmsDescription(SYNC_SMS_DESCRIPTION);
- stringsBuilder.setSyncSmsTitle(SYNC_SMS_TITLE);
stringsBuilder.setWaitAppLaunchDescription(WAIT_LAUNCH_COMPANION_APP_DESCRIPTION);
storedDiscoveryItemBuilder.setFastPairStrings(stringsBuilder.build());
@@ -606,24 +549,15 @@
parcel.actionUrl = ACTION_URL;
parcel.actionUrlType = ACTION_URL_TYPE;
parcel.appName = APP_NAME;
- parcel.attachmentType = ATTACHMENT_TYPE;
parcel.authenticationPublicKeySecp256r1 = AUTHENTICATION_PUBLIC_KEY_SEC_P256R1;
- parcel.bleRecordBytes = BLE_RECORD_BYTES;
- parcel.debugCategory = DEBUG_CATEGORY;
- parcel.debugMessage = DEBUG_MESSAGE;
parcel.description = DESCRIPTION;
parcel.deviceName = DEVICE_NAME;
parcel.displayUrl = DISPLAY_URL;
- parcel.entityId = ENTITY_ID;
- parcel.featureGraphicUrl = FEATURE_GRAPHIC_URL;
parcel.firstObservationTimestampMillis = FIRST_OBSERVATION_TIMESTAMP_MILLIS;
- parcel.groupId = GROUP_ID;
parcel.iconFifeUrl = ICON_FIFE_URL;
parcel.iconPng = ICON_PNG;
parcel.id = ID;
parcel.lastObservationTimestampMillis = LAST_OBSERVATION_TIMESTAMP_MILLIS;
- parcel.lastUserExperience = LAST_USER_EXPERIENCE;
- parcel.lostMillis = LOST_MILLIS;
parcel.macAddress = MAC_ADDRESS;
parcel.packageName = PACKAGE_NAME;
parcel.pendingAppInstallTimestampMillis = PENDING_APP_INSTALL_TIMESTAMP_MILLIS;
@@ -632,7 +566,6 @@
parcel.title = TITLE;
parcel.triggerId = TRIGGER_ID;
parcel.txPower = TX_POWER;
- parcel.type = TYPE;
return parcel;
}
@@ -659,10 +592,6 @@
.setDevice(deviceBuilder.build())
.setImage(ByteString.copyFrom(IMAGE))
.setStrings(Rpcs.ObservedDeviceStrings.newBuilder()
- .setAssistantSetupHalfSheet(ASSISTANT_SETUP_HALFSHEET)
- .setAssistantSetupNotification(ASSISTANT_SETUP_NOTIFICATION)
- .setConfirmPinDescription(CONFIRM_PIN_DESCRIPTION)
- .setConfirmPinTitle(CONFIRM_PIN_TITLE)
.setConnectSuccessCompanionAppInstalled(
CONNECT_SUCCESS_COMPANION_APP_INSTALLED)
.setConnectSuccessCompanionAppNotInstalled(
@@ -671,29 +600,18 @@
DOWNLOAD_COMPANION_APP_DESCRIPTION)
.setFailConnectGoToSettingsDescription(
FAIL_CONNECT_GOTO_SETTINGS_DESCRIPTION)
- .setFastPairTvConnectDeviceNoAccountDescription(
- FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION)
.setInitialNotificationDescription(
INITIAL_NOTIFICATION_DESCRIPTION)
.setInitialNotificationDescriptionNoAccount(
INITIAL_NOTIFICATION_DESCRIPTION_NO_ACCOUNT)
.setInitialPairingDescription(
INITIAL_PAIRING_DESCRIPTION)
- .setLocale(LOCALE)
.setOpenCompanionAppDescription(
OPEN_COMPANION_APP_DESCRIPTION)
.setRetroactivePairingDescription(
RETRO_ACTIVE_PAIRING_DESCRIPTION)
.setSubsequentPairingDescription(
SUBSEQUENT_PAIRING_DESCRIPTION)
- .setSyncContactsDescription(
- SYNC_CONTACT_DESCRPTION)
- .setSyncContactsTitle(
- SYNC_CONTACTS_TITLE)
- .setSyncSmsDescription(
- SYNC_SMS_DESCRIPTION)
- .setSyncSmsTitle(
- SYNC_SMS_TITLE)
.setUnableToConnectDescription(
UNABLE_TO_CONNECT_DESCRIPTION)
.setUnableToConnectTitle(
diff --git a/nearby/tests/unit/src/com/android/server/nearby/util/DataUtilsTest.java b/nearby/tests/unit/src/com/android/server/nearby/util/DataUtilsTest.java
index 9152c07..f098600 100644
--- a/nearby/tests/unit/src/com/android/server/nearby/util/DataUtilsTest.java
+++ b/nearby/tests/unit/src/com/android/server/nearby/util/DataUtilsTest.java
@@ -92,12 +92,6 @@
.isEqualTo(MESSAGE_WAIT_LAUNCH_COMPANION_APP_DESCRIPTION);
assertThat(strings.getPairingFailDescription())
.isEqualTo(MESSAGE_FAIL_CONNECT_DESCRIPTION);
- assertThat(strings.getAssistantHalfSheetDescription())
- .isEqualTo(MESSAGE_ASSISTANT_HALF_SHEET_DESCRIPTION);
- assertThat(strings.getAssistantNotificationDescription())
- .isEqualTo(MESSAGE_ASSISTANT_NOTIFICATION_DESCRIPTION);
- assertThat(strings.getFastPairTvConnectDeviceNoAccountDescription())
- .isEqualTo(MESSAGE_FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION);
}
@Test
@@ -124,10 +118,7 @@
+ "subsequentPairingDescription=message 6, "
+ "retroactivePairingDescription=message 7, "
+ "waitAppLaunchDescription=message 8, "
- + "pairingFailDescription=message 9, "
- + "assistantHalfSheetDescription=message 11, "
- + "assistantNotificationDescription=message 12, "
- + "fastPairTvConnectDeviceNoAccountDescription=message 10]");
+ + "pairingFailDescription=message 9]");
}
private static GetObservedDeviceResponse createObservedDeviceResponse() {
@@ -168,13 +159,7 @@
.setWaitLaunchCompanionAppDescription(
MESSAGE_WAIT_LAUNCH_COMPANION_APP_DESCRIPTION)
.setFailConnectGoToSettingsDescription(
- MESSAGE_FAIL_CONNECT_DESCRIPTION)
- .setAssistantSetupHalfSheet(
- MESSAGE_ASSISTANT_HALF_SHEET_DESCRIPTION)
- .setAssistantSetupNotification(
- MESSAGE_ASSISTANT_NOTIFICATION_DESCRIPTION)
- .setFastPairTvConnectDeviceNoAccountDescription(
- MESSAGE_FAST_PAIR_TV_CONNECT_DEVICE_NO_ACCOUNT_DESCRIPTION))
+ MESSAGE_FAIL_CONNECT_DESCRIPTION))
.build();
}
}