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

Commit 51e4a664 authored by Andrew Sapperstein's avatar Andrew Sapperstein
Browse files

Fix robotests.

Change-Id: Ia0615bfdd303a19b145ead44979a03ccdd29bf41
Fixes: 63141368
Test: robotest
parent 9638e020
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -183,10 +183,11 @@ public class SearchFragment extends InstrumentedFragment implements SearchView.O
        mSearchView.requestFocus();
        mSearchView.requestFocus();


        // Updating internal views inside SearchView was the easiest way to get this too look right.
        // Updating internal views inside SearchView was the easiest way to get this too look right.
        // We null-check here so that tests pass since the robotests can't find the internal views.
        // Instead of grabbing the TextView directly, we grab it as a view and do an instanceof
        TextView searchText = mSearchView.findViewById(com.android.internal.R.id.search_src_text);
        // check. This ensures if we return, say, a LinearLayout in the tests, they won't fail.
        if (searchText != null) {
        View searchText = mSearchView.findViewById(com.android.internal.R.id.search_src_text);
            searchText.setTextColor(getContext().getColorStateList(
        if (searchText instanceof TextView) {
            ((TextView) searchText).setTextColor(getContext().getColorStateList(
                    com.android.internal.R.color.text_color_primary));
                    com.android.internal.R.color.text_color_primary));
        }
        }
        View editFrame = mSearchView.findViewById(com.android.internal.R.id.search_edit_frame);
        View editFrame = mSearchView.findViewById(com.android.internal.R.id.search_edit_frame);