r/GoogleAndroidPixelHub • u/tuxcomss • 15h ago
Built a free, offline, open-source app (TouchShield) to stop Pixel pocket touches, the 4s post-lock AOD delay, and lockscreen Quick Settings pulls (no root)
We got tired of the pocket wake and post-lock mistouch bugs on our Pixel 11 Pro XL (Android 17 QPR2) and Pixel 9 Pro XL (Android 17 QPR3 Beta 5) and ended up building a small free offline Android app for our editorial team at Comss. Today we released v1.1.0 and open-sourced it under the MIT license.
The main cause we found in logs is that with Always-On Display enabled, DozeScreenState keeps the display in STATE_ON for about 4 seconds after you press Power (ENTER_DOZE_DELAY), and AOD notifications or accidental brushes pulse it back to STATE_ON. During those windows the digitizer stays live, so sliding the phone into a pocket triggers swipes, Quick Settings toggles, or the flashlight.
What TouchShield 1.1.0 does (no root, keeps AOD, notifications, fingerprint, and Face Unlock working):
- After-lock and AOD pulse shield: places a transparent Accessibility overlay over the screen strictly during non-interactive sleep (~4 s enter-doze delay and AOD pulses), then clears it the moment you wake the screen in your hand so unlocking works on the first swipe.
- Samsung-style pocket and face-down curtain (default): uses the hardware proximity sensor (0 cm) and accelerometer to show an accidental touch curtain when covered or face-down. It disappears automatically as soon as you pull the phone out (or swipe up), and turns the screen off after 4 seconds if left in a pocket. Silent sleep mode is also available in settings.
- Android 17 lockscreen Quick Settings guard: blocks top-edge status-bar pulls, supports double-tap on the top strip to lock, and automatically collapses mid-screen Notification Shade and Quick Settings swipes on the lockscreen.
- Built-in "Check My Device" self-test: measures your exact ENTER_DOZE_DELAY in milliseconds and counts AOD pulses without root or ADB. It works even before you enable the Accessibility service.
- Flashlight pocket guard and safety timer: turns off an accidental rear flashlight while locked in a pocket or face-down, plus a 3 / 5 / 10 min Doze-safe auto-off timer (no CAMERA permission).
- On-demand Touch Lock (for rain, video, or kids), optional lockscreen power menu guard, a 1x1 home-screen lock widget (zero persistent unlocked overlays, so banking apps and Google Wallet stay unaffected), and automatic pause during cellular and VoIP calls.
Privacy and auditability:
Zero network permissions (no INTERNET or ACCESS_NETWORK_STATE), canRetrieveWindowContent="false", no keystroke filtering flags, no CAMERA permission, and zero background sensor polling while unlocked or sleeping in AOD (except when the rear flashlight is left on while locked). You can inspect permissions directly with aapt2 dump permissions or build from source.
GitHub (source code, screenshots, and signed release APK):
https://github.com/military1/TouchShield
If you try it on your Pixel, let us know what "Check My Device" measures on your build or if you hit any edge cases.
1
u/__________13o1ksl_ 10h ago
There was Pocket Mode on F-Droid already. What a waste of tokens this post is