Skip to content

Migrate android_semantics_testing and android_views to the v2 embedding #43220

Open

Activity

  1. blasten commented on Oct 21, 2019

    @blasten
    Author

    @matthew-carroll Let me know what you have in mind, so I can update these tests accordingly.

  2. matthew-carroll commented on Oct 23, 2019

    @matthew-carroll
    Contributor

    For the platform views touch verification, let's try using the root View of the Activity instead of FlutterView. To do this, obtain the root View as follows:

    View rootView = findViewById(0x01020002);
    

    Then replace the existing FlutterView references with this rootView.

  3. matthew-carroll commented on Oct 23, 2019

    @matthew-carroll
    Contributor

    For the accessibility test, I think we can use the following code to find the FlutterView, allowing us to avoid exposing it publicly.

      AccessibilityNodeProvider getFlutterAccessibilityNodeProvider() {
        FlutterView flutterView = findFlutterView();
        return flutterView.getAccessibilityNodeProvider();
      }
    
      FlutterView findFlutterView() {
        View rootView = findViewById(android.R.id.content);
        List<View> viewsToSearch = new ArrayList<>();
        viewsToSearch.add(rootView);
        FlutterView flutterView = null;
        while (flutterView == null && viewsToSearch.size() > 0) {
          View nextView = viewsToSearch.remove(0);
          if (nextView instanceof FlutterView) {
            flutterView = (FlutterView) nextView;
          } else {
            if (nextView instanceof ViewGroup) {
              ViewGroup parentView = (ViewGroup) nextView;
              for (int i = 0; i < parentView.getChildCount(); ++i) {
                viewsToSearch.add(parentView.getChildAt(i));
              }
            }
          }
        }
        return flutterView;
      }
    

    The reason that I think this is appropriate is because I think this test is the result of a lack of infrastructure. We should be able to run accessibility tests from an e2e standpoint, but it seems that our infra doesn't facilitate that. So this test is inherently about implementation details. Therefore, I think it should be OK to act with the knowledge that within FlutterActivity there is a FlutterView.

  4. xster commented on Nov 5, 2019

    @xster
    Member

    Anything we need to do here? Is this not the same issue as exposing the view to the platform view factory?

  5. matthew-carroll commented on Nov 5, 2019

    @matthew-carroll
    Contributor

    @xster there were 2 specific uses that @blasten found in the device lab tests. I posted workarounds above. I don't think we need to make any changes to the embedding API for this, but I left the ticket open to be closed by @blasten whenever he is able to try these workarounds in the tests.

  6. added
    a: existing-appsIntegration with existing apps via the add-to-app flow
    engineflutter/engine related. See also e: labels.
    platform-androidAndroid applications specifically
    and removed on Jan 8, 2020
  7. added this to the March 2020 milestone on Jan 13, 2020
  8. matthew-carroll commented on Jan 13, 2020

    @matthew-carroll
    Contributor

    @blasten when you get a chance, can you take a look at this ticket and see if we can close it as per the last comment above?

  9. 18 remaining items

  10. pedromassangocode commented on Nov 27, 2020

    @pedromassangocode

    Without additional information, we are unfortunately not sure how to resolve this issue.
    We are therefore reluctantly going to close this bug for now.
    Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
    Thanks for your contribution.

    Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
    All system setups can be slightly different, so it's always better to open new issues and reference related issues.

  11. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Nov 27, 2020
  12. xster commented on Nov 30, 2020

    @xster
    Member

    Looks like integration_tests/android_views was migrated to v2 embedding but integration_tests/android_semantics_testing hasn't yet.

  13. reopened this on Nov 30, 2020
  14. removed their assignment
    on Jun 8, 2021
  15. added
    P2Important issues not at the top of the work list
    and removed
    P1High-priority issues at the top of the work list
    on Sep 28, 2023
  16. gmackall commented on Sep 28, 2023

    @gmackall
    Member

    Dropping the priority to reflect the fact that this has gone untouched for ~3 years

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions