Convert SettingsLib Lifecycle to Flatfoot
Bug: 69257739 Test: m -j RunSettingsRoboTests Change-Id: I27e7850c39afb9c09297007e8cc352f410665653
This commit is contained in:
@@ -54,14 +54,16 @@ public class LocationSwitchBarControllerTest {
|
||||
|
||||
private Context mContext;
|
||||
private LocationSwitchBarController mController;
|
||||
private Lifecycle mLifecycle;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mContext = RuntimeEnvironment.application;
|
||||
ReflectionHelpers.setField(mSwitchBar, "mSwitch", mSwitch);
|
||||
mLifecycle = new Lifecycle(() -> mLifecycle);
|
||||
mController = spy(new LocationSwitchBarController(
|
||||
mContext, mSwitchBar, new Lifecycle()));
|
||||
mContext, mSwitchBar, mLifecycle));
|
||||
ReflectionHelpers.setField(mController, "mLocationEnabler", mEnabler);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user