From 499f185fc0c045966d056c3a120e45b40c8a1dd9 Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Fri, 17 Jul 2020 16:20:08 -0700 Subject: [PATCH] Fix lint issues (#12683) --- .../java/org/mozilla/fenix/theme/ThemeManager.kt | 16 +++++++++++----- ...site_permissions_exceptions_feature_phone.xml | 11 +++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt b/app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt index bd5ecc6b89..f39c8dd0f9 100644 --- a/app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt +++ b/app/src/main/java/org/mozilla/fenix/theme/ThemeManager.kt @@ -12,7 +12,8 @@ import android.graphics.Color import android.os.Build import android.os.Build.VERSION.SDK_INT import android.util.TypedValue -import android.view.View +import android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR +import android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR import android.view.Window import androidx.annotation.StyleRes import mozilla.components.support.ktx.android.content.getColorFromAttr @@ -77,7 +78,7 @@ abstract class ThemeManager { window.statusBarColor = context.getColorFromAttr(android.R.attr.statusBarColor) window.decorView.systemUiVisibility = - window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR + window.decorView.systemUiVisibility or SYSTEM_UI_FLAG_LIGHT_STATUS_BAR } else { window.statusBarColor = Color.BLACK } @@ -85,7 +86,7 @@ abstract class ThemeManager { if (SDK_INT >= Build.VERSION_CODES.O) { // API level can display handle light navigation bar color window.decorView.systemUiVisibility = - window.decorView.systemUiVisibility or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR + window.decorView.systemUiVisibility or SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR updateNavigationBar(window, context) } } @@ -93,8 +94,13 @@ abstract class ThemeManager { private fun clearLightSystemBars(window: Window) { if (SDK_INT >= Build.VERSION_CODES.M) { window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and - View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() and - View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv() + SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() + } + + if (SDK_INT >= Build.VERSION_CODES.O) { + // API level can display handle light navigation bar color + window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and + SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR.inv() } } diff --git a/app/src/main/res/layout/fragment_manage_site_permissions_exceptions_feature_phone.xml b/app/src/main/res/layout/fragment_manage_site_permissions_exceptions_feature_phone.xml index 51eea4b84c..7f5f71e4a7 100644 --- a/app/src/main/res/layout/fragment_manage_site_permissions_exceptions_feature_phone.xml +++ b/app/src/main/res/layout/fragment_manage_site_permissions_exceptions_feature_phone.xml @@ -3,10 +3,9 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + android:layout_height="fill_parent"> - - + + - \ No newline at end of file +