New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt opacity of popup close button to allow touches in other apps on Android >=12 #8279
Conversation
Setting this opacity should allow touches outside NewPipe when using the popup player. See https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_NOT_TOUCHABLE for more details.
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A pretty small fix for a pretty big problem.
This is too good to be true, but it looks like it is.
LGTM
Good work!
@TiA4f8R |
I don't really know what to say:
|
@TiA4f8R The touch inputs are not still working in some protected screens like Google Play Store, app updates, Google app security settings screen. Is this expected behavior? Even if the player is in the background, the touch inputs are blocked and showing this error message 'Looks like another app is blocking access to Google Play. Turn off any apps that might be drawing' |
@rawlife56 this was/is also the case for Android 11 (at least for me) so this would be a separate issue in my opinion. |
Good to know. Couldn't test as there wasn't any A11 device around. Hopefully work on native PIP mode support wouldn't be less prioritized. |
What is it?
Description of the changes in your PR
This PR sets the opacity, on Android 12 and higher, of the popup close button to the maximum one which allows touches on other apps for these Android versions.
See the documentation of the
FLAG_NOT_TOUCHABLE
flag, used in the popup close button, for more details.These changes have been tested on an Android 12 emulator and by several users (from the corresponding issue and from Reddit) and the changes restore the ability to interact with other apps on Android 12 (and probably higher, I didn't test the changes on Android 13 Developer Previews at all).
Before/After Screenshots/Screen Record
Remember that these changes only apply on Android 12 and higher.
Before:
After:
Fixes the following issue(s)
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
Due diligence