Skip to content

[Flutter engine] AndroidContextGL::IsValid() was not correctly overriding AndroidContext::IsValid() #70938

@yrom

Description

@yrom

See https://github.com/flutter/engine/blob/master/shell/platform/android/platform_view_android.cc#L77-L78

  FML_CHECK(android_context_ && android_context_->IsValid())
      << "Could not create an Android context.";

The android_context_->IsValid() always returns true. Inconsistent with expectations if AndroidContextGL can not be created.

android_context.h:
https://github.com/flutter/engine/blob/master/shell/platform/android/context/android_context.h#L29
android_context_gl.h:
https://github.com/flutter/engine/blob/master/shell/platform/android/android_context_gl.h#L106

It also can be found in latest release branch (1.22.x).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions