Skip to content

[Android] removes edge insets from a11y bound calculation #167136

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

Merged
merged 1 commit into from
Apr 21, 2025

Conversation

chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Apr 14, 2025

fixes android part of #102725

After throughly tested various configurations from

arm64 API level 25 to API level 35

no cutout/Tall cutout/waterfall cutout

LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS, LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT, LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER

Talkback 7 to talkback 15

none of the combinations would require additional left insets calculation.

I am not sure why we need it in the first place, but it seems the best course of action will be removing the code.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added platform-android Android applications specifically engine flutter/engine repository. See also e: labels. labels Apr 14, 2025
@@ -1647,31 +1646,6 @@ void updateSemantics(
if (rootObject != null) {
final float[] identity = new float[16];
Matrix.setIdentityM(identity, 0);
// In Android devices API 23 and above, the system nav bar can be placed on the left side
Copy link
Contributor Author

@chunhtai chunhtai Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested multiple version back to api 29 (I don't have devices earlier than this and simulator only goes back to 29 with a functional play store). it looks like this fix is no longer needed. I suspect the fix here was to workaround a bug in talkback which may be fixed in the later version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove all this code when clearly at the time it was written we thought it was required.

This code looks like it was landed in flutter/engine#27083 which was in june 2021. That would land between android 30 and android 31.
According to this chart https://en.wikipedia.org/wiki/Android_version_history They all have the same google play services version.

Are you thinking that this code is working around a bug in google play services? If not and you think this is android api bifurcated then I would rather keep the code and gate it to 29 and above.

If you do think it is google play services can you try to run an older version and see if the behavior changes? I dont need us to bisect google play but want to have some more confidence.

https://android.stackexchange.com/questions/83948/how-to-downgrade-google-play-services#:~:text=Go%20to%20settings%3Eapps%3Eall,button%20'Take%20to%20use'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not the play store service version. I think it is the talkback version. the reason i need a play store is so that i can download talkback which isn't included in emulator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the latest talkback can be install on API level 23, and there isn't a way to detect talkback version afaik
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source code I think is here:
https://github.com/google/talkback

Here is a mirror for the google version>
https://apkpure.com/android-accessibility-suite/com.google.android.marvin.talkback/versions

Here is a mirror for the version shipped by samsung.
https://talkback.en.uptodown.com/android/versions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I agree we cant branch of the version of another app. Or at least I cant figure out a way.

@chunhtai chunhtai requested a review from reidbaker April 14, 2025 20:44
@chunhtai chunhtai requested a review from gmackall April 15, 2025 22:21
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cant branch on accessibility service version. My only request is that we download an old copy to see if the older versions required this code.

If it does require this code and the new version does not then lets merge this code deletion.

If the older version still does not need this code then I think we are back at guessing. Maybe we need to check older android versions.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2025
Copy link
Contributor

auto-submit bot commented Apr 17, 2025

autosubmit label was removed for flutter/flutter/167136, because - The status or check suite Windows framework_tests_misc has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2025
Copy link
Contributor

auto-submit bot commented Apr 21, 2025

autosubmit label was removed for flutter/flutter/167136, because - The status or check suite Mac tool_integration_tests_4_5 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Apr 21, 2025
Merged via the queue into flutter:master with commit b9abb56 Apr 21, 2025
176 of 177 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine flutter/engine repository. See also e: labels. platform-android Android applications specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy