Adding a mock for MSDLPlayerWrapper to DeleteDropTargetTest.
The mock makes sure we don't rely on a device hardware for tests. Test: DeleteDropTargetTest Flag: com.android.launcher3.msdl_feedback Bug: 379958544 Change-Id: I202b81f3dd16af1c0985980d0b962be0000bf31f
This commit is contained in:
@@ -65,7 +65,7 @@ public abstract class ButtonDropTarget extends TextView
|
||||
protected final ActivityContext mActivityContext;
|
||||
protected final DropTargetHandler mDropTargetHandler;
|
||||
protected DropTargetBar mDropTargetBar;
|
||||
private final MSDLPlayerWrapper mMSDLPlayerWrapper;
|
||||
private MSDLPlayerWrapper mMSDLPlayerWrapper;
|
||||
|
||||
/** Whether this drop target is active for the current drag */
|
||||
protected boolean mActive;
|
||||
@@ -438,6 +438,11 @@ public abstract class ButtonDropTarget extends TextView
|
||||
return textHeight + getPaddingTop() + getPaddingBottom() >= availableHeight;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setMSDLPlayerWrapper(MSDLPlayerWrapper wrapper) {
|
||||
mMSDLPlayerWrapper = wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduce the size of the text until it fits the measured width or reaches a minimum.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user