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

Commit 7face75f authored by Svetoslav's avatar Svetoslav
Browse files

ProgressBar is important for accessibility by default.

If a view does not have callbacks, or content description, or does not draw
content, and it is marked as important for accessibility auto, then the system
decides it is not important and does not report it. Apparently progress bar
draws content that means something and it should be important for accessibility
by default.

Change-Id: Icd3837fb8b9e208c98b90707f3b195622d71949e
parent 28f7dbec
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -304,6 +304,11 @@ public class ProgressBar extends View {
        mMirrorForRtl = a.getBoolean(R.styleable.ProgressBar_mirrorForRtl, mMirrorForRtl);

        a.recycle();

        // If not explicitly specified this view is important for accessibility.
        if (getImportantForAccessibility() == View.IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
            setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
        }
    }

    /**