正在查看: Minits v4.9.3.32 应用的 DatabaseFileViewerActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Minits v4.9.3.32 应用的 DatabaseFileViewerActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.xone.android.browser.activities;
import O1.e;
import aa.k;
import aa.l;
import android.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.xone.android.browser.activities.DatabaseFileViewerActivity;
import com.xone.android.utils.Utils;
import eb.a;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import n.P;
import o7.b;
import o7.d;
import p7.AbstractActivityC2812n;
import s7.c;
import s7.h;
public final class DatabaseFileViewerActivity extends AbstractActivityC2812n implements e {
public c f17898m;
public File f17899n;
public k f17900o;
public boolean f17901p;
public void P0(View view) {
finish();
}
public static void U0(Activity activity, r7.e eVar) {
File c8 = eVar.c();
String l8 = eVar.l();
Intent intent = new Intent(activity, (Class<?>) DatabaseFileViewerActivity.class);
intent.putExtra("file", c8);
intent.putExtra("password", l8);
intent.putExtra("readOnly", true);
activity.startActivity(intent);
}
public final boolean Q0(MenuItem menuItem) {
try {
int itemId = menuItem.getItemId();
if (itemId == 1) {
Utils.g4(this, "Integrity check: " + this.f17900o.F());
} else if (itemId == 2) {
Utils.g4(this, "Version: " + this.f17900o.u());
}
return true;
} catch (Exception e8) {
b(e8);
return true;
}
}
public final void R0(ImageButton imageButton, View view) {
P p8 = new P(this, imageButton);
p8.c(48);
Menu b8 = p8.b();
b8.add(0, 1, 0, d.f22801n);
b8.add(0, 2, 0, d.f22802o);
p8.d(new P.c() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
boolean Q02;
Q02 = DatabaseFileViewerActivity.this.Q0(menuItem);
return Q02;
}
});
p8.e();
}
public final void S0(DialogInterface dialogInterface, int i8) {
finish();
}
public final void T0(EditText editText, AlertDialog alertDialog, View view) {
Editable text = editText.getText();
if (TextUtils.isEmpty(text)) {
Utils.d4(this, d.f22780E);
} else {
alertDialog.dismiss();
V0(text.toString());
}
}
public final void V0(String str) {
k W02 = W0(this.f17899n, str);
this.f17900o = W02;
new h(this.f17898m, W02, null).runSerially();
}
public final k W0(File file, String str) {
return new k.a().d(file).h(str).e(true).g(this.f17901p).f(new l() {
public final void a(aa.k kVar) {
Utils.l("XOneAndroidFramework", "Database corruption detected: " + kVar.r());
}
}).a();
}
public final void X0() {
final EditText editText = new EditText(this);
editText.setInputType(128);
AlertDialog.Builder g8 = a.g(this);
g8.setIcon(R.drawable.ic_dialog_alert);
g8.setTitle(d.f22798k);
g8.setView(editText);
g8.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i8) {
DatabaseFileViewerActivity.this.S0(dialogInterface, i8);
}
});
g8.setPositiveButton(R.string.ok, (DialogInterface.OnClickListener) null);
g8.setCancelable(false);
final AlertDialog show = g8.show();
show.getButton(-1).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
DatabaseFileViewerActivity.this.T0(editText, show, view);
}
});
TextView textView = (TextView) show.findViewById(R.id.message);
if (textView != null) {
textView.setTypeface(p0());
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(o7.c.f22772b);
try {
TextView textView = (TextView) findViewById(b.f22749d);
((ImageButton) findViewById(b.f22747b)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
DatabaseFileViewerActivity.this.P0(view);
}
});
final ImageButton imageButton = (ImageButton) findViewById(b.f22748c);
imageButton.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
DatabaseFileViewerActivity.this.R0(imageButton, view);
}
});
RecyclerView recyclerView = (RecyclerView) findViewById(b.f22746a);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
c cVar = new c(this, this);
this.f17898m = cVar;
recyclerView.setAdapter(cVar);
Intent intent = getIntent();
this.f17899n = (File) fb.k.p(intent, "file", (Serializable) null);
this.f17901p = fb.k.c(intent, "readOnly", true);
File file = this.f17899n;
if (file == null) {
throw new IOException("Database file viewer invoked without a file");
}
String name = file.getName();
boolean i8 = aa.e.i(this.f17899n);
String str = "";
if (!i8) {
name = name + " (" + getString(d.f22797j) + ")";
str = fb.k.t(intent, "password", "");
}
textView.setText(name);
if (i8 || !TextUtils.isEmpty(str)) {
V0(str);
} else {
X0();
}
} catch (IOException e8) {
J(e8, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i9) {
DatabaseFileViewerActivity.this.w0(dialogInterface, i9);
}
});
}
}
@Override
public void y(O1.h hVar) {
if (hVar.t()) {
this.f17898m.L(hVar);
} else {
if (hVar.e() > 1) {
return;
}
new h(this.f17898m, this.f17900o, hVar).runSerially();
}
}
}