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

Commit c212fdcb authored by Pat Manning's avatar Pat Manning
Browse files

Add default theme for PointerIcon scale test.

Fix: 352820894
Test: PointerIconLoadingTest
Flag: android.view.flags.enable_vector_cursor_a11y_settings
Change-Id: I2546d89d29571b03a6b291689613e966b631e132
parent 7fdb530e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -136,11 +136,20 @@ class PointerIconLoadingTest {
        assumeTrue(enableVectorCursors())
        assumeTrue(enableVectorCursorA11ySettings())

        val theme: Resources.Theme = context.getResources().newTheme()
        theme.setTo(context.getTheme())
        theme.applyStyle(
            PointerIcon.vectorFillStyleToResource(PointerIcon.POINTER_ICON_VECTOR_STYLE_FILL_BLACK),
            /* force= */ true)
        theme.applyStyle(
            PointerIcon.vectorStrokeStyleToResource(
                PointerIcon.POINTER_ICON_VECTOR_STYLE_STROKE_WHITE),
            /* force= */ true)
        val pointerScale = 2f

        val pointerIcon =
            PointerIcon.getLoadedSystemIcon(
                context,
                ContextThemeWrapper(context, theme),
                PointerIcon.TYPE_ARROW,
                /* useLargeIcons= */ false,
                pointerScale)