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

Display Features support (Foldable and Cutout) #24756

Merged
merged 31 commits into from
Sep 3, 2021

Conversation

andreidiaconu
Copy link
Contributor

@andreidiaconu andreidiaconu commented Mar 3, 2021

Adds support for foldable devices and display cutouts, in the form of Display Features.

A display feature is an area of the display that is obstructed by a hardware feature. For now, this works only on Android. There are three types of display features:

  • Hinge - a physical separator between the two displays of the device.
    display-feature-hinge
  • Fold - You can view the fold like a hinge that has zero width. It tells us where the flexible display has a crease.
    display-feature-fold
  • Cutout - A cutout sits at the edge of the display and usually houses camera systems.
    display-feature-cutout

Here is a preview of what this PR enables, on a dual-screen emulator:

hinge-aware-dialog-right

Issues that will be closed by this PR:

Work in progress:

  • Tests are still in progress
  • cipd setup and DEPS update for AndroidX WindowManager library, which this PR is based on.

@xster
Copy link
Member

xster commented Mar 5, 2021

@GaryQian can you give it a look?

@chinmaygarde chinmaygarde self-requested a review March 11, 2021 22:50
@blasten
Copy link

blasten commented Aug 31, 2021

@chinmaygarde could you take another look when you get a chance?

@chinmaygarde
Copy link
Member

I think this looks fine after Gary's review. There is a conflict but we should land this once this is resolved.

# Conflicts:
#	shell/platform/android/test/io/flutter/embedding/engine/renderer/FlutterRendererTest.java
@andreidiaconu
Copy link
Contributor Author

I think this looks fine after Gary's review. There is a conflict but we should land this once this is resolved.

Resolved the conflict.

@chinmaygarde chinmaygarde added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Sep 2, 2021
@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Sep 2, 2021
@andreidiaconu
Copy link
Contributor Author

build_and_test_linux_unopt_debug failed and I'm not sure why or what I can do about it. How does one deflake?

@andreidiaconu
Copy link
Contributor Author

Triggered another ci run

@andreidiaconu
Copy link
Contributor Author

@chinmaygarde The tree is green and this can land now, the tag you added was removed automatically due to a flaky build.

@GaryQian GaryQian added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Sep 3, 2021
@GaryQian GaryQian merged commit 67d114f into flutter:master Sep 3, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 3, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 3, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 3, 2021
zanderso added a commit that referenced this pull request Sep 3, 2021
zanderso added a commit that referenced this pull request Sep 3, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 3, 2021
@GaryQian
Copy link
Contributor

GaryQian commented Sep 3, 2021

FYI @andreidiaconu Looks like this was reverted due to failures rolling this into flutter framework: flutter/flutter#89430 (comment)

Revert is: #28447

@andreidiaconu
Copy link
Contributor Author

andreidiaconu commented Sep 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes platform-android waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants