Skip to content

Commit 61c3a22

Browse files
committed
Remove unused declarations from linter warnings
- Remove interruptAndMute() from ChatInterruptController - Remove isBackgrounded property from ChatLifecycleController - Remove isFocusAvailable() from ChatRobotLifecycleHandler - Remove unused fields robotStateValues and availablePlaceholders from EventRule - Keep enum constants and interface methods (may be needed for Pepper/future use)
1 parent c33ce30 commit 61c3a22

4 files changed

Lines changed: 5 additions & 37 deletions

File tree

app/src/main/java/ch/fhnw/pepper_realtime/controller/ChatInterruptController.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,5 @@ class ChatInterruptController @Inject constructor(
8282
Log.e(TAG, "Error during interruptSpeech", e)
8383
}
8484
}
85-
86-
fun interruptAndMute() {
87-
interruptSpeech()
88-
audioInputController.mute()
89-
}
9085
}
9186

app/src/main/java/ch/fhnw/pepper_realtime/controller/ChatLifecycleController.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ class ChatLifecycleController @Inject constructor(
5858
}
5959
}
6060

61-
/**
62-
* Check if app was stopped by going to background
63-
*/
64-
val isBackgrounded: Boolean
65-
get() = wasStoppedByBackground
66-
6761
private fun pauseActiveServices() {
6862
audioInputController.cleanupForRestart()
6963

app/src/main/java/ch/fhnw/pepper_realtime/controller/ChatRobotLifecycleHandler.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,6 @@ class ChatRobotLifecycleHandler(
242242
activity.runOnUiThread { viewModel.setStatusText(error) }
243243
}
244244

245-
fun isFocusAvailable(): Boolean {
246-
return true // Placeholder until RobotFocusManager is exposed via ChatActivity
247-
}
248-
249245
private val timeFormat = SimpleDateFormat("HH:mm:ss", Locale.getDefault())
250246

251247
private fun initializeDashboardListener() {

app/src/main/java/ch/fhnw/pepper_realtime/data/EventRule.kt

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,8 @@ data class RuleCondition(
5050
"trackAge" to FieldInfo("Track Age (ms)", FieldType.NUMBER),
5151
"peopleCount" to FieldInfo("People Count", FieldType.NUMBER),
5252
"robotState" to FieldInfo("Robot State", FieldType.STRING)
53+
// Note: robotState accepts values: IDLE, LISTENING, THINKING, SPEAKING
5354
)
54-
55-
/**
56-
* Possible values for robotState field.
57-
* IDLE, LISTENING, THINKING, SPEAKING
58-
*/
59-
val robotStateValues = listOf("IDLE", "LISTENING", "THINKING", "SPEAKING")
6055
}
6156
}
6257

@@ -109,24 +104,12 @@ data class EventRule(
109104
val cooldownMs: Long = 5000L
110105
) {
111106
companion object {
112-
/**
113-
* Available placeholders for templates.
114-
* Note: Some placeholders (age, gender, emotion, etc.) are no longer available
115-
* as the head-based perception system doesn't provide this data.
116-
*/
117-
val availablePlaceholders = listOf(
118-
"{personName}" to "Name of the recognized person",
119-
"{distance}" to "Distance in meters (e.g., '1.2m')",
120-
"{isLooking}" to "Whether person is looking at robot (true/false)",
121-
"{gazeDuration}" to "How long looking at robot (e.g., '5s')",
122-
"{trackAge}" to "How long person has been tracked (e.g., '30s')",
123-
"{peopleCount}" to "Number of people detected",
124-
"{robotState}" to "Robot state (LISTENING, SPEAKING, THINKING, IDLE)",
125-
"{timestamp}" to "Current time"
126-
)
127-
128107
/**
129108
* Default rules that ship with the app.
109+
*
110+
* Available template placeholders:
111+
* {personName}, {distance}, {isLooking}, {gazeDuration},
112+
* {trackAge}, {peopleCount}, {robotState}, {timestamp}
130113
*/
131114
val defaultRules = listOf(
132115
EventRule(

0 commit comments

Comments
 (0)