package dd;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;

/* JADX INFO: loaded from: classes.dex */
public final class g implements ed.s {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public Map f25114a = new HashMap();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ i f25115b;

    public g(i iVar) {
        this.f25115b = iVar;
    }

    @Override // ed.s
    public final void onMethodCall(ed.q qVar, ed.t tVar) {
        i iVar = this.f25115b;
        if (iVar.f25120a == null) {
            ((a0) tVar).success(this.f25114a);
            return;
        }
        String str = qVar.f25842a;
        str.getClass();
        if (!str.equals("getKeyboardState")) {
            ((a0) tVar).notImplemented();
            return;
        }
        try {
            this.f25114a = Collections.unmodifiableMap(((io.flutter.embedding.android.z) ((io.flutter.embedding.android.c0) iVar.f25120a).f27892a[0]).f27967b);
        } catch (IllegalStateException e10) {
            ((a0) tVar).error(IjkMediaPlayer.OnNativeInvokeListener.ARG_ERROR, e10.getMessage(), null);
        }
        ((a0) tVar).success(this.f25114a);
    }
}
