package com.ss.android.ugc.aweme.ecommerce.router;

import X.0CB;
import X.0CH;
import X.0CN;
import X.6Is;
import X.C5942CIo;
import android.net.Uri;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.ecommerce.ECommerceService;
import org.json.JSONObject;

public final class Strategy$lifecycleObserver$1 implements 6Is {
    public final /* synthetic */ C5942CIo LIZ;

    static {
        Covode.recordClassIndex(72314);
    }

    public final void onStateChanged(0CH r2, 0CB r3) {
        if (r3 == 0CB.ON_DESTROY) {
            onDestory();
        }
    }

    @0CN(LIZ = 0CB.ON_DESTROY)
    public final void onDestory() {
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("tiktokec_fallback_is_reconstructed", this.LIZ.LJIIJJI ? 1 : 0);
        jSONObject.put("tiktokec_fallback_type", this.LIZ.LJII.toString());
        Uri uri = this.LIZ.LJIIIIZZ;
        if (uri != null) {
            jSONObject.put("tiktokec_fallback_scheme", uri.getScheme() + "://" + uri.getAuthority() + uri.getPath());
        }
        ECommerceService.createIECommerceServicebyMonsterPlugin(false).postEvent("rd_tiktokec_fallback_reconstructed", jSONObject);
    }

    public Strategy$lifecycleObserver$1(C5942CIo cIo) {
        this.LIZ = cIo;
    }
}
