Skip to content

Fix release APK build break in SwipeHelper - #98

Merged
dbochicchio merged 2 commits into
mainfrom
copilot/fix-build-release-apk-job
Aug 18, 2026
Merged

Fix release APK build break in SwipeHelper#98
dbochicchio merged 2 commits into
mainfrom
copilot/fix-build-release-apk-job

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The build-release-apk workflow was failing in :app:compileReleaseJavaWithJavac due to unresolved symbols introduced in the multi-touch swipe path. This change restores the missing two-finger gesture state used by the pinch/spread guard so release builds can compile again.

  • Build failure root cause

    • Restore the missing p0 pointer reference in the two-finger swipe evaluation branch.
    • Replace the undefined pinch threshold identifier with a local constant used by the existing pinch/spread rejection logic.
  • Swipe gesture path

    • Keep the two-finger pinch/spread filter behavior intact.
    • Limit the change to symbol restoration only; no gesture semantics or event mapping were otherwise altered.
private static final float PINCH_SPREAD_RATIO_THRESHOLD = 0.35F;

if (count == 2) {
    PointerInfo p0 = pointers.valueAt(0);
    PointerInfo p1 = pointers.valueAt(1);
    float startSpread = (float) Math.hypot(p0.startX - p1.startX, p0.startY - p1.startY);
    float endSpread   = (float) Math.hypot(p0.endX   - p1.endX,   p0.endY   - p1.endY);
    if (Math.abs(endSpread - startSpread) > PINCH_SPREAD_RATIO_THRESHOLD * meanDist) return;
}

Co-authored-by: dbochicchio <31511185+dbochicchio@users.noreply.github.com>
@dbochicchio
dbochicchio marked this pull request as ready for review August 18, 2026 08:30
Copilot AI lite review requested due to automatic review settings August 18, 2026 08:30
@dbochicchio
dbochicchio merged commit 5b5570b into main Aug 18, 2026
1 check passed
@dbochicchio
dbochicchio deleted the copilot/fix-build-release-apk-job branch August 18, 2026 08:30
Copilot AI restored the copilot/fix-build-release-apk-job branch August 18, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to unblock the build-release-apk GitHub Actions job by fixing a compile-time issue in the swipe gesture evaluation logic used by the app’s touch handling (the SwipeHelper that drives swipe-triggered relay/MQTT behavior).

Changes:

  • Introduces a PINCH_SPREAD_RATIO_THRESHOLD constant to replace the previously missing/undefined pinch-spread threshold reference.
  • Fixes the two-pointer pinch/spread rejection block by explicitly defining p0 before computing pointer spread deltas.
  • Updates the related inline comment to reference the new constant name.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-release-apk Fix release APK build break in SwipeHelper Aug 18, 2026
Copilot AI requested a review from dbochicchio August 18, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants