Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AppInstallationStatusNodeType.UNKNOWN #2073

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion datalayer/core/api/current.api
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ package com.google.android.horologist.data.apphelper {
method public static com.google.android.horologist.data.apphelper.AppInstallationStatusNodeType valueOf(String value) throws java.lang.IllegalArgumentException, java.lang.NullPointerException;
method public static com.google.android.horologist.data.apphelper.AppInstallationStatusNodeType[] values();
enum_constant public static final com.google.android.horologist.data.apphelper.AppInstallationStatusNodeType PHONE;
enum_constant public static final com.google.android.horologist.data.apphelper.AppInstallationStatusNodeType UNKNOWN;
enum_constant public static final com.google.android.horologist.data.apphelper.AppInstallationStatusNodeType WATCH;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ public sealed class AppInstallationStatus {
public enum class AppInstallationStatusNodeType {
WATCH,
PHONE,

/**
* This case should not happen, but it's here in order to keep the node listed even in a
* scenario where there were issues retrieving the capability of the node.
*/
UNKNOWN,
}

public val AppHelperNodeStatus.appInstalled: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ abstract class DataLayerAppHelper(
val appInstallationStatus = if (allInstalledNodes.contains(it.id)) {
val nodeType = when (it.id) {
in installedPhoneNodes -> AppInstallationStatusNodeType.PHONE
in installedWatchNodes -> AppInstallationStatusNodeType.WATCH
else -> AppInstallationStatusNodeType.UNKNOWN
else -> AppInstallationStatusNodeType.WATCH
yschimke marked this conversation as resolved.
Show resolved Hide resolved
}
AppInstallationStatus.Installed(nodeType = nodeType)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class NodesActionViewModel
when (status.nodeType) {
AppInstallationStatusNodeType.WATCH -> NodeTypeUiModel.WATCH
AppInstallationStatusNodeType.PHONE -> NodeTypeUiModel.PHONE
AppInstallationStatusNodeType.UNKNOWN -> NodeTypeUiModel.UNKNOWN
}
}
AppInstallationStatus.NotInstalled -> NodeTypeUiModel.UNKNOWN
Expand Down
Loading