Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1927af1a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "presubmit-am-1d243c5f55224d3684bfc31d9ac4ff50"

* changes:
  [automerge] Fix VibratorManagerService test handling scaling effects 2p: d2c468d4 2p: 41fe93c4
  [automerge] Fix VibratorManagerService test handling scaling effects 2p: d2c468d4
  Fix VibratorManagerService test handling scaling effects
parents aad11c6d 1468c81e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -765,6 +765,9 @@ public class VibratorManagerServiceTest {
        when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[]{1});
        when(mIInputManagerMock.getInputDevice(eq(1))).thenReturn(createInputDeviceWithVibrator(1));
        setUserSetting(Settings.System.VIBRATE_INPUT_DEVICES, 1);
        // Mock alarm intensity equals to default value to avoid scaling in this test.
        setUserSetting(Settings.System.ALARM_VIBRATION_INTENSITY,
                mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM));
        VibratorManagerService service = createSystemReadyService();

        CombinedVibration effect = CombinedVibration.createParallel(
@@ -804,6 +807,9 @@ public class VibratorManagerServiceTest {
        mockVibrators(1, 2);
        mVibratorProviders.get(1).setCapabilities(IVibrator.CAP_COMPOSE_EFFECTS);
        mVibratorProviders.get(2).setCapabilities(IVibrator.CAP_COMPOSE_EFFECTS);
        // Mock alarm intensity equals to default value to avoid scaling in this test.
        setUserSetting(Settings.System.ALARM_VIBRATION_INTENSITY,
                mVibrator.getDefaultVibrationIntensity(VibrationAttributes.USAGE_ALARM));
        VibratorManagerService service = createSystemReadyService();
        // The native callback will be dispatched manually in this test.
        mTestLooper.stopAutoDispatchAndIgnoreExceptions();