Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
323490e
Add DisplayFeatures and DisplayCutout to viewport metrics
andreidiaconu Jan 18, 2021
99f7bcd
WindowManager alpha03 and better documentation
andreidiaconu Mar 3, 2021
45dacf2
Merge commit '91d92787c153ec390a8725f364c544e2c3fe39a8' into foldable…
andreidiaconu Mar 3, 2021
7ee3477
Fixed formatting
andreidiaconu Mar 16, 2021
437c066
Merge commit '074463bb6afb6260e01f2b1e37ebf39ba1c9530f' into foldable…
andreidiaconu Mar 16, 2021
62a1e2b
Fixed failing tests
andreidiaconu Mar 16, 2021
357f316
Replaced API version code P with 28
andreidiaconu Mar 16, 2021
f91efa1
Unnecessary import
andreidiaconu Mar 16, 2021
e5b6188
Fixed display features parameters missing
andreidiaconu Mar 16, 2021
be2e291
Documentation changes
andreidiaconu Mar 29, 2021
84645dc
First paragraph is a sentence
andreidiaconu Mar 29, 2021
8872e39
Update androidx window library to version 1.0.0-alpha05
andreidiaconu Mar 29, 2021
284a029
Improve documentation, remove deprecated display feature call
andreidiaconu Apr 5, 2021
17fd7a6
Write tests and improve documentation
andreidiaconu Apr 7, 2021
a73cfe5
Migrate to Window Manager alpha08
andreidiaconu Jun 23, 2021
0e659cf
Merge branch 'master' of github.com:flutter/engine into foldable_support
andreidiaconu Jun 23, 2021
de52872
Update androidx window to beta01
andreidiaconu Aug 20, 2021
3dc358c
Remove unused import
andreidiaconu Aug 20, 2021
3b58160
Merge branch 'master' of github.com:flutter/engine into foldable_support
andreidiaconu Aug 20, 2021
5452a01
Remove window_hook_integration_test.dart
andreidiaconu Aug 20, 2021
0e6fe2a
Fix tests
andreidiaconu Aug 20, 2021
3174f12
Merge branch 'master' of github.com:flutter/engine into foldable_support
andreidiaconu Aug 26, 2021
888ee95
Update android_embedding_dependencies version to include androidx.window
andreidiaconu Aug 26, 2021
d22920e
Add androidx.window to test_runner build
andreidiaconu Aug 26, 2021
3fd0699
Add empty display features arrays to fuchsia platform view
andreidiaconu Aug 27, 2021
58d3eb2
Fix tests using final class mocking
andreidiaconu Aug 28, 2021
e12f54a
Add missing license header
andreidiaconu Aug 28, 2021
afce662
Update licenses_golden
andreidiaconu Aug 28, 2021
89fe749
Merge branch 'master' of github.com:flutter/engine into foldable_support
andreidiaconu Aug 31, 2021
07e2ccd
Merge branch 'master' of github.com:flutter/engine into foldable_support
andreidiaconu Sep 2, 2021
20c8452
Merge branch 'master' of github.com:flutter/engine into foldable_support
andreidiaconu Sep 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ deps = {
'packages': [
{
'package': 'flutter/android/embedding_bundle',
'version': 'last_updated:2021-08-10T22:12:57-0700'
'version': 'last_updated:2021-08-26T13:35:58-0700'
}
],
'condition': 'download_android_deps',
Expand Down
1 change: 1 addition & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,7 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/android/Rende
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/android/SplashScreen.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/android/TransparencyMode.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/android/WindowInfoRepositoryCallbackAdapterWrapper.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEngineConnectionRegistry.java
Expand Down
35 changes: 28 additions & 7 deletions lib/ui/fixtures/ui_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ void hooksTests() {
window.onMetricsChanged!();
_callHook(
'_updateWindowMetrics',
17,
20,
0, // window Id
0.1234, // device pixel ratio
0.0, // width
Expand All @@ -355,8 +355,11 @@ void hooksTests() {
0.0, // system gesture inset top
0.0, // system gesture inset right
0.0, // system gesture inset bottom
0.0, // system gesture inset left,
0.0, // system gesture inset left
22.0, // physicalTouchSlop
<double>[], // display features bounds
<int>[], // display features types
<int>[], // display features states
);

expectIdentical(originalZone, callbackZone);
Expand Down Expand Up @@ -403,7 +406,7 @@ void hooksTests() {
test('Window padding/insets/viewPadding/systemGestureInsets', () {
_callHook(
'_updateWindowMetrics',
17,
20,
0, // window Id
1.0, // devicePixelRatio
800.0, // width
Expand All @@ -421,6 +424,9 @@ void hooksTests() {
0.0, // systemGestureInsetBottom
0.0, // systemGestureInsetLeft
22.0, // physicalTouchSlop
<double>[], // display features bounds
<int>[], // display features types
<int>[], // display features states
);

expectEquals(window.viewInsets.bottom, 0.0);
Expand All @@ -430,7 +436,7 @@ void hooksTests() {

_callHook(
'_updateWindowMetrics',
17,
20,
0, // window Id
1.0, // devicePixelRatio
800.0, // width
Expand All @@ -448,6 +454,9 @@ void hooksTests() {
44.0, // systemGestureInsetBottom
0.0, // systemGestureInsetLeft
22.0, // physicalTouchSlop
<double>[], // display features bounds
<int>[], // display features types
<int>[], // display features states
);

expectEquals(window.viewInsets.bottom, 400.0);
Expand All @@ -459,7 +468,7 @@ void hooksTests() {
test('Window physical touch slop', () {
_callHook(
'_updateWindowMetrics',
17,
20,
0, // window Id
1.0, // devicePixelRatio
800.0, // width
Expand All @@ -477,14 +486,17 @@ void hooksTests() {
0.0, // systemGestureInsetBottom
0.0, // systemGestureInsetLeft
11.0, // physicalTouchSlop
<double>[], // display features bounds
<int>[], // display features types
<int>[], // display features states
);

expectEquals(window.viewConfiguration.gestureSettings,
GestureSettings(physicalTouchSlop: 11.0));

_callHook(
'_updateWindowMetrics',
17,
20,
0, // window Id
1.0, // devicePixelRatio
800.0, // width
Expand All @@ -502,14 +514,17 @@ void hooksTests() {
44.0, // systemGestureInsetBottom
0.0, // systemGestureInsetLeft
-1.0, // physicalTouchSlop
<double>[], // display features bounds
<int>[], // display features types
<int>[], // display features states
);

expectEquals(window.viewConfiguration.gestureSettings,
GestureSettings(physicalTouchSlop: null));

_callHook(
'_updateWindowMetrics',
17,
20,
0, // window Id
1.0, // devicePixelRatio
800.0, // width
Expand All @@ -527,6 +542,9 @@ void hooksTests() {
44.0, // systemGestureInsetBottom
0.0, // systemGestureInsetLeft
22.0, // physicalTouchSlop
<double>[], // display features bounds
<int>[], // display features types
<int>[], // display features states
);

expectEquals(window.viewConfiguration.gestureSettings,
Expand Down Expand Up @@ -752,4 +770,7 @@ void _callHook(
Object? arg15,
Object? arg16,
Object? arg17,
Object? arg18,
Object? arg19,
Object? arg20,
]) native 'CallHook';
6 changes: 6 additions & 0 deletions lib/ui/hooks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ void _updateWindowMetrics(
double systemGestureInsetBottom,
double systemGestureInsetLeft,
double physicalTouchSlop,
List<double> displayFeaturesBounds,
List<int> displayFeaturesType,
List<int> displayFeaturesState,
) {
PlatformDispatcher.instance._updateWindowMetrics(
id,
Expand All @@ -47,6 +50,9 @@ void _updateWindowMetrics(
systemGestureInsetBottom,
systemGestureInsetLeft,
physicalTouchSlop,
displayFeaturesBounds,
displayFeaturesType,
displayFeaturesState,
);
}

Expand Down
Loading