Skip to content

Commit

Permalink
widget: disable android 15 preview
Browse files Browse the repository at this point in the history
Seemingly causing reboots on my device, don't wanna risk it.
  • Loading branch information
OxygenCobalt committed Oct 23, 2024
1 parent 3753b5f commit 82ddd3a
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class WidgetProvider : AppWidgetProvider() {
// arbitrary, but they are actually the minimum dimensions required to fit all of
// the widget elements, plus some leeway for text sizing.
val defaultLayout = newThinDockedLayout(context, uiSettings, state)
awm.setWidgetPreviewCompat(ComponentName(context, this::class.java), defaultLayout)
val views =
mapOf(
SizeF(180f, 48f) to newThinStickLayout(context, state),
Expand Down Expand Up @@ -158,10 +157,7 @@ class WidgetProvider : AppWidgetProvider() {
fun reset(context: Context, uiSettings: UISettings) {
L.d("Using default layout")
val layout = newDefaultLayout(context, uiSettings)
AppWidgetManager.getInstance(context).apply {
setWidgetPreviewCompat(ComponentName(context, this::class.java), layout)
updateAppWidget(ComponentName(context, this::class.java), layout)
}
AppWidgetManager.getInstance(context).updateAppWidget(ComponentName(context, this::class.java), layout)
}

// --- INTERNAL METHODS ---
Expand Down

0 comments on commit 82ddd3a

Please sign in to comment.