2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-15 18:12:54 +00:00

Fix lint issues (#12683)

This commit is contained in:
Tiger Oakes 2020-07-17 16:20:08 -07:00 committed by GitHub
parent 693af257aa
commit 499f185fc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 11 deletions

View File

@ -12,7 +12,8 @@ import android.graphics.Color
import android.os.Build import android.os.Build
import android.os.Build.VERSION.SDK_INT import android.os.Build.VERSION.SDK_INT
import android.util.TypedValue 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 android.view.Window
import androidx.annotation.StyleRes import androidx.annotation.StyleRes
import mozilla.components.support.ktx.android.content.getColorFromAttr import mozilla.components.support.ktx.android.content.getColorFromAttr
@ -77,7 +78,7 @@ abstract class ThemeManager {
window.statusBarColor = context.getColorFromAttr(android.R.attr.statusBarColor) window.statusBarColor = context.getColorFromAttr(android.R.attr.statusBarColor)
window.decorView.systemUiVisibility = 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 { } else {
window.statusBarColor = Color.BLACK window.statusBarColor = Color.BLACK
} }
@ -85,7 +86,7 @@ abstract class ThemeManager {
if (SDK_INT >= Build.VERSION_CODES.O) { if (SDK_INT >= Build.VERSION_CODES.O) {
// API level can display handle light navigation bar color // API level can display handle light navigation bar color
window.decorView.systemUiVisibility = 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) updateNavigationBar(window, context)
} }
} }
@ -93,8 +94,13 @@ abstract class ThemeManager {
private fun clearLightSystemBars(window: Window) { private fun clearLightSystemBars(window: Window) {
if (SDK_INT >= Build.VERSION_CODES.M) { if (SDK_INT >= Build.VERSION_CODES.M) {
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and window.decorView.systemUiVisibility = window.decorView.systemUiVisibility and
View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv() and SYSTEM_UI_FLAG_LIGHT_STATUS_BAR.inv()
View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_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()
} }
} }

View File

@ -3,10 +3,9 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this - 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/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent">
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"