Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_frameworks_base
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
Dhina17
platform_frameworks_base
Commits
ef5e3b1a
Commit
ef5e3b1a
authored
1 year ago
by
Tiger Huang
Committed by
Android (Google) Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Make nav bar color transparent by default if targetSdk >= 35" into main
parents
39e25648
f1d034fe
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/java/com/android/internal/policy/PhoneWindow.java
+14
-0
14 additions, 0 deletions
core/java/com/android/internal/policy/PhoneWindow.java
with
14 additions
and
0 deletions
core/java/com/android/internal/policy/PhoneWindow.java
+
14
−
0
View file @
ef5e3b1a
...
...
@@ -40,6 +40,9 @@ import android.annotation.UiContext;
import
android.app.ActivityManager
;
import
android.app.KeyguardManager
;
import
android.app.SearchManager
;
import
android.app.compat.CompatChanges
;
import
android.compat.annotation.ChangeId
;
import
android.compat.annotation.EnabledSince
;
import
android.compat.annotation.UnsupportedAppUsage
;
import
android.content.Context
;
import
android.content.Intent
;
...
...
@@ -123,6 +126,7 @@ import com.android.internal.view.menu.MenuHelper;
import
com.android.internal.view.menu.MenuPresenter
;
import
com.android.internal.view.menu.MenuView
;
import
com.android.internal.widget.DecorContentParent
;
import
com.android.window.flags.Flags
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
...
...
@@ -162,6 +166,14 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
private
final
static
int
DEFAULT_BACKGROUND_FADE_DURATION_MS
=
300
;
/**
* Makes navigation bar color transparent by default if the target SDK is
* {@link Build.VERSION_CODES#VANILLA_ICE_CREAM} or above.
*/
@ChangeId
@EnabledSince
(
targetSdkVersion
=
Build
.
VERSION_CODES
.
VANILLA_ICE_CREAM
)
private
static
final
long
NAV_BAR_COLOR_DEFAULT_TRANSPARENT
=
232195501L
;
private
static
final
int
CUSTOM_TITLE_COMPATIBLE_FEATURES
=
DEFAULT_FEATURES
|
(
1
<<
FEATURE_CUSTOM_TITLE
)
|
(
1
<<
FEATURE_CONTENT_TRANSITIONS
)
|
...
...
@@ -2525,6 +2537,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
mNavigationBarColor
=
navBarColor
==
navBarDefaultColor
&&
!(
CompatChanges
.
isChangeEnabled
(
NAV_BAR_COLOR_DEFAULT_TRANSPARENT
)
&&
Flags
.
navBarTransparentByDefault
())
&&
!
context
.
getResources
().
getBoolean
(
R
.
bool
.
config_navBarDefaultTransparent
)
?
navBarCompatibleColor
...
...
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