Loading src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java +3 −3 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.launcher3.graphics.LauncherPreviewRenderer.PreviewContext; import com.android.launcher3.model.BgDataModel; import com.android.launcher3.model.GridSizeMigrationTaskV2; import com.android.launcher3.model.LoaderTask; import com.android.launcher3.model.ModelDelegate; import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.RunnableList; import com.android.launcher3.util.Themes; Loading Loading @@ -156,9 +155,10 @@ public class PreviewSurfaceRenderer { PreviewContext previewContext = new PreviewContext(inflationContext, mIdp); new LoaderTask( LauncherAppState.getInstance(previewContext), null, /* bgAllAppsList= */ null, new BgDataModel(), new ModelDelegate(), null) { LauncherAppState.getInstance(previewContext).getModel().getModelDelegate(), /* results= */ null) { @Override public void run() { Loading src/com/android/launcher3/model/ModelDelegate.java +13 −5 Original line number Diff line number Diff line Loading @@ -44,11 +44,7 @@ public class ModelDelegate implements ResourceBasedOverride { boolean isPrimaryInstance) { ModelDelegate delegate = Overrides.getObject( ModelDelegate.class, context, R.string.model_delegate_class); delegate.mApp = app; delegate.mAppsList = appsList; delegate.mDataModel = dataModel; delegate.mIsPrimaryInstance = isPrimaryInstance; delegate.mContext = context; delegate.init(context, app, appsList, dataModel, isPrimaryInstance); return delegate; } Loading @@ -60,6 +56,18 @@ public class ModelDelegate implements ResourceBasedOverride { public ModelDelegate() { } /** * Initializes the object with the given params. */ private void init(Context context, LauncherAppState app, AllAppsList appsList, BgDataModel dataModel, boolean isPrimaryInstance) { this.mApp = app; this.mAppsList = appsList; this.mDataModel = dataModel; this.mIsPrimaryInstance = isPrimaryInstance; this.mContext = context; } /** * Called periodically to validate and update any data */ Loading Loading
src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java +3 −3 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.launcher3.graphics.LauncherPreviewRenderer.PreviewContext; import com.android.launcher3.model.BgDataModel; import com.android.launcher3.model.GridSizeMigrationTaskV2; import com.android.launcher3.model.LoaderTask; import com.android.launcher3.model.ModelDelegate; import com.android.launcher3.util.ComponentKey; import com.android.launcher3.util.RunnableList; import com.android.launcher3.util.Themes; Loading Loading @@ -156,9 +155,10 @@ public class PreviewSurfaceRenderer { PreviewContext previewContext = new PreviewContext(inflationContext, mIdp); new LoaderTask( LauncherAppState.getInstance(previewContext), null, /* bgAllAppsList= */ null, new BgDataModel(), new ModelDelegate(), null) { LauncherAppState.getInstance(previewContext).getModel().getModelDelegate(), /* results= */ null) { @Override public void run() { Loading
src/com/android/launcher3/model/ModelDelegate.java +13 −5 Original line number Diff line number Diff line Loading @@ -44,11 +44,7 @@ public class ModelDelegate implements ResourceBasedOverride { boolean isPrimaryInstance) { ModelDelegate delegate = Overrides.getObject( ModelDelegate.class, context, R.string.model_delegate_class); delegate.mApp = app; delegate.mAppsList = appsList; delegate.mDataModel = dataModel; delegate.mIsPrimaryInstance = isPrimaryInstance; delegate.mContext = context; delegate.init(context, app, appsList, dataModel, isPrimaryInstance); return delegate; } Loading @@ -60,6 +56,18 @@ public class ModelDelegate implements ResourceBasedOverride { public ModelDelegate() { } /** * Initializes the object with the given params. */ private void init(Context context, LauncherAppState app, AllAppsList appsList, BgDataModel dataModel, boolean isPrimaryInstance) { this.mApp = app; this.mAppsList = appsList; this.mDataModel = dataModel; this.mIsPrimaryInstance = isPrimaryInstance; this.mContext = context; } /** * Called periodically to validate and update any data */ Loading