Moving all widget picker tests to instrumentation tests
Bug: 196825541 Test: Presubmit Change-Id: I946f29baedb2e6b29044f8df1bc73b74e9999efe
This commit is contained in:
1 parent
741107cc53
commit
177785eccf
18 files changed
+251
-234
No files matched your search
@@ -43,7 +43,6 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.BaseActivity;
|
||||
import com.android.launcher3.CheckLongPressHelper;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Launcher;
|
||||
@@ -123,7 +122,7 @@ public class WidgetCell extends LinearLayout {
|
||||
protected HandlerRunnable mActiveRequest;
|
||||
private boolean mAnimatePreview = true;
|
||||
|
||||
protected final BaseActivity mActivity;
|
||||
protected final ActivityContext mActivity;
|
||||
private final CheckLongPressHelper mLongPressHelper;
|
||||
private final float mEnforcedCornerRadius;
|
||||
|
||||
@@ -143,8 +142,8 @@ public class WidgetCell extends LinearLayout {
|
||||
public WidgetCell(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
mActivity = BaseActivity.fromContext(context);
|
||||
mWidgetPreviewLoader = new DatabaseWidgetPreviewLoader(mActivity);
|
||||
mActivity = ActivityContext.lookupContext(context);
|
||||
mWidgetPreviewLoader = new DatabaseWidgetPreviewLoader(context);
|
||||
mLongPressHelper = new CheckLongPressHelper(this);
|
||||
mLongPressHelper.setLongPressTimeoutFactor(1);
|
||||
|
||||
|
||||
Reference in new issue
Block a user