Make isTooltipEnabled a getter due to its mutable dependencies.

IS_RUNNING_IN_TEST_HARNESS is mutable and can change during the
lifecycle of launcher.

Test: Manual
Fix: 271160958
Change-Id: Ib033e0684d99e784185e1da1e52632411f6c096b
This commit is contained in:
Brian Isganitis
2023-02-28 21:51:52 +00:00
parent 3addf0b66d
commit aa08af872b

View File

@@ -56,7 +56,8 @@ annotation class TaskbarEduTooltipStep
class TaskbarEduTooltipController(val activityContext: TaskbarActivityContext) :
LoggableTaskbarController {
private val isTooltipEnabled = !IS_RUNNING_IN_TEST_HARNESS && ENABLE_TASKBAR_EDU_TOOLTIP.get()
private val isTooltipEnabled: Boolean
get() = !IS_RUNNING_IN_TEST_HARNESS && ENABLE_TASKBAR_EDU_TOOLTIP.get()
private val isOpen: Boolean
get() = tooltip?.isOpen ?: false