正在查看: Minits v4.9.3.32 应用的 GmsDocumentScanningDelegateActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 GmsDocumentScanningDelegateActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.google.mlkit.vision.documentscanner.internal;
import B6.d;
import C6.f;
import W3.A5;
import W3.C1128d5;
import W3.C1131d8;
import W3.C1151f8;
import W3.C1161g8;
import W3.C1187j6;
import W3.EnumC1320y5;
import W3.EnumC1329z5;
import W3.o8;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.os.SystemClock;
import android.util.Log;
import androidx.activity.ComponentActivity;
import androidx.activity.result.b;
import androidx.activity.result.c;
import com.google.mlkit.vision.documentscanner.internal.GmsDocumentScanningDelegateActivity;
import e.C1983c;
import java.util.List;
import m4.InterfaceC2557g;
import m4.InterfaceC2558h;
import s6.C3069i;
public class GmsDocumentScanningDelegateActivity extends ComponentActivity {
public final C1131d8 f17882l = o8.b("play-services-mlkit-document-scanner");
public final C1151f8 f17883m = C1151f8.a(C3069i.c().b());
public C1128d5 f17884n;
public long f17885o;
public long f17886p;
public static Intent Z(Context context, Intent intent) {
Intent action = new Intent().setPackage("com.google.android.gms").setAction("com.google.android.gms.mlkit.ACTION_SCAN_DOCUMENT");
ApplicationInfo applicationInfo = context.getApplicationInfo();
int i8 = applicationInfo.labelRes;
return action.putExtra("string_extra_calling_app_name", i8 != 0 ? context.getString(i8) : context.getPackageManager().getApplicationLabel(applicationInfo).toString()).putExtras(intent).setFlags(1);
}
public final void b0(d dVar) {
if (dVar == null) {
e0();
return;
}
Intent intent = new Intent();
intent.putExtra("extra_scanning_result", dVar);
setResult(-1, intent);
List b8 = dVar.b();
d.b c8 = dVar.c();
f0(EnumC1320y5.NO_ERROR, b8 != null ? b8.size() : c8 != null ? c8.a() : 0);
finish();
}
public final void d0(Exception exc) {
if (Log.isLoggable("GmsDocScanDelAct", 6)) {
Log.e("GmsDocScanDelAct", "Failed to handle scanning result", exc);
}
e0();
}
public final void e0() {
setResult(0);
f0(EnumC1320y5.CANCELLED, 0);
finish();
}
public final void f0(EnumC1320y5 enumC1320y5, int i8) {
long elapsedRealtime = SystemClock.elapsedRealtime();
long currentTimeMillis = System.currentTimeMillis();
A5 a52 = new A5();
C1187j6 c1187j6 = new C1187j6();
c1187j6.c(Long.valueOf(elapsedRealtime - this.f17885o));
c1187j6.d(enumC1320y5);
c1187j6.e(this.f17884n);
c1187j6.f(Integer.valueOf(i8));
a52.d(c1187j6.g());
this.f17882l.c(C1161g8.e(a52), EnumC1329z5.ON_DEVICE_DOCUMENT_SCANNER_UI_FINISH);
this.f17883m.c(24335, enumC1320y5.zza(), this.f17886p, currentTimeMillis);
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
this.f17884n = f.a(getIntent());
c registerForActivityResult = registerForActivityResult(new C1983c(), new b() {
@Override
public final void a(Object obj) {
final GmsDocumentScanningDelegateActivity gmsDocumentScanningDelegateActivity = GmsDocumentScanningDelegateActivity.this;
androidx.activity.result.a aVar = (androidx.activity.result.a) obj;
h.c(gmsDocumentScanningDelegateActivity.getApplicationContext()).b(aVar.b(), aVar.a()).g(new InterfaceC2558h() {
@Override
public final void a(Object obj2) {
GmsDocumentScanningDelegateActivity.this.b0((B6.d) obj2);
}
}).e(new InterfaceC2557g() {
@Override
public final void d(Exception exc) {
GmsDocumentScanningDelegateActivity.this.d0(exc);
}
});
}
});
if (bundle != null) {
this.f17885o = bundle.getLong("elapsedStartTimeMsKey");
this.f17886p = bundle.getLong("epochStartTimeMsKey");
return;
}
this.f17885o = SystemClock.elapsedRealtime();
this.f17886p = System.currentTimeMillis();
C1131d8 c1131d8 = this.f17882l;
A5 a52 = new A5();
C1187j6 c1187j6 = new C1187j6();
c1187j6.e(this.f17884n);
a52.e(c1187j6.g());
c1131d8.c(C1161g8.e(a52), EnumC1329z5.ON_DEVICE_DOCUMENT_SCANNER_UI_START);
registerForActivityResult.a(Z(this, getIntent()));
}
@Override
public final void onSaveInstanceState(Bundle bundle) {
super.onSaveInstanceState(bundle);
bundle.putLong("elapsedStartTimeMsKey", this.f17885o);
bundle.putLong("epochStartTimeMsKey", this.f17886p);
}
}