package v5; import android.view.View; import java.util.ArrayList; import java.util.Collection; import java.util.IdentityHashMap; import java.util.Iterator; import org.json.JSONObject; import t5.i; import v5.a; import w5.f; /* loaded from: classes2.dex */ public class c implements a { /* renamed from: a, reason: collision with root package name */ private final a f14932a; public c(a aVar) { this.f14932a = aVar; } @Override // v5.a public JSONObject a(View view) { return w5.b.b(0, 0, 0, 0); } @Override // v5.a public void b(View view, JSONObject jSONObject, a.InterfaceC0247a interfaceC0247a, boolean z10) { Iterator it = c().iterator(); while (it.hasNext()) { interfaceC0247a.a((View) it.next(), this.f14932a, jSONObject); } } ArrayList c() { View rootView; ArrayList arrayList = new ArrayList(); u5.a a10 = u5.a.a(); if (a10 != null) { Collection e10 = a10.e(); IdentityHashMap identityHashMap = new IdentityHashMap((e10.size() * 2) + 3); Iterator it = e10.iterator(); while (it.hasNext()) { View g10 = ((i) it.next()).g(); if (g10 != null && f.c(g10) && (rootView = g10.getRootView()) != null && !identityHashMap.containsKey(rootView)) { identityHashMap.put(rootView, rootView); float a11 = f.a(rootView); int size = arrayList.size(); while (size > 0 && f.a((View) arrayList.get(size - 1)) > a11) { size--; } arrayList.add(size, rootView); } } } return arrayList; } }