Rabbit-R1/android (non root)/java/sources/com/google/zxing/client/result/SMTPResultParser.java
2024-05-21 17:08:36 -04:00

35 lines
1.2 KiB
Java

package com.google.zxing.client.result;
import com.google.zxing.Result;
/* loaded from: classes3.dex */
public final class SMTPResultParser extends ResultParser {
@Override // com.google.zxing.client.result.ResultParser
public EmailAddressParsedResult parse(Result result) {
String str;
String str2;
String massagedText = getMassagedText(result);
if (!massagedText.startsWith("smtp:") && !massagedText.startsWith("SMTP:")) {
return null;
}
String substring = massagedText.substring(5);
int indexOf = substring.indexOf(58);
if (indexOf >= 0) {
String substring2 = substring.substring(indexOf + 1);
substring = substring.substring(0, indexOf);
int indexOf2 = substring2.indexOf(58);
if (indexOf2 >= 0) {
String substring3 = substring2.substring(indexOf2 + 1);
str = substring2.substring(0, indexOf2);
str2 = substring3;
} else {
str2 = null;
str = substring2;
}
} else {
str = null;
str2 = null;
}
return new EmailAddressParsedResult(new String[]{substring}, null, null, str, str2);
}
}