63 lines
2.1 KiB
Java
63 lines
2.1 KiB
Java
package com.kofax.mobile.sdk.x;
|
|
|
|
import android.graphics.Bitmap;
|
|
import android.graphics.Matrix;
|
|
import com.kofax.kmc.ken.engines.data.Image;
|
|
import com.kofax.mobile.sdk._internal.g;
|
|
import com.kofax.mobile.sdk.extract.id.DataField;
|
|
import com.kofax.mobile.sdk.w.ac;
|
|
import java.util.List;
|
|
import o.InterfaceC13391fZD;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public class q implements ac.a {
|
|
private static final String QT = "Mexico (MEX) Voter Identification Card (2004) - Back (Vertical)";
|
|
private static final String QU = "Mexico (MEX) Voter Identification Card (2004) - Back";
|
|
private Image QV = null;
|
|
private final com.kofax.mobile.sdk._internal.extraction.id.c Qk;
|
|
|
|
@InterfaceC13391fZD
|
|
public q(com.kofax.mobile.sdk._internal.extraction.id.c cVar) {
|
|
this.Qk = cVar;
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk.w.ac.a
|
|
public String e(com.kofax.mobile.sdk.e.a aVar) {
|
|
return aVar.ht();
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk.w.ac.a
|
|
public String f(com.kofax.mobile.sdk.e.a aVar) {
|
|
if (aVar.hw() != null) {
|
|
return QT;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk.w.ac.a
|
|
public Image g(com.kofax.mobile.sdk.e.a aVar) {
|
|
g.a aVar2;
|
|
com.kofax.mobile.sdk.c.a hw = aVar.hw();
|
|
if (!QU.equals(hw != null ? hw.getClassId() : null) || (aVar2 = aVar.hs().NX) == null) {
|
|
return null;
|
|
}
|
|
Bitmap bitmap = aVar2.getBitmap();
|
|
Matrix matrix = new Matrix();
|
|
matrix.postRotate(90.0f);
|
|
Image image = new Image(Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true));
|
|
this.QV = image;
|
|
return image;
|
|
}
|
|
|
|
@Override // com.kofax.mobile.sdk.w.ac.a
|
|
public void c(com.kofax.mobile.sdk.e.a aVar, List<DataField> list, Exception exc) {
|
|
aVar.b(exc);
|
|
aVar.o((aVar.hs().originalImage == null || list == null || list.size() <= 0) ? false : true);
|
|
aVar.c(this.Qk.a(aVar.hy(), list));
|
|
Image image = this.QV;
|
|
if (image != null) {
|
|
image.imageClearBitmap();
|
|
}
|
|
}
|
|
}
|