Fix lint issues (#12683)
parent
693af257aa
commit
499f185fc0
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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/. -->
|
||||
<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_height="fill_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
android:layout_height="fill_parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -48,8 +47,8 @@
|
|||
android:paddingBottom="@dimen/radio_button_preference_vertical" />
|
||||
</RadioGroup>
|
||||
|
||||
<include layout="@layout/layout_clear_permission_button" />
|
||||
<include layout="@layout/component_permissions_blocked_by_android" />
|
||||
<include layout="@layout/layout_clear_permission_button"/>
|
||||
<include layout="@layout/component_permissions_blocked_by_android"/>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
|
|
Loading…
Reference in New Issue