- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
67 lines
2.1 KiB
Java
67 lines
2.1 KiB
Java
package com.fyber.inneractive.sdk.util;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Rect;
|
|
import android.view.View;
|
|
import android.view.ViewTreeObserver;
|
|
import com.fyber.inneractive.sdk.util.b0;
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.WeakHashMap;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class c0 implements ViewTreeObserver.OnPreDrawListener {
|
|
public final /* synthetic */ Context a;
|
|
public final /* synthetic */ b0 b;
|
|
|
|
public c0(b0 b0Var, Context context) {
|
|
this.b = b0Var;
|
|
this.a = context;
|
|
}
|
|
|
|
@Override // android.view.ViewTreeObserver.OnPreDrawListener
|
|
public final boolean onPreDraw() {
|
|
float f;
|
|
b0 b0Var = this.b;
|
|
Context context = this.a;
|
|
if (context == null) {
|
|
b0Var.getClass();
|
|
return true;
|
|
}
|
|
WeakHashMap<View, b0.d> weakHashMap = b0Var.b.get(context);
|
|
if (weakHashMap == null) {
|
|
return true;
|
|
}
|
|
l<HashSet<View>> lVar = b0Var.d;
|
|
Object poll = lVar.a.poll();
|
|
if (poll == null) {
|
|
poll = lVar.b.a();
|
|
}
|
|
HashSet hashSet = (HashSet) poll;
|
|
hashSet.addAll(weakHashMap.keySet());
|
|
Iterator it = hashSet.iterator();
|
|
while (it.hasNext()) {
|
|
View view = (View) it.next();
|
|
b0.d dVar = weakHashMap.get(view);
|
|
if (dVar != null) {
|
|
l<Rect> lVar2 = b0Var.c;
|
|
Object poll2 = lVar2.a.poll();
|
|
if (poll2 == null) {
|
|
poll2 = lVar2.b.a();
|
|
}
|
|
Rect rect = (Rect) poll2;
|
|
if (view == null || view.getParent() == null || !view.isShown() || !view.getGlobalVisibleRect(rect)) {
|
|
f = 0.0f;
|
|
} else {
|
|
f = (rect.width() * rect.height()) / (view.getWidth() * view.getHeight());
|
|
}
|
|
dVar.a(f, rect);
|
|
b0Var.c.a.offer(rect);
|
|
}
|
|
}
|
|
hashSet.clear();
|
|
b0Var.d.a.offer(hashSet);
|
|
return true;
|
|
}
|
|
}
|