package com.ss.android.ugc.aweme.fe.method;

import X.0CB;
import X.0CH;
import X.6Is;
import X.8AR;
import X.C0865KKi;
import X.FIu;
import X.KGF;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.ad.preload.AdLandPagePreloadServiceImpl;
import com.ss.android.ugc.aweme.ad.preload.IAdLandPagePreloadService;
import com.ss.android.ugc.aweme.fe.base.BaseCommonJavaMethod;
import java.util.ArrayList;
import kotlin.h.b.n;
import org.json.JSONArray;
import org.json.JSONObject;

public final class LoadGeckoResourcesMethod extends BaseCommonJavaMethod implements 6Is {
    public static final KGF LIZ = new KGF((byte) 0);

    static {
        Covode.recordClassIndex(76096);
    }

    public LoadGeckoResourcesMethod(byte b) {
        this();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public /* synthetic */ LoadGeckoResourcesMethod() {
        this((C0865KKi) null);
    }

    public LoadGeckoResourcesMethod(C0865KKi kKi) {
        super(kKi);
    }

    public final void handle(JSONObject jSONObject, FIu fIu) {
        8AR LIZ2;
        M12.LIZ((Object) jSONObject, (Object) fIu);
        if (jSONObject.has("channels")) {
            JSONArray optJSONArray = jSONObject.optJSONArray("channels");
            ArrayList arrayList = new ArrayList();
            int length = optJSONArray.length();
            for (int i = 0; i < length; i++) {
                String optString = optJSONArray.optString(i);
                n.LIZIZ(optString, "");
                arrayList.add(optString);
            }
            IAdLandPagePreloadService LJFF = AdLandPagePreloadServiceImpl.LJFF();
            if (LJFF != null && (LIZ2 = LJFF.LIZ()) != null) {
                LIZ2.LIZJ(arrayList);
            }
        }
    }
}
