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

import X.0CB;
import X.0CH;
import X.6Is;
import X.FIu;
import X.JN9;
import X.JNA;
import X.KKi;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.fe.base.BaseCommonJavaMethod;
import org.json.JSONObject;

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

    static {
        Covode.recordClassIndex(76182);
    }

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

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

    public /* synthetic */ ShowToastMethod() {
        this((KKi) null);
    }

    public ShowToastMethod(KKi kKi) {
        super(kKi);
    }

    public final void handle(JSONObject jSONObject, FIu fIu) {
        String optString;
        if (jSONObject != null && (optString = jSONObject.optString("message")) != null) {
            new Handler(Looper.getMainLooper()).post(new JN9((Context) this.mContextRef.get(), optString));
        }
    }
}
