MT Manager v2.15.3版本的 MD5 值为:1cbd6ee7afdac97645dd3a8c4751ecf0
以下内容为反编译后的 C7018.java 源代码,内容仅作参考
package l;
import android.annotation.SuppressLint;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import bin.mt.plus.Main;
import bin.mt.plus.R;
import com.google.android.material.textfield.TextInputLayout;
import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
public final class C7018 extends AbstractC11597 {
public int f22044;
public String f22045;
public String f22046;
public String f22047;
public String f22048;
public String f22049;
public String f22050;
@Override
public final String getName() {
return this.f22045;
}
@Override
public final void mo6215(String str) {
this.f22050 = str;
}
@Override
public final String mo6217() {
return "SMB";
}
public C7018(int i) {
super(i);
this.f22049 = "";
this.f22044 = 445;
this.f22046 = "";
this.f22047 = "";
this.f22048 = "";
this.f22050 = "";
this.f22045 = "";
}
public C7018(C4096 c4096) {
super(c4096);
this.f22049 = "";
this.f22044 = 445;
this.f22046 = "";
this.f22047 = "";
this.f22048 = "";
this.f22050 = "";
this.f22045 = "";
this.f22049 = c4096.m10851("1");
this.f22044 = c4096.m10847("2");
this.f22046 = c4096.m10851("3");
this.f22047 = c4096.m10851("4");
this.f22048 = c4096.m10851("5");
this.f22050 = c4096.m10851("6");
this.f22045 = c4096.m10851("7");
this.f34795 = c4096.m10849("8") && c4096.m10848("8");
this.f34796 = c4096.m10849("9") && c4096.m10848("9");
}
@Override
public final String mo6212() {
StringBuilder sb = new StringBuilder("smb://");
sb.append(this.f22047);
if (!TextUtils.isEmpty(this.f22046)) {
sb.append(":");
sb.append(this.f22046);
}
sb.append("@");
sb.append(this.f22049);
if (this.f22044 != 445) {
sb.append(":");
sb.append(this.f22044);
}
return sb.toString();
}
@Override
public final C4096 mo6211() {
C4096 mo6211 = super.mo6211();
mo6211.m10845(this.f22049, "1");
mo6211.m10845(Integer.valueOf(this.f22044), "2");
mo6211.m10845(this.f22046, "3");
mo6211.m10845(this.f22047, "4");
mo6211.m10845(this.f22048, "5");
mo6211.m10845(this.f22050, "6");
mo6211.m10845(this.f22045, "7");
mo6211.m10846("8", this.f34795);
mo6211.m10846("9", this.f34796);
return mo6211;
}
@Override
public final String mo6218() {
String str = "smb://" + this.f22047 + "@" + this.f22049;
return str.endsWith("/") ? C13737.m29208(str, 1, 0) : str;
}
@Override
public final void mo6216(AbstractC11597 abstractC11597) {
if (abstractC11597 instanceof C7018) {
C7018 c7018 = (C7018) abstractC11597;
this.f22049 = c7018.f22049;
this.f22044 = c7018.f22044;
this.f22046 = c7018.f22046;
this.f22047 = c7018.f22047;
this.f22048 = c7018.f22048;
this.f22050 = c7018.f22050;
this.f22045 = c7018.f22045;
this.f34795 = c7018.f34795;
this.f34796 = c7018.f34796;
}
}
@Override
public final AbstractC7526 mo6213(int i) {
return new C7112(i, clone());
}
public static InterfaceC14570 m17335(String str, String str2, String str3) {
if (TextUtils.isEmpty(str2) && TextUtils.isEmpty(str3)) {
return C1283.m4450().mo15994();
}
if (!str2.equals("guest") || !TextUtils.isEmpty(str3)) {
C1139 c1139 = new C1139(str, str2, str3);
C1283 m4450 = C1283.m4450();
m4450.getClass();
return new C6337(m4450, c1139);
}
return C1283.m4450().m25822();
}
@Override
public final C1538 getIcon() {
return C1538.f5650;
}
@Override
public final String mo6210() {
return C11446.m25432(new StringBuilder("smb@"), this.f22045, " ");
}
@Override
public final void mo6214(Main main) {
m17337(main, this);
}
public static void m17336(AbstractActivityC0566 abstractActivityC0566) {
m17337(abstractActivityC0566, new C7018(-1));
}
@SuppressLint({"SetTextI18n"})
public static void m17337(final AbstractActivityC0566 abstractActivityC0566, C7018 c7018) {
View m2103 = abstractActivityC0566.m2103(R.layout.MT_Protector_res_0x7f0c00cc);
TextView textView = (TextView) m2103.findViewById(R.id.MT_Protector_res_0x7f090480);
final EditText editText = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f0901b7);
final EditText editText2 = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f090328);
final EditText editText3 = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f090117);
final EditText editText4 = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f0904b2);
final EditText editText5 = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f090315);
final EditText editText6 = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f090362);
final EditText editText7 = (EditText) m2103.findViewById(R.id.MT_Protector_res_0x7f090361);
final C1556 c1556 = (C1556) m2103.findViewById(R.id.MT_Protector_res_0x7f0901b0);
final C1556 c15562 = (C1556) m2103.findViewById(R.id.MT_Protector_res_0x7f0902d8);
c15562.setOnCheckedChangeListener(new Object());
((TextInputLayout) m2103.findViewById(R.id.MT_Protector_res_0x7f090431)).setEndIconOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
final EditText editText8 = editText2;
final EditText editText9 = editText7;
final EditText editText10 = editText;
final ?? r9 = new InterfaceC5117() {
@Override
public final void accept(Object obj) {
C1963 c1963 = (C1963) obj;
editText10.setText(c1963.m5995());
editText8.setText(String.valueOf(c1963.m5996()));
editText9.setText(c1963.m5997());
}
};
AbstractActivityC0566 abstractActivityC05662 = AbstractActivityC0566.this;
View m21032 = abstractActivityC05662.m2103(R.layout.MT_Protector_res_0x7f0c00b4);
TextView textView2 = (TextView) m21032.findViewById(R.id.MT_Protector_res_0x7f090480);
textView2.setText(R.string.MT_Protector_res_0x7f110622);
final ProgressBar progressBar = (ProgressBar) m21032.findViewById(R.id.MT_Protector_res_0x7f090336);
progressBar.setVisibility(0);
ListView listView = (ListView) m21032.findViewById(R.id.MT_Protector_res_0x7f0901ff);
C13804.m29313(listView);
final ?? baseAdapter = new BaseAdapter();
baseAdapter.f38331 = Collections.emptyList();
baseAdapter.f38330 = textView2.getPaddingLeft();
baseAdapter.f38332 = C8799.m20674(8.0f);
String str = null;
listView.setDivider(null);
listView.setAdapter((ListAdapter) baseAdapter);
C10547 mo2087 = abstractActivityC05662.mo2087();
mo2087.m23856(m21032);
mo2087.m23849(R.string.MT_Protector_res_0x7f110131, null);
mo2087.m23867();
final DialogInterfaceC2124 m23865 = mo2087.m23865();
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public final void onItemClick(AdapterView adapterView, View view2, int i, long j) {
r9.accept((C1963) baseAdapter.f38331.get(i));
m23865.dismiss();
}
});
final C0279 c0279 = new C0279(m23865);
m23865.m6390(abstractActivityC05662, c0279.f1295, new InterfaceC15160() {
@Override
public final void mo984(Object obj) {
List list = (List) obj;
if (list == null) {
list = Collections.emptyList();
}
boolean isEmpty = list.isEmpty();
ProgressBar progressBar2 = progressBar;
if (isEmpty) {
progressBar2.setVisibility(0);
} else {
progressBar2.setVisibility(8);
}
C12912 c12912 = baseAdapter;
c12912.f38331 = list;
c12912.notifyDataSetChanged();
}
});
C10249.f30507.execute(new Runnable() {
@Override
public final void run() {
C0279 c02792 = C0279.this;
try {
C9092 c9092 = new C9092();
try {
c9092.m21165(new C14596(c02792));
System.out.println("jmdns listener start");
while (true) {
DialogInterfaceC2124 dialogInterfaceC2124 = (DialogInterfaceC2124) c02792.f1291.get();
if (dialogInterfaceC2124 == null || !dialogInterfaceC2124.m6396()) {
break;
} else {
SystemClock.sleep(100L);
}
}
System.out.println("jmdns listener end");
c9092.close();
} finally {
}
} catch (IOException unused) {
}
}
});
try {
Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
loop0: while (true) {
if (!networkInterfaces.hasMoreElements()) {
break;
}
Enumeration<InetAddress> inetAddresses = networkInterfaces.nextElement().getInetAddresses();
while (inetAddresses.hasMoreElements()) {
InetAddress nextElement = inetAddresses.nextElement();
if (!(nextElement instanceof Inet6Address)) {
String hostAddress = nextElement.getHostAddress();
if (!"127.0.0.1".equals(hostAddress)) {
str = hostAddress;
break loop0;
}
}
}
}
} catch (SocketException unused) {
}
if (str == null) {
return;
}
final String substring = str.substring(0, str.lastIndexOf(".") + 1);
final AtomicInteger atomicInteger = new AtomicInteger(2);
final ?? r2 = new Runnable() {
@Override
public final void run() {
C11228.m25012(C0279.this, atomicInteger, substring);
}
};
C10249.f30507.execute(new Runnable() {
@Override
public final void run() {
for (int i = 0; i < 32; i++) {
C10249.f30507.execute(r2);
SystemClock.sleep(50L);
}
}
});
}
});
textView.setText(C1578.m5304(c7018.f34794 == -1 ? R.string.MT_Protector_res_0x7f1103f4 : R.string.MT_Protector_res_0x7f110229).concat(" SMB"));
editText.setText(c7018.f22049);
editText2.setText(String.valueOf(c7018.f22044));
editText3.setText(c7018.f22046);
editText4.setText(c7018.f22047);
editText5.setText(c7018.f22048);
editText6.setText(c7018.f22050);
editText7.setText(c7018.f22045);
c1556.setChecked(c7018.f34795);
c15562.setChecked(c7018.f34796);
AbstractC11597.m25678(editText, editText7, new C6175(0, editText3));
AbstractC11597.m25678(editText3, editText7, new C8244(2, editText));
C10547 mo2087 = abstractActivityC0566.mo2087();
mo2087.m23856(m2103);
mo2087.m23849(R.string.MT_Protector_res_0x7f110439, null);
DialogInterfaceC2124 m25433 = C11446.m25433(mo2087, R.string.MT_Protector_res_0x7f11010c, null, R.string.MT_Protector_res_0x7f1104c9, null);
C1578.m5297(editText);
final ?? r1 = new InterfaceC2590() {
@Override
public final Object get() {
return C7018.m17334(editText, editText2, editText3, editText4, editText5, editText6, editText7, c1556, c15562);
}
};
m25433.m6382().setOnClickListener(new ViewOnClickListenerC6172(1, r1, c7018, m25433));
m25433.m6381().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
C7018 c70182 = (C7018) r1.get();
if (c70182 == null) {
return;
}
new C12070(abstractActivityC0566, c70182, editText4).m19052();
}
});
}
public static C7018 m17334(EditText editText, EditText editText2, EditText editText3, EditText editText4, EditText editText5, EditText editText6, EditText editText7, C1556 c1556, C1556 c15562) {
int i;
if (!AbstractC11597.m25683(editText)) {
return null;
}
C7018 c7018 = new C7018(-1);
c7018.f22049 = editText.getText().toString();
try {
i = Integer.parseInt(editText2.getText().toString());
} catch (NumberFormatException unused) {
i = 445;
}
c7018.f22044 = i;
c7018.f22046 = editText3.getText().toString();
c7018.f22047 = editText4.getText().toString();
c7018.f22048 = editText5.getText().toString();
c7018.f22050 = editText6.getText().toString();
c7018.f22045 = AbstractC11597.m25676(editText7, TextUtils.isEmpty(c7018.f22046) ? c7018.f22049 : c7018.f22046);
c7018.f34795 = c1556.isChecked();
c7018.f34796 = c15562.isChecked();
return c7018;
}
public static void m17338(InterfaceC2590 interfaceC2590, C7018 c7018, DialogInterfaceC2124 dialogInterfaceC2124) {
C7018 c70182 = (C7018) interfaceC2590.get();
if (c70182 == null) {
return;
}
if (c7018.f34794 == -1) {
C7018 c70183 = new C7018(AbstractC11597.m25684());
c70183.mo6216(c70182);
C5044.m13142(c70183);
} else {
c7018.mo6216(c70182);
C5044.m13146();
}
dialogInterfaceC2124.dismiss();
}
}