widget: disable android 15 preview
Seemingly causing reboots on my device, don't wanna risk it.
This commit is contained in:
parent
3753b5f0cc
commit
82ddd3a24e
1 changed files with 1 additions and 5 deletions
|
@ -92,7 +92,6 @@ class WidgetProvider : AppWidgetProvider() {
|
||||||
// arbitrary, but they are actually the minimum dimensions required to fit all of
|
// arbitrary, but they are actually the minimum dimensions required to fit all of
|
||||||
// the widget elements, plus some leeway for text sizing.
|
// the widget elements, plus some leeway for text sizing.
|
||||||
val defaultLayout = newThinDockedLayout(context, uiSettings, state)
|
val defaultLayout = newThinDockedLayout(context, uiSettings, state)
|
||||||
awm.setWidgetPreviewCompat(ComponentName(context, this::class.java), defaultLayout)
|
|
||||||
val views =
|
val views =
|
||||||
mapOf(
|
mapOf(
|
||||||
SizeF(180f, 48f) to newThinStickLayout(context, state),
|
SizeF(180f, 48f) to newThinStickLayout(context, state),
|
||||||
|
@ -158,10 +157,7 @@ class WidgetProvider : AppWidgetProvider() {
|
||||||
fun reset(context: Context, uiSettings: UISettings) {
|
fun reset(context: Context, uiSettings: UISettings) {
|
||||||
L.d("Using default layout")
|
L.d("Using default layout")
|
||||||
val layout = newDefaultLayout(context, uiSettings)
|
val layout = newDefaultLayout(context, uiSettings)
|
||||||
AppWidgetManager.getInstance(context).apply {
|
AppWidgetManager.getInstance(context).updateAppWidget(ComponentName(context, this::class.java), layout)
|
||||||
setWidgetPreviewCompat(ComponentName(context, this::class.java), layout)
|
|
||||||
updateAppWidget(ComponentName(context, this::class.java), layout)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- INTERNAL METHODS ---
|
// --- INTERNAL METHODS ---
|
||||||
|
|
Loading…
Reference in a new issue