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

Unverified Commit fde90ebe authored by Sebastiano Barezzi's avatar Sebastiano Barezzi Committed by Michael Bestas
Browse files

Trebuchet: Fix Taskbar{Model,View}CallbacksFactory instantiation



Overrides.getObject() calls the constructor with context if the overlay
has a valid class, if empty it uses the constructor without args.
Considering this class is part of quickstep, we should support both
cases, since this is the fallback class anyway

Co-authored-by: default avatarAaron Kling <webgeek1234@gmail.com>
Fixes: I016d4e4e6a096ca4f5bd65fcda1bf24a444459f4
Change-Id: Ic412a2a3efbe1d3f8b9c02a58635c2821eabd54d
parent eea26b7a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@ import com.android.launcher3.util.ResourceBasedOverride
import com.android.launcher3.util.ResourceBasedOverride.Overrides

/** Creates [TaskbarModelCallbacks] instances. */
open class TaskbarModelCallbacksFactory : ResourceBasedOverride {
// We must have constructors with and without context for Overrides.getObject
open class TaskbarModelCallbacksFactory @JvmOverloads constructor(
    context: Context? = null
) : ResourceBasedOverride {

    open fun create(
        activityContext: TaskbarActivityContext,
+4 −1
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@ import com.android.launcher3.util.ResourceBasedOverride
import com.android.launcher3.util.ResourceBasedOverride.Overrides

/** Creates [TaskbarViewCallbacks] instances. */
open class TaskbarViewCallbacksFactory : ResourceBasedOverride {
// We must have constructors with and without context for Overrides.getObject
open class TaskbarViewCallbacksFactory @JvmOverloads constructor(
    context: Context? = null
) : ResourceBasedOverride {

    open fun create(
        activity: TaskbarActivityContext,