Skip to content

Commit 96e63cf

Browse files
committed
android: fix head gestures not working
1 parent 5472e09 commit 96e63cf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

android/app/src/main/java/me/kavishdevar/librepods/utils/GestureDetector.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ fun startDetection(doNotStop: Boolean = false, onGestureDetected: (Boolean) -> U
8787
isRunning = true
8888
gestureDetectedCallback = onGestureDetected
8989

90+
Log.d(TAG, "started: ${airPodsService.startHeadTracking()}")
91+
9092
clearData()
9193

9294
prevHorizontal = 0.0
9395
prevVertical = 0.0
9496

95-
airPodsService.aacpManager.sendStartHeadTracking()
96-
9797
detectionJob = CoroutineScope(Dispatchers.Default).launch {
9898
while (isRunning) {
9999
delay(50)
@@ -117,7 +117,7 @@ fun startDetection(doNotStop: Boolean = false, onGestureDetected: (Boolean) -> U
117117
Log.d(TAG, "Stopping gesture detection")
118118
isRunning = false
119119

120-
if (!doNotStop) airPodsService.aacpManager.sendStopHeadTracking()
120+
if (!doNotStop) airPodsService.stopHeadTracking()
121121

122122
detectionJob?.cancel()
123123
detectionJob = null

0 commit comments

Comments
 (0)