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

Commit 9f4245df authored by Abhishek Aggarwal's avatar Abhishek Aggarwal Committed by Sahil Sonar
Browse files

fix: dont specify width let layout decide one



[SahilSonar - adapted to A14]

Signed-off-by: default avatarSahilSonar <sss.sonar2003@gmail.com>
parent 5c8249b7
Loading
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import com.android.launcher3.PendingAddItemInfo
import com.android.launcher3.R
import com.android.launcher3.config.FeatureFlags
import com.android.launcher3.graphics.FragmentWithPreview
import com.android.launcher3.testing.shared.ResourceUtils
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo
import com.android.launcher3.widget.PendingAddShortcutInfo
import com.android.launcher3.widget.WidgetCell
@@ -320,12 +319,9 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) :
                    }
                    .also {
                        val opts = mWidgetManager.getAppWidgetOptions(it.appWidgetId)
                        val maxWidth =
                            launcher.deviceProfile.availableWidthPx -
                                    2 * ResourceUtils.pxFromDp(8f, launcher.resources.displayMetrics)
                        val params =
                            LayoutParams(
                                maxWidth,
                                -1,
                                opts.getInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT)
                            )