package o; import android.graphics.drawable.Drawable; import android.text.TextUtils; import android.view.View; import android.widget.ImageButton; import android.widget.TextView; import androidx.appcompat.widget.ActionMenuView; import androidx.appcompat.widget.Toolbar; import java.util.ArrayList; import java.util.Comparator; import java.util.List; /* renamed from: o.iLf, reason: case insensitive filesystem */ /* loaded from: classes2.dex */ public final class C15753iLf { public static final Comparator a = new Comparator() { // from class: o.iLf.3 @Override // java.util.Comparator public final /* synthetic */ int compare(View view, View view2) { return view.getTop() - view2.getTop(); } }; public static List b(Toolbar toolbar, CharSequence charSequence) { ArrayList arrayList = new ArrayList(); for (int i = 0; i < toolbar.getChildCount(); i++) { View childAt = toolbar.getChildAt(i); if (childAt instanceof TextView) { TextView textView = (TextView) childAt; if (TextUtils.equals(textView.getText(), charSequence)) { arrayList.add(textView); } } } return arrayList; } public static ActionMenuView c(Toolbar toolbar) { for (int i = 0; i < toolbar.getChildCount(); i++) { View childAt = toolbar.getChildAt(i); if (childAt instanceof ActionMenuView) { return (ActionMenuView) childAt; } } return null; } public static ImageButton Ke_(Toolbar toolbar) { ImageButton imageButton = toolbar.j; Drawable drawable = imageButton != null ? imageButton.getDrawable() : null; if (drawable == null) { return null; } for (int i = 0; i < toolbar.getChildCount(); i++) { View childAt = toolbar.getChildAt(i); if (childAt instanceof ImageButton) { ImageButton imageButton2 = (ImageButton) childAt; if (imageButton2.getDrawable() == drawable) { return imageButton2; } } } return null; } }