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

Commit 3b61b8f8 authored by Hiroki Sato's avatar Hiroki Sato
Browse files

Fix MagnificationConnectionManagerTest#scaleSetterGetter_scaleIsOutOfRang_getNormalizeValue

The magnification's max scale value can be different depending on a
device configuration after commit [1].

This updates the test to work on any max scale value.

[1] I703f1be3d1e8b5e25d6e85b60ef4778c2898ea6c

Bug: 352139715
Flag: EXEMPT test only
Test: MagnificationConnectionManagerTest on a device with customized ro.config.max_magnification_scale value
Change-Id: If8a5b3b46d4c25e65218d062e0c15299cd11472e
parent ca251a4b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -300,7 +300,8 @@ public class MagnificationConnectionManagerTest {
        mMagnificationConnectionManager.setConnection(mMockConnection.getConnection());
        mMagnificationConnectionManager.enableWindowMagnification(TEST_DISPLAY, 2.5f, NaN, NaN);

        mMagnificationConnectionManager.setScale(TEST_DISPLAY, 10.0f);
        mMagnificationConnectionManager.setScale(TEST_DISPLAY,
                MagnificationScaleProvider.MAX_SCALE * 2.f);

        assertEquals(mMagnificationConnectionManager.getScale(TEST_DISPLAY),
                MagnificationScaleProvider.MAX_SCALE);