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

Commit 53232ded authored by Kshitij's avatar Kshitij Committed by Nishith Khanna
Browse files

fix: null-check widgetFragment before cast



- In case view is not ready, fragment yielded may be null

Signed-off-by: default avatarSaalim Quadri <danascape@gmail.com>
parent 411ae9b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -190,7 +190,7 @@ class BlurWallpaperProvider(val context: Context) : SafeCloseable {
            Bitmap.createBitmap(
                wallpaper.width,
                wallpaper.height,
                wallpaper.config ?: Bitmap.Config.ARGB_8888
                wallpaper.config ?: Bitmap.Config.ARGB_8888,
            )
        Canvas().apply {
            setBitmap(bitmap)
+3 −1
Original line number Diff line number Diff line
@@ -152,9 +152,11 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) :
    private fun updateRecyclerViewHeight() {
        mRecyclerView.post {
            val widgetFragment = mLauncher.fragmentManager.findFragmentByTag("qsb_view")
            if (widgetFragment != null) {
                (widgetFragment as WidgetFragment).setRecyclerViewHeight()
            }
        }
    }

    private fun updatePadding() {
        val insets = mLauncher.workspace.mInsets