use of com.android.systemui.shared.rotation.RotationButtonController in project android_packages_apps_Launcher3 by AOSPA.
the class NavigationBarRotationContextTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
Context mTargetContext = InstrumentationRegistry.getTargetContext();
final View view = new View(mTargetContext);
RotationButton rotationButton = mock(RotationButton.class);
mRotationButtonController = new RotationButtonController(mTargetContext, 0, 0, 0, 0, 0, 0, () -> 0);
mRotationButtonController.setRotationButton(rotationButton, null);
// Due to a mockito issue, only spy the object after setting the initial state
mRotationButtonController = spy(mRotationButtonController);
final AnimatedVectorDrawable kbd = mock(AnimatedVectorDrawable.class);
doReturn(view).when(rotationButton).getCurrentView();
doReturn(true).when(rotationButton).acceptRotationProposal();
}
use of com.android.systemui.shared.rotation.RotationButtonController in project android_packages_apps_Launcher3 by ArrowOS.
the class NavigationBarRotationContextTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
Context mTargetContext = InstrumentationRegistry.getTargetContext();
final View view = new View(mTargetContext);
RotationButton rotationButton = mock(RotationButton.class);
mRotationButtonController = new RotationButtonController(mTargetContext, 0, 0, 0, 0, 0, 0, () -> 0);
mRotationButtonController.setRotationButton(rotationButton, null);
// Due to a mockito issue, only spy the object after setting the initial state
mRotationButtonController = spy(mRotationButtonController);
final AnimatedVectorDrawable kbd = mock(AnimatedVectorDrawable.class);
doReturn(view).when(rotationButton).getCurrentView();
doReturn(true).when(rotationButton).acceptRotationProposal();
}
use of com.android.systemui.shared.rotation.RotationButtonController in project android_packages_apps_404Launcher by P-404.
the class NavigationBarRotationContextTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
Context mTargetContext = InstrumentationRegistry.getTargetContext();
final View view = new View(mTargetContext);
RotationButton rotationButton = mock(RotationButton.class);
mRotationButtonController = new RotationButtonController(mTargetContext, 0, 0, 0, 0, 0, 0, () -> 0);
mRotationButtonController.setRotationButton(rotationButton, null);
// Due to a mockito issue, only spy the object after setting the initial state
mRotationButtonController = spy(mRotationButtonController);
final AnimatedVectorDrawable kbd = mock(AnimatedVectorDrawable.class);
doReturn(view).when(rotationButton).getCurrentView();
doReturn(true).when(rotationButton).acceptRotationProposal();
}
use of com.android.systemui.shared.rotation.RotationButtonController in project android_packages_apps_Launcher3 by ProtonAOSP.
the class NavigationBarRotationContextTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
Context mTargetContext = InstrumentationRegistry.getTargetContext();
final View view = new View(mTargetContext);
RotationButton rotationButton = mock(RotationButton.class);
mRotationButtonController = new RotationButtonController(mTargetContext, 0, 0, 0, 0, 0, 0, () -> 0);
mRotationButtonController.setRotationButton(rotationButton, null);
// Due to a mockito issue, only spy the object after setting the initial state
mRotationButtonController = spy(mRotationButtonController);
final AnimatedVectorDrawable kbd = mock(AnimatedVectorDrawable.class);
doReturn(view).when(rotationButton).getCurrentView();
doReturn(true).when(rotationButton).acceptRotationProposal();
}
Aggregations