Pass device profile as constructor arg to DatabaseWidgetPreviewLoader
This is so, we can use it with compose, and let caller pass the needed dependencies. May also convert to dagger in followup Bug: 408283627 Flag: EXEMPT BUGFIX Test: N/A Change-Id: I9b04011ec2592df3bd02bd74ec4889eb05928e7f
This commit is contained in:
1 parent
a098f6a855
commit
4cb6ff3838
4 files changed
+20
-12
No files matched your search
@@ -130,7 +130,8 @@ public class WidgetCell extends LinearLayout {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
mActivity = ActivityContext.lookupContext(context);
|
||||
mWidgetPreviewLoader = new DatabaseWidgetPreviewLoader(context);
|
||||
mWidgetPreviewLoader = new DatabaseWidgetPreviewLoader(context,
|
||||
mActivity.getDeviceProfile());
|
||||
mLongPressHelper = new CheckLongPressHelper(this);
|
||||
mLongPressHelper.setLongPressTimeoutFactor(1);
|
||||
mEnforcedCornerRadius = RoundedCornerEnforcement.computeEnforcedRadius(context);
|
||||
|
||||
Reference in new issue
Block a user