Merge "Not calling updateCallback in constructor as it can cause initialization error" into main

This commit is contained in:
Treehugger Robot authored and Android (Google) Code Review committed 2025-01-30 20:36:38 -08:00
commit dfa11eb35e
2 files changed
+137 -1

No files matched your search

@@ -30,7 +30,7 @@ class ActiveTrackpadList(ctx: Context, private val updateCallback: Runnable) :
init {
inputManager.registerInputDeviceListener(this, Executors.UI_HELPER_EXECUTOR.handler)
inputManager.inputDeviceIds.forEach { deviceId -> onInputDeviceAdded(deviceId) }
inputManager.inputDeviceIds.filter(this::isTrackpadDevice).forEach(this::add)
}
override fun onInputDeviceAdded(deviceId: Int) {