mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
22 lines
723 B
Java
22 lines
723 B
Java
package com.google.zxing.client.result;
|
|
|
|
import com.google.zxing.BarcodeFormat;
|
|
import com.google.zxing.Result;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class ISBNResultParser extends ResultParser {
|
|
@Override // com.google.zxing.client.result.ResultParser
|
|
public ISBNParsedResult parse(Result result) {
|
|
if (result.getBarcodeFormat() != BarcodeFormat.EAN_13) {
|
|
return null;
|
|
}
|
|
String massagedText = getMassagedText(result);
|
|
if (massagedText.length() != 13) {
|
|
return null;
|
|
}
|
|
if (massagedText.startsWith("978") || massagedText.startsWith("979")) {
|
|
return new ISBNParsedResult(massagedText);
|
|
}
|
|
return null;
|
|
}
|
|
}
|