Skip to content

Conversation

@xRahul
Copy link
Owner

@xRahul xRahul commented Jan 27, 2026

Improved the Custom Tabs launch priority strategy in ListRecyclerViewAdapter by replacing the naive implementation that called mayLaunchUrl on every item bind with a smarter "warmup on touch" approach using OnTouchListener. This reduces unnecessary IPC calls and resource usage while maintaining the perceived performance benefit of pre-fetching. Added necessary null checks and cleanup in ItemViewHolder.clear().


PR created automatically by Jules for task 2744995948797595825 started by @xRahul

- Remove naive `mayLaunchUrl` call from `onBindViewHolder` which was executing on every bind.
- Implement "warmup on touch" strategy by attaching an `OnTouchListener` to the item view.
- Trigger `mayLaunchUrl` on `MotionEvent.ACTION_DOWN` to speculatively load the URL when the user touches the item, providing a performance benefit without the overhead of aggressive pre-loading.
- Ensure `mCustomTabsDelegate` and `item.getUrl()` are not null before calling `mayLaunchUrl`.
- Clear the `OnTouchListener` in `ItemViewHolder.clear()` to prevent leaks and incorrect behavior on recycling.

Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@xRahul
Copy link
Owner Author

xRahul commented Jan 31, 2026

fix codeql

Code Scanning could not process the submitted SARIF file:

@google-labs-jules
Copy link

fix codeql

Code Scanning could not process the submitted SARIF file:

I've detected a mismatch between the AGENTS.md specified AGP version (8.9.1) and the one in build.gradle (9.0.0). CodeQL likely has issues with the newer AGP version. I have downgraded AGP to 8.9.1 to align with the project specifications and resolve the analysis failure.

google-labs-jules bot and others added 4 commits January 31, 2026 03:10
Downgrade the Android Gradle Plugin (AGP) version from 9.0.0 to 8.9.1 in `build.gradle` to align with the requirements specified in `AGENTS.md`. This resolves the CodeQL analysis failure where the submitted SARIF file could not be processed, likely due to incompatibility with AGP 9.0.0.

Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com>
- Upgrade Kotlin to 2.2.20 and KSP to 2.2.20-2.0.4 in root build.gradle to resolve artifact not found errors.
- Downgrade AGP to 8.9.1 in root build.gradle to fix CodeQL issues (previously applied).
- Update AGENTS.md with new versions.
- Fix app/build.gradle:
  - Apply `kotlin-android` plugin.
  - Move `kotlin { jvmToolchain { ... } }` to top level.
  - This fixes `Could not find method kotlin() on extension 'android'` error.

Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com>
- Upgraded Kotlin to 2.2.20 and KSP to 2.2.20-2.0.4.
- Downgraded AGP to 8.9.1 (previously applied).
- Fixed app/build.gradle DSL by applying kotlin-android plugin and moving kotlin block.
- Verified local build and tests pass.
- Note: CodeQL failure requires manual repository settings change (Default Setup must be disabled).

Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com>
- Upgraded Kotlin to 2.2.20 and KSP to 2.2.20-2.0.4.
- Downgraded AGP to 8.9.1 (previously applied).
- Fixed app/build.gradle DSL by applying kotlin-android plugin and moving kotlin block.
- Verified local build and tests pass.
- Note: CodeQL failure requires manual repository settings change (Default Setup must be disabled).

Co-authored-by: xRahul <1639945+xRahul@users.noreply.github.com>
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.

2 participants