Skip to content

🧹 Refactor Og.java to use ApiBlocking for cleaner ad interception#7

Merged
Illhm merged 1 commit into
masterfrom
refactor-og-apiblocking-16755580750385676907
Jun 7, 2026
Merged

🧹 Refactor Og.java to use ApiBlocking for cleaner ad interception#7
Illhm merged 1 commit into
masterfrom
refactor-og-apiblocking-16755580750385676907

Conversation

@Illhm

@Illhm Illhm commented Jun 7, 2026

Copy link
Copy Markdown
Owner

🎯 What: The Og.java blocker class had a code health issue where it was manually hooking methods with Xposed to block ads instead of using the standardized ApiBlocking utility class. The file contained a FIXME comment explicitly asking to "Use APIBlocking Please".
💡 Why: By standardizing the hooking logic through ApiBlocking.removeBanner, the codebase becomes more maintainable, readable, and less prone to edge cases, as the standard methods already include standardized logging and exception handling. It also reduces code duplication.
Verification: Verified the code compiles perfectly with Java 8 and the test suite passes successfully. Code review confirmed this refactoring is safe and complete.
Result: Cleaned up code that correctly relies on standard module functions and removed unnecessary imports.


PR created automatically by Jules for task 16755580750385676907 started by @Illhm

Replaced the manual Xposed hooks in `Og.java` with a standard call to `ApiBlocking.removeBanner()`.
This follows the intention of the `FIXME` note and improves maintainability by centralizing Xposed hook logic to standard utility functions.
Cleaned up unused imports.
@google-labs-jules

Copy link
Copy Markdown

👋 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.

@Illhm Illhm marked this pull request as ready for review June 7, 2026 15:47
@Illhm Illhm merged commit b292f90 into master Jun 7, 2026
1 check passed
@Illhm Illhm deleted the refactor-og-apiblocking-16755580750385676907 branch June 7, 2026 15:47
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.

1 participant