Skip to content

Commit 16ce1c5

Browse files
SebaUbuntuneobuddy89
authored andcommitted
Launcher3: Fix TaskbarModelCallbacksFactory 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 Change-Id: Ic412a2a3efbe1d3f8b9c02a58635c2821eabd54d Signed-off-by: Pranav Vashi <[email protected]>
1 parent e56261f commit 16ce1c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacksFactory.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import com.android.launcher3.util.ResourceBasedOverride
2222
import com.android.launcher3.util.ResourceBasedOverride.Overrides
2323

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

2730
open fun create(
2831
activityContext: TaskbarActivityContext,

0 commit comments

Comments
 (0)