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

Commit ea4ecd62 authored by Adam Powell's avatar Adam Powell
Browse files

Fix a regression in SearchView focusability

A bit of code was removed that re-read the View style attributes
during SearchView construction to extract the focusable attribute, but
with a different default value if it was entirely missing. Restore it,
and lump re-reading the focusable attribute in with SearchView's
styleable filter array instead of using the giant View one for a
second time during inflation.

Bug 17292230

Change-Id: Ic5a2dd2d55893b0b290f1f7a3b6de09b37329245
parent 4ef16eaa
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -334,6 +334,10 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
            setInputType(inputType);
            setInputType(inputType);
        }
        }


        boolean focusable = true;
        focusable = a.getBoolean(R.styleable.SearchView_focusable, focusable);
        setFocusable(focusable);

        a.recycle();
        a.recycle();


        // Save voice intent for later queries/launching
        // Save voice intent for later queries/launching
+1 −0
Original line number Original line Diff line number Diff line
@@ -7151,6 +7151,7 @@
        <attr name="queryBackground" format="reference" />
        <attr name="queryBackground" format="reference" />
        <!-- Background for the section containing the action (e.g. voice search) -->
        <!-- Background for the section containing the action (e.g. voice search) -->
        <attr name="submitBackground" format="reference" />
        <attr name="submitBackground" format="reference" />
        <attr name="focusable" />
    </declare-styleable>
    </declare-styleable>


    <declare-styleable name="Switch">
    <declare-styleable name="Switch">