My app is affected due to untrusted touch events introduced by android in Android 12. If i understand it correctly problem is majorly due to using of the flag FLAG_NOT_TOUCHABLE, so I removed all the occurrences
08-20 16:10:45.752 1716 2206 D InputDispatcher: Stack of obscuring windows during untrusted touch (705, 1575):
08-20 16:10:45.752 1716 2206 D InputDispatcher: * type=2038, package=xxxxxxx, id=204, mode=USE_OPACITY, alpha=1.00, frame=[0,145][1080,2296], touchableRegion=[0,145][1080,2296], window={36c5ada , flags={NOT_FOCUSABLE | NOT_TOUCHABLE | NOT_TOUCH_MODAL | LAYOUT_IN_SCREEN | FORCE_NOT_FULLSCREEN | HARDWARE_ACCELERATED}, inputFeatures={0x0}, hasToken=true, applicationInfo.name=, applicationInfo.token=<null>
Still the NOT_TOUCHABLE flag is not going! There is only one write up available as of now on the subject and my case falls in 'Unnecessarily large windows' in this blog. i.e. my window is already wrap_content and i have removed any occurrence of FLAG_NOT_TOUCHABLE. Still my touches are being blocked. How i know my touches work fine otherwise? As recommended by the developer.android site when i run following command adb shell settings put global block_untrusted_touches 2, everything seems to be working just fine. Any help would be highly appreciated!