package com.seewo.ota.v.s.r.d;

import android.util.Log;
import com.seewo.ota.OTAApplication;
import com.seewo.ota.R;
import f.e0.f;
import f.e0.h;
import f.e0.s;
import f.e0.t;
import f.z.d.k;
import java.util.ArrayList;
import java.util.List;

/* JADX INFO: compiled from: CvteCameraVersionComparator.kt */
/* JADX INFO: loaded from: classes.dex */
public final class b implements c<Integer> {
    private final List<Integer> a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final h f2446b;

    public b() {
        String[] stringArray = OTAApplication.f1907b.getResources().getStringArray(R.array.camera_upgrade_only_list);
        k.d(stringArray, "sOTAApplication.resource…camera_upgrade_only_list)");
        ArrayList arrayList = new ArrayList(stringArray.length);
        for (String str : stringArray) {
            k.d(str, "it");
            String strH = t.H(str, "0X");
            f.e0.a.a(16);
            arrayList.add(Integer.valueOf(Integer.parseInt(strH, 16)));
        }
        this.a = arrayList;
        this.f2446b = new h("\\d{8}-\\d{6}");
    }

    @Override // com.seewo.ota.v.s.r.d.c
    public /* bridge */ /* synthetic */ boolean a(Integer num) {
        return c(num.intValue());
    }

    @Override // com.seewo.ota.v.s.r.d.c
    public boolean b(String str, String str2) throws IllegalArgumentException {
        String value;
        String strH;
        String value2;
        String strH2;
        k.e(str, "localVersion");
        k.e(str2, "remoteVersion");
        f fVarB = h.b(this.f2446b, str, 0, 2, null);
        if (fVarB == null || (value = fVarB.getValue()) == null || (strH = s.h(value, "-", "", false, 4, null)) == null) {
            throw new IllegalArgumentException("localVersion=" + str + " is not match");
        }
        f fVarB2 = h.b(this.f2446b, str2, 0, 2, null);
        if (fVarB2 == null || (value2 = fVarB2.getValue()) == null || (strH2 = s.h(value2, "-", "", false, 4, null)) == null) {
            throw new IllegalArgumentException("remoteVersion=" + str2 + " is not match");
        }
        long j2 = Long.parseLong(strH);
        long j3 = Long.parseLong(strH2);
        Log.d("CvteCameraVersionComparator", "compareVersion: localDate=" + j2 + ", remoteDate=" + j3);
        return j2 < j3;
    }

    public boolean c(int i2) {
        return this.a.contains(Integer.valueOf(i2));
    }
}
