package g.i.a.c.p;

import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattService;
import android.content.Context;
import g.h.a.i;
import java.util.UUID;

/* JADX INFO: loaded from: classes.dex */
public abstract class c extends b {
    public BluetoothGattCharacteristic A0;
    public UUID B0;
    public UUID C0;
    public UUID D0;
    public BluetoothGattService E0;
    public BluetoothGattCharacteristic F0;
    public BluetoothGattCharacteristic G0;
    public UUID x0;
    public BluetoothGattService y0;
    public BluetoothGattCharacteristic z0;

    public c(Context context, g.i.a.c.q.f fVar, g.i.a.c.m.a.b bVar) {
        super(context, fVar, bVar);
        this.x0 = f.f5634c;
        this.B0 = f.f5636e;
        this.C0 = f.f5637g;
        this.D0 = f.f5638h;
    }

    public int f0() {
        if (this.E0 == null) {
            StringBuilder sbF = g.a.a.a.a.F("DFU_SERVICE not found:");
            sbF.append(this.B0.toString());
            i.W3(sbF.toString());
            throw new g.i.a.c.g.c("load dfu service failed", 262);
        }
        if (this.F0 == null) {
            StringBuilder sbF2 = g.a.a.a.a.F("not found DFU_CONTROL_POINT_UUID : ");
            sbF2.append(this.D0.toString());
            i.W3(sbF2.toString());
            throw new g.i.a.c.g.c("load dfu service failed", 263);
        }
        if (this.G0 != null) {
            return 0;
        }
        StringBuilder sbF3 = g.a.a.a.a.F("not found DFU_DATA_UUID :");
        sbF3.append(this.C0.toString());
        i.W3(sbF3.toString());
        throw new g.i.a.c.g.c("load dfu service failed", 263);
    }

    @Override // g.i.a.c.p.b, g.i.a.c.o.b, g.i.a.c.m.a.a
    public void u() {
        super.u();
        try {
            this.x0 = UUID.fromString(r().R);
            this.B0 = UUID.fromString(r().S);
            this.C0 = UUID.fromString(r().T);
            this.D0 = UUID.fromString(r().U);
        } catch (Exception e2) {
            i.W3(e2.toString());
        }
        this.f5599q = true;
    }
}
