23 lines
647 B
Java
23 lines
647 B
Java
package com.google.zxing.client.result;
|
|
|
|
import com.google.zxing.BarcodeFormat;
|
|
import com.google.zxing.Result;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class ISBNResultParser extends ResultParser {
|
|
@Override // com.google.zxing.client.result.ResultParser
|
|
public ISBNParsedResult a(Result result) {
|
|
if (result.a() != BarcodeFormat.EAN_13) {
|
|
return null;
|
|
}
|
|
String b = ResultParser.b(result);
|
|
if (b.length() != 13) {
|
|
return null;
|
|
}
|
|
if (b.startsWith("978") || b.startsWith("979")) {
|
|
return new ISBNParsedResult(b);
|
|
}
|
|
return null;
|
|
}
|
|
}
|