Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Farzin Kazemzadeh
platform_frameworks_base-old
Commits
1155ef17
Commit
1155ef17
authored
1 year ago
by
Tiger Huang
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix ActionBarOverlayLayoutTest" into main
parents
87550ffe
c555c241
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/tests/coretests/src/com/android/internal/widget/ActionBarOverlayLayoutTest.java
+12
-3
12 additions, 3 deletions
...m/android/internal/widget/ActionBarOverlayLayoutTest.java
with
12 additions
and
3 deletions
core/tests/coretests/src/com/android/internal/widget/ActionBarOverlayLayoutTest.java
+
12
−
3
View file @
1155ef17
...
...
@@ -29,6 +29,7 @@ import static org.junit.Assert.assertThat;
import
android.content.Context
;
import
android.graphics.Insets
;
import
android.graphics.Rect
;
import
android.platform.test.annotations.Presubmit
;
import
android.view.DisplayCutout
;
import
android.view.View
;
import
android.view.View.OnApplyWindowInsetsListener
;
...
...
@@ -49,6 +50,7 @@ import java.lang.reflect.Field;
@RunWith
(
AndroidJUnit4
.
class
)
@SmallTest
@Presubmit
public
class
ActionBarOverlayLayoutTest
{
private
static
final
Insets
TOP_INSET_5
=
Insets
.
of
(
0
,
5
,
0
,
0
);
...
...
@@ -168,9 +170,16 @@ public class ActionBarOverlayLayoutTest {
}
private
WindowInsets
insetsWith
(
Insets
content
,
DisplayCutout
cutout
)
{
return
new
WindowInsets
(
WindowInsets
.
createCompatTypeMap
(
content
.
toRect
()),
null
,
null
,
false
,
0
,
0
,
cutout
,
null
,
null
,
null
,
WindowInsets
.
Type
.
systemBars
(),
false
,
null
,
null
,
0
,
0
);
final
Insets
cutoutInsets
=
cutout
!=
null
?
Insets
.
of
(
cutout
.
getSafeInsets
())
:
Insets
.
NONE
;
return
new
WindowInsets
.
Builder
()
.
setSystemWindowInsets
(
content
)
.
setDisplayCutout
(
cutout
)
.
setInsets
(
WindowInsets
.
Type
.
displayCutout
(),
cutoutInsets
)
.
setInsetsIgnoringVisibility
(
WindowInsets
.
Type
.
displayCutout
(),
cutoutInsets
)
.
setVisible
(
WindowInsets
.
Type
.
displayCutout
(),
true
)
.
build
();
}
private
ViewGroup
createViewGroupWithId
(
int
id
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment