package l0;

import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import com.google.android.gms.common.api.Api;

/* loaded from: classes.dex */
public final class k {

    /* renamed from: a, reason: collision with root package name */
    private Integer f27115a;

    public final Integer a(KeyEvent keyEvent) {
        int c10 = b2.d.c(keyEvent);
        if ((Integer.MIN_VALUE & c10) != 0) {
            this.f27115a = Integer.valueOf(c10 & Api.BaseClientBuilder.API_PRIORITY_OTHER);
            return null;
        }
        Integer num = this.f27115a;
        if (num == null) {
            return Integer.valueOf(c10);
        }
        this.f27115a = null;
        Integer valueOf = Integer.valueOf(KeyCharacterMap.getDeadChar(num.intValue(), c10));
        Integer num2 = valueOf.intValue() == 0 ? null : valueOf;
        return num2 == null ? Integer.valueOf(c10) : num2;
    }
}
