package g.i.a.c.q;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import com.cvte.vman.instance.InvokeCmd;
import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public class f implements Parcelable {
    public static final Parcelable.Creator<f> CREATOR = new a();
    public Long A;
    public int B;
    public int C;
    public byte[] D;
    public int E;
    public boolean F;
    public boolean G;
    public boolean H;
    public int I;
    public boolean J;
    public int K;
    public int L;
    public int M;
    public boolean N;
    public boolean O;
    public int P;
    public int Q;
    public String R;
    public String S;
    public String T;
    public String U;
    public c V;
    public String W;
    public int X;
    public int Y;
    public int Z;

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    public int f5691a0;

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    public int f5692b0;

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    public boolean f5693c0;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    public int f5694d0;
    public boolean e0;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public int f5695f;
    public boolean f0;
    public boolean g0;
    public long h0;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public int f5696m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public int f5697n;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public int f5698o;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public String f5699p;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public int f5700q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public String f5701r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public String f5702s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public int f5703t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f5704u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public int f5705v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public boolean f5706w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public boolean f5707x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public boolean f5708y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public boolean f5709z;

    public static class a implements Parcelable.Creator<f> {
        @Override // android.os.Parcelable.Creator
        public f createFromParcel(Parcel parcel) {
            return new f(parcel);
        }

        @Override // android.os.Parcelable.Creator
        public f[] newArray(int i2) {
            return new f[i2];
        }
    }

    public f() {
        this.f5695f = 0;
        this.f5696m = 0;
        this.f5697n = 0;
        this.f5698o = 3;
        this.f5700q = 0;
        this.f5702s = "BIN";
        this.f5703t = -1;
        this.f5704u = 7;
        this.f5705v = 0;
        this.f5706w = true;
        this.f5707x = false;
        this.f5708y = false;
        this.f5709z = false;
        this.A = 0L;
        this.B = 0;
        this.C = 7;
        this.E = 20;
        this.F = false;
        this.G = true;
        this.H = false;
        this.I = 0;
        this.J = false;
        this.K = 30;
        this.L = 0;
        this.M = 3;
        this.N = false;
        this.O = true;
        this.P = 6;
        this.Q = 93;
        this.R = "0000d0ff-3c17-d293-8e48-14fe2e4da212";
        this.S = "00006287-3c17-d293-8e48-14fe2e4da212";
        this.T = "00006387-3c17-d293-8e48-14fe2e4da212";
        this.U = "00006487-3c17-d293-8e48-14fe2e4da212";
        this.X = InvokeCmd.CMD_SYSTEMCTRL_SET_SARPOWERMODE;
        this.Y = 2;
        this.Z = 2;
        this.f5691a0 = 0;
        this.f5692b0 = 6;
        this.f5693c0 = true;
        this.f5694d0 = 0;
        this.h0 = 10000L;
        this.f5697n = 0;
        g.h.a.i.U3(String.format(Locale.US, "\tmaxInterval=%d(0x%04X),minInterval=%d(0x%04X),latency=%d(0x%04X),timeout=%d(0x%04X),\n", 17, 17, 6, 6, 0, 0, 500, 500));
        this.V = new c(17, 6, 0, 500);
        StringBuilder sbF = g.a.a.a.a.F("init default:");
        sbF.append(this.V.toString());
        g.h.a.i.U3(sbF.toString());
    }

    public f(Parcel parcel) {
        this.f5695f = 0;
        this.f5696m = 0;
        this.f5697n = 0;
        this.f5698o = 3;
        this.f5700q = 0;
        this.f5702s = "BIN";
        this.f5703t = -1;
        this.f5704u = 7;
        this.f5705v = 0;
        this.f5706w = true;
        this.f5707x = false;
        this.f5708y = false;
        this.f5709z = false;
        this.A = 0L;
        this.B = 0;
        this.C = 7;
        this.E = 20;
        this.F = false;
        this.G = true;
        this.H = false;
        this.I = 0;
        this.J = false;
        this.K = 30;
        this.L = 0;
        this.M = 3;
        this.N = false;
        this.O = true;
        this.P = 6;
        this.Q = 93;
        this.R = "0000d0ff-3c17-d293-8e48-14fe2e4da212";
        this.S = "00006287-3c17-d293-8e48-14fe2e4da212";
        this.T = "00006387-3c17-d293-8e48-14fe2e4da212";
        this.U = "00006487-3c17-d293-8e48-14fe2e4da212";
        this.X = InvokeCmd.CMD_SYSTEMCTRL_SET_SARPOWERMODE;
        this.Y = 2;
        this.Z = 2;
        this.f5691a0 = 0;
        this.f5692b0 = 6;
        this.f5693c0 = true;
        this.f5694d0 = 0;
        this.h0 = 10000L;
        this.f5695f = parcel.readInt();
        this.f5696m = parcel.readInt();
        this.f5697n = parcel.readInt();
        this.f5698o = parcel.readInt();
        this.f5699p = parcel.readString();
        this.f5700q = parcel.readInt();
        this.f5701r = parcel.readString();
        this.f5702s = parcel.readString();
        this.f5703t = parcel.readInt();
        this.f5704u = parcel.readInt();
        this.f5705v = parcel.readInt();
        this.f5706w = parcel.readByte() != 0;
        this.f5707x = parcel.readByte() != 0;
        this.f5708y = parcel.readByte() != 0;
        this.f5709z = parcel.readByte() != 0;
        this.A = parcel.readByte() == 0 ? null : Long.valueOf(parcel.readLong());
        this.B = parcel.readInt();
        this.C = parcel.readInt();
        this.D = parcel.createByteArray();
        this.E = parcel.readInt();
        this.F = parcel.readByte() != 0;
        this.G = parcel.readByte() != 0;
        this.H = parcel.readByte() != 0;
        this.I = parcel.readInt();
        this.J = parcel.readByte() != 0;
        this.K = parcel.readInt();
        this.L = parcel.readInt();
        this.M = parcel.readInt();
        this.N = parcel.readByte() != 0;
        this.O = parcel.readByte() != 0;
        this.P = parcel.readInt();
        this.Q = parcel.readInt();
        this.R = parcel.readString();
        this.S = parcel.readString();
        this.T = parcel.readString();
        this.U = parcel.readString();
        this.V = (c) parcel.readParcelable(c.class.getClassLoader());
        this.W = parcel.readString();
        this.X = parcel.readInt();
        this.Y = parcel.readInt();
        this.Z = parcel.readInt();
        this.f5691a0 = parcel.readInt();
        this.f5692b0 = parcel.readInt();
        this.f5693c0 = parcel.readByte() != 0;
        this.f5694d0 = parcel.readInt();
        this.e0 = parcel.readByte() != 0;
        this.f0 = parcel.readByte() != 0;
        this.g0 = parcel.readByte() != 0;
        this.h0 = parcel.readLong();
    }

    public void a(int i2) {
        this.C = i2 | this.C;
    }

    public String c() {
        return TextUtils.isEmpty(this.f5702s) ? "BIN" : this.f5702s;
    }

    public boolean d(int i2) {
        return (this.B & i2) == i2;
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public boolean f(int i2) {
        return (this.C & i2) == i2;
    }

    public boolean n() {
        return (this.f5704u & 1) == 1;
    }

    public boolean o() {
        return (this.f5704u & 4) == 4;
    }

    public boolean p() {
        return (this.f5704u & 2) == 2;
    }

    public void q(int i2) {
        this.C = (~i2) & this.C;
    }

    public String toString() {
        String str;
        StringBuilder sb = new StringBuilder();
        Object[] objArr = new Object[2];
        objArr[0] = Integer.valueOf(this.Q);
        int i2 = this.f5698o;
        objArr[1] = i2 <= 3 ? "Bee1" : i2 == 4 ? "BBPro" : i2 == 5 ? "Bee2" : i2 == 6 ? "BBLite ANC" : i2 == 7 ? "BBPro2" : i2 == 8 ? "BBLite" : i2 == 9 ? "SBee2" : i2 == 10 ? "BBPro3" : i2 == 11 ? "BB2" : i2 == 12 ? "Bee3" : i2 == 13 ? "BBLITE_2" : g.a.a.a.a.l("Unknown ic ", i2);
        sb.append(String.format("manufacturerId=0x%04X, primaryIcType=%s\n", objArr));
        sb.append(String.format("address==%s, localName=%s, isHid=%b\n", this.f5699p, this.W, Boolean.valueOf(this.e0)));
        Locale locale = Locale.US;
        sb.append(String.format(locale, "logLevel=%d\n", Integer.valueOf(this.f5691a0)));
        sb.append(String.format("mProtocolType=0x%04X, mChannelType=0x%02x, workMode=0x%04X\n", Integer.valueOf(this.f5696m), Integer.valueOf(this.f5695f), Integer.valueOf(this.f5697n)));
        int i3 = this.f5695f;
        if (i3 == 0) {
            sb.append(String.format("\tOtaService=%s\n", this.R));
            sb.append(String.format("\tDfuService=%s\n", this.S));
            sb.append(String.format("\tDfuData==%s\n", this.T));
            sb.append(String.format("\tDfuControlPoint=%s\n", this.U));
            c cVar = this.V;
            if (cVar != null) {
                str = String.format("\t%s\n", cVar.toString());
                sb.append(str);
            } else {
                g.h.a.i.U3("not set connectionParameters");
            }
        } else if (i3 == 2) {
            str = String.format("\tEndPointInAddr=0x%02X, EndPointOutAddr=0x%02X\n", Integer.valueOf(this.X), Integer.valueOf(this.Y));
            sb.append(str);
        }
        sb.append(String.format(locale, "handoverTimeout=%ds, notificationTimeout=%dms\n", Integer.valueOf(this.f5692b0), Long.valueOf(this.h0)));
        sb.append(String.format(locale, "file location=%d, path==%s, suffix=%s\n", Integer.valueOf(this.f5700q), this.f5701r, this.f5702s));
        sb.append(String.format("\tfileIndicator=0x%08x, imageVerifyIndicator=0x%08x\n", Integer.valueOf(this.f5703t), Integer.valueOf(this.f5704u)));
        sb.append(String.format(locale, "\tversionCheck=%b, mode=%d, icCheck=%b, sectionSizeCheck=%b\n, batteryCheck=%b, connectBack=%b, checkOtaResult=%b\n", Boolean.valueOf(p()), Integer.valueOf(this.f5705v), Boolean.valueOf(n()), Boolean.valueOf(o()), Boolean.valueOf(this.J), Boolean.valueOf(this.f0), Boolean.valueOf(this.g0)));
        sb.append(String.format(locale, "conParamUpdateLatency=%b, latencyTimeout=%d", Boolean.valueOf(this.O), Integer.valueOf(this.P)));
        if (this.J) {
            sb.append(String.format(locale, "\nlowBatteryThreshold=%d, batteryLevelFormat=%d", Integer.valueOf(this.K), Integer.valueOf(this.L)));
        }
        sb.append(String.format(locale, "\nmtuUpdate=%b,bufferCheckMtuUpdateEnabled=%b,primaryMtuSize=%d", Boolean.valueOf(this.F), Boolean.valueOf(this.G), Integer.valueOf(this.E)));
        sb.append(String.format("\nthroughput=%b, breakpointResume=%b,waitActiveCmdAck=%b, activeImageDelayTime=%d", Boolean.valueOf(this.f5707x), Boolean.valueOf(this.f5708y), Boolean.valueOf(this.f5709z), this.A));
        if (this.H) {
            sb.append(String.format(locale, ", flowControlInterval=%d ms", Integer.valueOf(this.I * 50)));
        }
        sb.append(String.format("\ncompleteAction=0x%04X, ", Integer.valueOf(this.B)));
        sb.append(String.format("\nerrorAction=0x%04X, ERROR_ACTION_DISCONNECT=%b, ERROR_ACTION_REFRESH_DEVICE=%b, EA_CLOSE_GATT=%b", Integer.valueOf(this.C), Boolean.valueOf(f(1)), Boolean.valueOf(f(2)), Boolean.valueOf(f(4))));
        sb.append(String.format(locale, "\nretransConnectTimes=%d", Integer.valueOf(this.M)));
        return sb.toString();
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i2) {
        parcel.writeInt(this.f5695f);
        parcel.writeInt(this.f5696m);
        parcel.writeInt(this.f5697n);
        parcel.writeInt(this.f5698o);
        parcel.writeString(this.f5699p);
        parcel.writeInt(this.f5700q);
        parcel.writeString(this.f5701r);
        parcel.writeString(this.f5702s);
        parcel.writeInt(this.f5703t);
        parcel.writeInt(this.f5704u);
        parcel.writeInt(this.f5705v);
        parcel.writeByte(this.f5706w ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.f5707x ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.f5708y ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.f5709z ? (byte) 1 : (byte) 0);
        if (this.A == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeLong(this.A.longValue());
        }
        parcel.writeInt(this.B);
        parcel.writeInt(this.C);
        parcel.writeByteArray(this.D);
        parcel.writeInt(this.E);
        parcel.writeByte(this.F ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.G ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.H ? (byte) 1 : (byte) 0);
        parcel.writeInt(this.I);
        parcel.writeByte(this.J ? (byte) 1 : (byte) 0);
        parcel.writeInt(this.K);
        parcel.writeInt(this.L);
        parcel.writeInt(this.M);
        parcel.writeByte(this.N ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.O ? (byte) 1 : (byte) 0);
        parcel.writeInt(this.P);
        parcel.writeInt(this.Q);
        parcel.writeString(this.R);
        parcel.writeString(this.S);
        parcel.writeString(this.T);
        parcel.writeString(this.U);
        parcel.writeParcelable(this.V, i2);
        parcel.writeString(this.W);
        parcel.writeInt(this.X);
        parcel.writeInt(this.Y);
        parcel.writeInt(this.Z);
        parcel.writeInt(this.f5691a0);
        parcel.writeInt(this.f5692b0);
        parcel.writeByte(this.f5693c0 ? (byte) 1 : (byte) 0);
        parcel.writeInt(this.f5694d0);
        parcel.writeByte(this.e0 ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.f0 ? (byte) 1 : (byte) 0);
        parcel.writeByte(this.g0 ? (byte) 1 : (byte) 0);
        parcel.writeLong(this.h0);
    }
}
