Skip to content
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

AudricV
Copy link
Member

@AudricV AudricV commented Apr 22, 2022

What is it?

  • Bugfix (user facing)

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:

    before_opacity_change
  • After:

    after_opacity_change

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

@AudricV AudricV added bug Issue is related to a bug player Issues related to any player (main, popup and background) device/software specific Issues that only happen on some devices or with some specific hardware/software labels Apr 22, 2022
@AudricV AudricV linked an issue Apr 22, 2022 that may be closed by this pull request
4 tasks
@sonarcloud
Copy link

sonarcloud bot commented Apr 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Stypox Stypox changed the title Set opacity of the popup close button to the maximum one which allows touches on Android 12 and higher Adapt opacity of popup close button to allow touches on Android >=12 Apr 22, 2022
Copy link
Member

@Stypox Stypox left a 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!

@Stypox Stypox mentioned this pull request Apr 22, 2022
12 tasks
Copy link
Member

@litetex litetex left a 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!

@litetex
Copy link
Member

litetex commented Apr 22, 2022

@TiA4f8R
I have one question though: Why is the full opacity player not a problem?

@AudricV
Copy link
Member Author

AudricV commented Apr 22, 2022

@litetex

I don't really know what to say:

  • this should not really work according to the rule Multiple SAW windows with enough transparency described in the FLAG_NOT_TOUCHABLE flag, unless this rule only applies for windows with this flag, which seems to be the case (in this case, the documentation is not clear at all...);
  • if we are in the case above, the first part of the rule One SAW window with enough transparency is now respected and the second part seems to be respected since the beginning (maybe not when the popup player itself and the close button are overlapping): the rule One SAW window with enough transparency is now fully respected and the touch events are delivered.

@AudricV AudricV changed the title Adapt opacity of popup close button to allow touches on Android >=12 Adapt opacity of popup close button to allow touches in other apps on Android >=12 Apr 23, 2022
@opusforlife2 opusforlife2 merged commit 9b3e43f into TeamNewPipe:release/0.23.0 Apr 23, 2022
@AudricV AudricV deleted the set-maximum-allowed-opacity-for-close-overlay-android-12-and-higher branch April 23, 2022 17:40
@rawlife56
Copy link

rawlife56 commented Apr 24, 2022

@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'

Screenshot (error message at the bottom)

@Bruceforce
Copy link

@rawlife56 this was/is also the case for Android 11 (at least for me) so this would be a separate issue in my opinion.

@rawlife56
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't interact with app/screen below popup player on Android 12
6 participants