Step Record v1.1.5版本的 MD5 值为:5797275f89198878d2f00ee92d534382

以下内容为反编译后的 e.java 源代码,内容仅作参考


package sg.bigo.ads.controller.a.a;

import android.os.Parcel;
import android.webkit.URLUtil;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.adjust.sdk.Constants;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.json.JSONArray;
import org.json.JSONObject;
import sg.bigo.ads.common.utils.k;
import sg.bigo.ads.controller.a.j;

public final class e extends g implements sg.bigo.ads.common.d {
    public static final long a = TimeUnit.DAYS.toMillis(1);
    public static final long b = TimeUnit.MINUTES.toMillis(30);
    private long g;
    private long h;
    private List<a> f = c();
    private long d = a;
    private long e = b;

    private static List<a> c() {
        ArrayList arrayList = new ArrayList();
        arrayList.add(new a(Constants.REFERRER_API_GOOGLE, "https://drive.google.com/uc?export=download&id=1ms4F7Cn_aInE9oFMMaZEiwMIuMKt1DZc", true));
        return arrayList;
    }

    @Override
    @Nullable
    public final j a(String str) {
        synchronized (this) {
            if (k.a((Collection) this.f)) {
                return null;
            }
            a a2 = g.a((List<a>) k.a(this.f, new Comparable<a>() {
                @Override
                public final int compareTo(a aVar) {
                    a aVar2 = aVar;
                    return (aVar2 == null || !aVar2.d || aVar2.b) ? 0 : 1;
                }
            }));
            if (a2 != null) {
                return a2;
            }
            a a3 = g.a((List<a>) k.a(this.f, new Comparable<a>() {
                @Override
                public final int compareTo(a aVar) {
                    a aVar2 = aVar;
                    return (aVar2 != null && aVar2.d && aVar2.b) ? 1 : 0;
                }
            }));
            if (a3 != null) {
                return a3;
            }
            return null;
        }
    }

    @Override
    public final void a(@NonNull Parcel parcel) {
        synchronized (this) {
            parcel.writeLong(this.d);
            parcel.writeLong(this.e);
            sg.bigo.ads.common.j.a(parcel, this.f);
            parcel.writeLong(this.g);
            parcel.writeLong(this.h);
        }
    }

    public final void a(@NonNull JSONObject jSONObject) {
        synchronized (this) {
            long optLong = jSONObject.optLong("suc_interval", a / 1000) * 1000;
            long j = g.c;
            long max = Math.max(optLong, j);
            long max2 = Math.max(jSONObject.optLong("fail_interval", b / 1000) * 1000, j);
            List<a> c = c();
            JSONArray optJSONArray = jSONObject.optJSONArray("urls");
            if (optJSONArray != null) {
                for (int i = 0; i < optJSONArray.length(); i++) {
                    JSONObject optJSONObject = optJSONArray.optJSONObject(i);
                    String optString = optJSONObject.optString("name", "");
                    String optString2 = optJSONObject.optString("url", "");
                    if (URLUtil.isNetworkUrl(optString2)) {
                        c.add(new a(optString, optString2, false));
                    }
                }
            }
            this.d = max;
            this.e = max2;
            this.f = c;
        }
    }

    @Override
    public final void a(boolean z) {
        super.a(z);
        if (z) {
            this.h = System.currentTimeMillis();
        }
    }

    public final boolean a() {
        long j = this.g;
        long j2 = this.h;
        if (j == j2) {
            return true;
        }
        long currentTimeMillis = System.currentTimeMillis();
        return j > j2 ? Math.abs(currentTimeMillis - this.g) > this.e : Math.abs(currentTimeMillis - this.h) > this.d;
    }

    public final void b() {
        this.g = System.currentTimeMillis();
        synchronized (this) {
            if (k.a((Collection) this.f)) {
                return;
            }
            Iterator<a> it = this.f.iterator();
            while (it.hasNext()) {
                it.next().d = true;
            }
        }
    }

    @Override
    public final void b(@NonNull Parcel parcel) {
        synchronized (this) {
            this.d = sg.bigo.ads.common.j.a(parcel, a);
            this.e = sg.bigo.ads.common.j.a(parcel, b);
            List<a> a2 = sg.bigo.ads.common.j.a(parcel, a.c);
            this.f = a2;
            if (k.a((Collection) a2)) {
                this.f = c();
            }
            this.g = sg.bigo.ads.common.j.a(parcel, 0L);
            this.h = sg.bigo.ads.common.j.a(parcel, 0L);
        }
    }
}