Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 372a1997 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

feat: Use launcher instead of context

parent 4cddbd6a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) : FrameLayout(cont
                    opts.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, height)
                }
                val blacklistedComponents =
                    context.resources.getStringArray(R.array.blacklisted_widget_options)
                    mLauncher.resources.getStringArray(R.array.blacklisted_widget_options)
                if (!blacklistedComponents.contains(info.provider.className)) {
                    widgetManager.updateAppWidgetOptions(it.appWidgetId, opts)
                }
@@ -450,7 +450,7 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) : FrameLayout(cont
                        }

                        val blacklistedComponents =
                            context.resources.getStringArray(R.array.blacklisted_widget_options)
                            launcher.resources.getStringArray(R.array.blacklisted_widget_options)
                        if (!blacklistedComponents.contains(info.provider.className)) {
                            mWidgetManager.updateAppWidgetOptions(it.appWidgetId, opts)
                        }