Skip to content

Improve and fix the shutup service#473

Open
Mudit200408 wants to merge 2 commits into
sameerasw:developfrom
Mudit200408:shutup
Open

Improve and fix the shutup service#473
Mudit200408 wants to merge 2 commits into
sameerasw:developfrom
Mudit200408:shutup

Conversation

@Mudit200408
Copy link
Copy Markdown

The shutup service was previously not working for me, as Indian apps like BHIM, Yono SBI, Rail one, etc.. apps are pain, but the thing was Geto used to perfectly work but I wanted just one app that can do everything. So this PR fixes all the issues. It works like a charm even if you are not launching the app from shortcut and you have the "Shutup Services" Enabled. However some apps are better with the Shortcut app launch.
This implementation was tested by some other users too and it was working perfectly for them too.
Some of the implementation is inspired from GETO...

Changes (AI Generated):
Hybrid Polling & Sync: Transitioned from purely depending on accessibility package events to a dedicated background monitoring thread in ShutUpForegroundService that queries UsageStatsManager events every 400ms for robust foreground app detection.

Continuous Foreground Re-enforcement: Instead of applying settings just once upon app launch, the foreground service now re-applies/re-enforces the Shut-Up settings every 2 seconds while the target app remains in focus. This prevents target apps from dynamically detecting developer settings if they check again after startup.

3-Second Debounced Revert: When leaving a targeted app, the service runs a background debounced check for 3 seconds (pendingRestoreJob). It continuously verifies if the app is truly closed/stopped in the background before restoring original system settings.

Multi-App Collision Prevention: When multiple Shut-Up apps are running consecutively, the service intelligently skips restoring developer options/USB debugging if a new targeted app has already taken the foreground, keeping the system continuously secured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants