|
|
@ -7,7 +7,6 @@ package org.mozilla.fenix
|
|
|
|
import android.app.Activity
|
|
|
|
import android.app.Activity
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.Intent
|
|
|
|
import android.content.Intent
|
|
|
|
import android.os.Build
|
|
|
|
|
|
|
|
import android.os.Bundle
|
|
|
|
import android.os.Bundle
|
|
|
|
import android.preference.PreferenceManager
|
|
|
|
import android.preference.PreferenceManager
|
|
|
|
import android.util.AttributeSet
|
|
|
|
import android.util.AttributeSet
|
|
|
@ -46,16 +45,9 @@ open class HomeActivity : AppCompatActivity() {
|
|
|
|
val themeManager = DefaultThemeManager().also {
|
|
|
|
val themeManager = DefaultThemeManager().also {
|
|
|
|
it.onThemeChange = { theme ->
|
|
|
|
it.onThemeChange = { theme ->
|
|
|
|
setTheme(theme)
|
|
|
|
setTheme(theme)
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
|
|
|
|
|
|
|
// Older versions of android do not support window animation style, so we use a transition instead
|
|
|
|
|
|
|
|
finish()
|
|
|
|
|
|
|
|
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out)
|
|
|
|
|
|
|
|
startActivity(intent)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
recreate()
|
|
|
|
recreate()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private val navHost by lazy {
|
|
|
|
private val navHost by lazy {
|
|
|
|
supportFragmentManager.findFragmentById(R.id.container) as NavHostFragment
|
|
|
|
supportFragmentManager.findFragmentById(R.id.container) as NavHostFragment
|
|
|
|