Rollback stylish super implementation

This commit is contained in:
J-Jamet committed 2020-05-06 17:33:12 +02:00
1 parent ecf2b42fa4
commit 0206514bdb
1 file changed
+2 -2
@@ -53,19 +53,19 @@ abstract class StylishActivity : AppCompatActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
this.themeId = Stylish.getThemeId(this)
setTheme(themeId)
super.onCreate(savedInstanceState)
// Several gingerbread devices have problems with FLAG_SECURE
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
override fun onResume() {
super.onResume()
if (Stylish.getThemeId(this) != this.themeId) {
Log.d(this.javaClass.name, "Theme change detected, restarting activity")
this.recreate()
}
super.onResume()
}
}