|
@@ -1,7 +1,5 @@
|
|
package com.epson.mobilephone.common.wifidirect;
|
|
package com.epson.mobilephone.common.wifidirect;
|
|
|
|
|
|
-import android.arch.lifecycle.Observer;
|
|
|
|
-import android.arch.lifecycle.ViewModelProviders;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
@@ -13,16 +11,17 @@ import android.os.Build;
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
import android.os.Message;
|
|
import android.os.Message;
|
|
-
|
|
|
|
-
|
|
|
|
-import android.support.p000v4.app.FragmentActivity;
|
|
|
|
import android.widget.Toast;
|
|
import android.widget.Toast;
|
|
|
|
|
|
-import com.epson.mobilephone.common.wifidirect.ActivityConnectBase;
|
|
|
|
-import com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect;
|
|
|
|
|
|
+import androidx.annotation.Nullable;
|
|
|
|
+import androidx.fragment.app.DialogFragment;
|
|
|
|
+import androidx.lifecycle.Observer;
|
|
|
|
+import androidx.lifecycle.ViewModelProviders;
|
|
|
|
|
|
import java.util.Deque;
|
|
import java.util.Deque;
|
|
|
|
|
|
|
|
+import epson.print.R;
|
|
|
|
+
|
|
public class ActivityConnectSimpleAP extends ActivityConnectBase implements DialogProgressWiFiDirect.DialogButtonClick {
|
|
public class ActivityConnectSimpleAP extends ActivityConnectBase implements DialogProgressWiFiDirect.DialogButtonClick {
|
|
private static final int DELAY_CONNECTED_WIFI = 1000;
|
|
private static final int DELAY_CONNECTED_WIFI = 1000;
|
|
private static final String IDD_WIFI_ERROR = "idd_wifi_error";
|
|
private static final String IDD_WIFI_ERROR = "idd_wifi_error";
|
|
@@ -38,20 +37,21 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
private static final String TAG = "ActivityConnectSimpleAP";
|
|
private static final String TAG = "ActivityConnectSimpleAP";
|
|
private int connectingNetworkId = -1;
|
|
private int connectingNetworkId = -1;
|
|
boolean createSimpleAP = false;
|
|
boolean createSimpleAP = false;
|
|
|
|
+
|
|
Handler mHandler = new Handler() {
|
|
Handler mHandler = new Handler() {
|
|
public void handleMessage(Message message) {
|
|
public void handleMessage(Message message) {
|
|
super.handleMessage(message);
|
|
super.handleMessage(message);
|
|
- switch (C10874.f150x55760faf[ActivityConnectSimpleAP.this.status.ordinal()]) {
|
|
|
|
|
|
+ switch (C10874.f150x55760faf[status.ordinal()]) {
|
|
case 1:
|
|
case 1:
|
|
if (message.what == 11) {
|
|
if (message.what == 11) {
|
|
- if (Build.VERSION.SDK_INT > 25 && !ActivityConnectSimpleAP.this.createSimpleAP) {
|
|
|
|
- ActivityConnectSimpleAP.mModelDialog.doShow(ActivityConnectSimpleAP.IDD_WIFI_SIMPLEAP);
|
|
|
|
|
|
+ if (Build.VERSION.SDK_INT > 25 && !createSimpleAP) {
|
|
|
|
+ mModelDialog.doShow(IDD_WIFI_SIMPLEAP);
|
|
return;
|
|
return;
|
|
- } else if (!ActivityConnectSimpleAP.mWifiManager.isWifiEnabled()) {
|
|
|
|
- ActivityConnectSimpleAP.this.startActivityForResult(new Intent(ActivityConnectSimpleAP.this, ActivityControlWiFi.class), 1);
|
|
|
|
|
|
+ } else if (!mWifiManager.isWifiEnabled()) {
|
|
|
|
+ startActivityForResult(new Intent(ActivityConnectSimpleAP.this, ActivityControlWiFi.class), 1);
|
|
return;
|
|
return;
|
|
} else {
|
|
} else {
|
|
- ActivityConnectSimpleAP.this.onEnabledWifi();
|
|
|
|
|
|
+ onEnabledWifi();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -62,25 +62,25 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
Bundle data = message.getData();
|
|
Bundle data = message.getData();
|
|
if (data != null && !data.isEmpty()) {
|
|
if (data != null && !data.isEmpty()) {
|
|
String removeSSIDPrefix = WiFiControl.removeSSIDPrefix(data.getString("ssid"));
|
|
String removeSSIDPrefix = WiFiControl.removeSSIDPrefix(data.getString("ssid"));
|
|
- if (ActivityConnectSimpleAP.this.targetSsid.equals(removeSSIDPrefix)) {
|
|
|
|
- if (ActivityConnectSimpleAP.this.searchWiFiDirectPrinter != null) {
|
|
|
|
- ActivityConnectSimpleAP.this.searchWiFiDirectPrinter.interrupt();
|
|
|
|
- ActivityConnectSimpleAP.this.searchWiFiDirectPrinter = null;
|
|
|
|
|
|
+ if (targetSsid.equals(removeSSIDPrefix)) {
|
|
|
|
+ if (searchWiFiDirectPrinter != null) {
|
|
|
|
+ searchWiFiDirectPrinter.interrupt();
|
|
|
|
+ searchWiFiDirectPrinter = null;
|
|
}
|
|
}
|
|
- int unused = ActivityConnectSimpleAP.this.connectingNetworkId = data.getInt("id");
|
|
|
|
- if (WiFiUtils.getInstance(ActivityConnectSimpleAP.this).enableSimpleAP(ActivityConnectSimpleAP.this.connectingNetworkId, removeSSIDPrefix)) {
|
|
|
|
- ActivityConnectSimpleAP.this.status = ActivityConnectBase.Status.WIFI_CONNECTING;
|
|
|
|
- ActivityConnectSimpleAP.this.setupObserver();
|
|
|
|
|
|
+ int unused = connectingNetworkId = data.getInt("id");
|
|
|
|
+ if (WiFiUtils.getInstance(ActivityConnectSimpleAP.this).enableSimpleAP(connectingNetworkId, removeSSIDPrefix)) {
|
|
|
|
+ status = ActivityConnectBase.Status.WIFI_CONNECTING;
|
|
|
|
+ setupObserver();
|
|
break;
|
|
break;
|
|
} else {
|
|
} else {
|
|
- ActivityConnectSimpleAP.this.onError();
|
|
|
|
|
|
+ onError();
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- EPLog.m87e(ActivityConnectSimpleAP.TAG, "Not Found Network");
|
|
|
|
- ActivityConnectSimpleAP.this.status = ActivityConnectBase.Status.IDLE;
|
|
|
|
- ActivityConnectSimpleAP.this.onError();
|
|
|
|
|
|
+ EPLog.e(TAG, "Not Found Network");
|
|
|
|
+ status = ActivityConnectBase.Status.IDLE;
|
|
|
|
+ onError();
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -96,22 +96,22 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
String string2 = data2.getString(escprLib.PRINTER_IP);
|
|
String string2 = data2.getString(escprLib.PRINTER_IP);
|
|
String string3 = data2.getString("id");
|
|
String string3 = data2.getString("id");
|
|
if (string != null && string2 != null && string3 != null) {
|
|
if (string != null && string2 != null && string3 != null) {
|
|
- EPLog.m88i(ActivityConnectSimpleAP.TAG, "epsWrapperFindPrinter Success");
|
|
|
|
- if (!ActivityConnectSimpleAP.this.expectedPrtMacAddr.equals(MacAddrUtils.getMacAddressFromPrinterId(string3))) {
|
|
|
|
- EPLog.m88i(ActivityConnectSimpleAP.TAG, "This Printer is not expected " + string);
|
|
|
|
|
|
+ EPLog.i(TAG, "epsWrapperFindPrinter Success");
|
|
|
|
+ if (!expectedPrtMacAddr.equals(MacAddrUtils.getMacAddressFromPrinterId(string3))) {
|
|
|
|
+ EPLog.i(TAG, "This Printer is not expected " + string);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- ActivityConnectSimpleAP.this.interruptFindingPrinter();
|
|
|
|
|
|
+ interruptFindingPrinter();
|
|
Intent intent = new Intent();
|
|
Intent intent = new Intent();
|
|
intent.putExtras(data2);
|
|
intent.putExtras(data2);
|
|
- ActivityConnectSimpleAP.this.onConnectedPrinter(intent);
|
|
|
|
|
|
+ onConnectedPrinter(intent);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
case 2:
|
|
case 2:
|
|
- ActivityConnectSimpleAP.this.onError();
|
|
|
|
|
|
+ onError();
|
|
return;
|
|
return;
|
|
default:
|
|
default:
|
|
return;
|
|
return;
|
|
@@ -120,8 +120,8 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (message.what == 10) {
|
|
if (message.what == 10) {
|
|
- ActivityConnectSimpleAP.this.status = ActivityConnectBase.Status.WIFI_CONNECTED;
|
|
|
|
- ActivityConnectSimpleAP.this.onConnectedWiFi();
|
|
|
|
|
|
+ status = ActivityConnectBase.Status.WIFI_CONNECTED;
|
|
|
|
+ onConnectedWiFi();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -136,26 +136,26 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
public void onNeutralClick(String str) {
|
|
public void onNeutralClick(String str) {
|
|
}
|
|
}
|
|
|
|
|
|
- static /* synthetic */ int access$408(ActivityConnectSimpleAP activityConnectSimpleAP) {
|
|
|
|
- int i = activityConnectSimpleAP.retryConnecting;
|
|
|
|
- activityConnectSimpleAP.retryConnecting = i + 1;
|
|
|
|
|
|
+ static /* synthetic */ int access(ActivityConnectSimpleAP activityConnectSimpleAP) {
|
|
|
|
+ int i = retryConnecting;
|
|
|
|
+ retryConnecting = i + 1;
|
|
return i;
|
|
return i;
|
|
}
|
|
}
|
|
|
|
|
|
protected void onCreate(Bundle bundle) {
|
|
protected void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
super.onCreate(bundle);
|
|
- mModelDialog = (DialogProgressWiFiDirectViewModel) ViewModelProviders.m2of((FragmentActivity) this).get(DialogProgressWiFiDirectViewModel.class);
|
|
|
|
|
|
+ mModelDialog = (DialogProgressWiFiDirectViewModel) ViewModelProviders.of(ActivityConnectSimpleAP.this).get(DialogProgressWiFiDirectViewModel.class);
|
|
mModelDialog.getDialogJob().observe(this, new Observer<Deque<String[]>>() {
|
|
mModelDialog.getDialogJob().observe(this, new Observer<Deque<String[]>>() {
|
|
public void onChanged(@Nullable Deque<String[]> deque) {
|
|
public void onChanged(@Nullable Deque<String[]> deque) {
|
|
- String[] checkQueue = ActivityConnectSimpleAP.mModelDialog.checkQueue();
|
|
|
|
|
|
+ String[] checkQueue = mModelDialog.checkQueue();
|
|
if (checkQueue != null) {
|
|
if (checkQueue != null) {
|
|
String str = checkQueue[0];
|
|
String str = checkQueue[0];
|
|
String str2 = checkQueue[1];
|
|
String str2 = checkQueue[1];
|
|
if (str2.equals("do_show")) {
|
|
if (str2.equals("do_show")) {
|
|
- ActivityConnectSimpleAP.this.showDialog(str);
|
|
|
|
|
|
+ showDialog(str);
|
|
}
|
|
}
|
|
if (str2.equals("do_dismiss")) {
|
|
if (str2.equals("do_dismiss")) {
|
|
- ActivityConnectSimpleAP.this.dismissDialog(str);
|
|
|
|
|
|
+ dismissDialog(str);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -171,7 +171,7 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
needInfo = extras.getBoolean(ActivityConnectBase.NEEDINFO, false);
|
|
needInfo = extras.getBoolean(ActivityConnectBase.NEEDINFO, false);
|
|
timeout = extras.getInt(ActivityConnectBase.TIMEOUT, 30);
|
|
timeout = extras.getInt(ActivityConnectBase.TIMEOUT, 30);
|
|
}
|
|
}
|
|
- EPLog.m88i(TAG, "Starting connect :" + targetSsid + " timeout = " + timeout);
|
|
|
|
|
|
+ EPLog.i(TAG, "Starting connect :" + targetSsid + " timeout = " + timeout);
|
|
mHandler.sendEmptyMessage(11);
|
|
mHandler.sendEmptyMessage(11);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -180,7 +180,7 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
if (i != 2) {
|
|
if (i != 2) {
|
|
switch (i) {
|
|
switch (i) {
|
|
case 4:
|
|
case 4:
|
|
- if (this.targetSsid.equals(WiFiUtils.getInstance(this).getCurSSID())) {
|
|
|
|
|
|
+ if (targetSsid.equals(WiFiUtils.getInstance(this).getCurSSID())) {
|
|
onConnectedWiFi();
|
|
onConnectedWiFi();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -199,7 +199,7 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
setResult(0);
|
|
setResult(0);
|
|
setLastDetailResult(1);
|
|
setLastDetailResult(1);
|
|
finish();
|
|
finish();
|
|
- } else if (!this.searchWiFiDirectPrinter.start(1, mHandler, 0, timeout)) {
|
|
|
|
|
|
+ } else if (!searchWiFiDirectPrinter.start(1, mHandler, 0, timeout)) {
|
|
onError();
|
|
onError();
|
|
} else {
|
|
} else {
|
|
status = ActivityConnectBase.Status.WIFI_SCANNING;
|
|
status = ActivityConnectBase.Status.WIFI_SCANNING;
|
|
@@ -207,8 +207,8 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
}
|
|
}
|
|
|
|
|
|
protected void onEnabledWifi() {
|
|
protected void onEnabledWifi() {
|
|
- if (this.targetSsid.equals(WiFiUtils.getInstance(this).getCurSSID())) {
|
|
|
|
- EPLog.m86d(TAG, "Already Connected!!");
|
|
|
|
|
|
+ if (targetSsid.equals(WiFiUtils.getInstance(this).getCurSSID())) {
|
|
|
|
+ EPLog.d(TAG, "Already Connected!!");
|
|
status = ActivityConnectBase.Status.WIFI_CONNECTING;
|
|
status = ActivityConnectBase.Status.WIFI_CONNECTING;
|
|
mHandler.sendEmptyMessage(10);
|
|
mHandler.sendEmptyMessage(10);
|
|
return;
|
|
return;
|
|
@@ -216,9 +216,9 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
if (WifiP2pUtils.getInstance(this).isConnectedWiFiP2P()) {
|
|
if (WifiP2pUtils.getInstance(this).isConnectedWiFiP2P()) {
|
|
WifiP2pUtils.getInstance(this).disconnect();
|
|
WifiP2pUtils.getInstance(this).disconnect();
|
|
}
|
|
}
|
|
- if (this.createSimpleAP) {
|
|
|
|
- connectingNetworkId = WiFiUtils.getInstance(this).createSimpleAP(this.targetSsid, targetPass);
|
|
|
|
- if (this.connectingNetworkId == -1) {
|
|
|
|
|
|
+ if (createSimpleAP) {
|
|
|
|
+ connectingNetworkId = WiFiUtils.getInstance(this).createSimpleAP(targetSsid, targetPass);
|
|
|
|
+ if (connectingNetworkId == -1) {
|
|
mModelDialog.doShow(IDD_WIFI_PROFILE_FAILED);
|
|
mModelDialog.doShow(IDD_WIFI_PROFILE_FAILED);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -229,135 +229,10 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
ActivityRequestLocationPermission.requestLocationPermissionForce(this, 2);
|
|
ActivityRequestLocationPermission.requestLocationPermissionForce(this, 2);
|
|
}
|
|
}
|
|
|
|
|
|
- /* access modifiers changed from: private */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:22:0x0046 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:23:0x0049 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:24:0x007f */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:25:0x00b5 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:26:0x00cc */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:28:0x00d8 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:30:? A[RETURN, SYNTHETIC] */
|
|
|
|
- /* Code decompiled incorrectly, please refer to instructions dump. */
|
|
|
|
|
|
+
|
|
public void showDialog(java.lang.String r11) {
|
|
public void showDialog(java.lang.String r11) {
|
|
- /*
|
|
|
|
- r10 = this;
|
|
|
|
- int r0 = r11.hashCode()
|
|
|
|
- r1 = -872067019(0xffffffffcc055035, float:-3.4947284E7)
|
|
|
|
- r2 = 0
|
|
|
|
- if (r0 == r1) goto L_0x0038
|
|
|
|
- r1 = -692203673(0xffffffffd6bdcf67, float:-1.04349242E14)
|
|
|
|
- if (r0 == r1) goto L_0x002e
|
|
|
|
- r1 = -174410503(0xfffffffff59ab4f9, float:-3.9222865E32)
|
|
|
|
- if (r0 == r1) goto L_0x0024
|
|
|
|
- r1 = 765832116(0x2da5abb4, float:1.883458E-11)
|
|
|
|
- if (r0 == r1) goto L_0x001a
|
|
|
|
- goto L_0x0042
|
|
|
|
- L_0x001a:
|
|
|
|
- java.lang.String r0 = "idd_wifi_error"
|
|
|
|
- boolean r0 = r11.equals(r0)
|
|
|
|
- if (r0 == 0) goto L_0x0042
|
|
|
|
- r0 = 1
|
|
|
|
- goto L_0x0043
|
|
|
|
- L_0x0024:
|
|
|
|
- java.lang.String r0 = "idd_wifi_waiting"
|
|
|
|
- boolean r0 = r11.equals(r0)
|
|
|
|
- if (r0 == 0) goto L_0x0042
|
|
|
|
- r0 = 0
|
|
|
|
- goto L_0x0043
|
|
|
|
- L_0x002e:
|
|
|
|
- java.lang.String r0 = "idd_wifi_profile_failed"
|
|
|
|
- boolean r0 = r11.equals(r0)
|
|
|
|
- if (r0 == 0) goto L_0x0042
|
|
|
|
- r0 = 3
|
|
|
|
- goto L_0x0043
|
|
|
|
- L_0x0038:
|
|
|
|
- java.lang.String r0 = "idd_wifi_simpleap"
|
|
|
|
- boolean r0 = r11.equals(r0)
|
|
|
|
- if (r0 == 0) goto L_0x0042
|
|
|
|
- r0 = 2
|
|
|
|
- goto L_0x0043
|
|
|
|
- L_0x0042:
|
|
|
|
- r0 = -1
|
|
|
|
- L_0x0043:
|
|
|
|
- switch(r0) {
|
|
|
|
- case 0: goto L_0x00cc;
|
|
|
|
- case 1: goto L_0x00b5;
|
|
|
|
- case 2: goto L_0x007f;
|
|
|
|
- case 3: goto L_0x0049;
|
|
|
|
- default: goto L_0x0046;
|
|
|
|
- }
|
|
|
|
- L_0x0046:
|
|
|
|
- r0 = 0
|
|
|
|
- goto L_0x00d6
|
|
|
|
- L_0x0049:
|
|
|
|
- r4 = 2
|
|
|
|
- java.lang.StringBuilder r0 = new java.lang.StringBuilder
|
|
|
|
- r0.<init>()
|
|
|
|
- int r1 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_notice_duplicated_simpleAP
|
|
|
|
- java.lang.String r1 = r10.getString(r1)
|
|
|
|
- r0.append(r1)
|
|
|
|
- java.lang.String r1 = "\n\nSSID: "
|
|
|
|
- r0.append(r1)
|
|
|
|
- java.lang.String r1 = r10.targetSsid
|
|
|
|
- r0.append(r1)
|
|
|
|
- java.lang.String r5 = r0.toString()
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_error_wifi_connecting_failed
|
|
|
|
- java.lang.String r6 = r10.getString(r0)
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_goto_wifi_setting
|
|
|
|
- java.lang.String r7 = r10.getString(r0)
|
|
|
|
- r8 = 0
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_cancel
|
|
|
|
- java.lang.String r9 = r10.getString(r0)
|
|
|
|
- r3 = r11
|
|
|
|
- com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect r0 = com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect.newInstance(r3, r4, r5, r6, r7, r8, r9)
|
|
|
|
- goto L_0x00d6
|
|
|
|
- L_0x007f:
|
|
|
|
- r4 = 2
|
|
|
|
- java.lang.StringBuilder r0 = new java.lang.StringBuilder
|
|
|
|
- r0.<init>()
|
|
|
|
- int r1 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_notice_connecting_simpleAP
|
|
|
|
- java.lang.String r1 = r10.getString(r1)
|
|
|
|
- r0.append(r1)
|
|
|
|
- java.lang.String r1 = "\n\nSSID: "
|
|
|
|
- r0.append(r1)
|
|
|
|
- java.lang.String r1 = r10.targetSsid
|
|
|
|
- r0.append(r1)
|
|
|
|
- java.lang.String r5 = r0.toString()
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_error_wifi_connecting_simpleAP
|
|
|
|
- java.lang.String r6 = r10.getString(r0)
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_goto_wifi_setting
|
|
|
|
- java.lang.String r7 = r10.getString(r0)
|
|
|
|
- r8 = 0
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_cancel
|
|
|
|
- java.lang.String r9 = r10.getString(r0)
|
|
|
|
- r3 = r11
|
|
|
|
- com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect r0 = com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect.newInstance(r3, r4, r5, r6, r7, r8, r9)
|
|
|
|
- goto L_0x00d6
|
|
|
|
- L_0x00b5:
|
|
|
|
- r4 = 2
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_error_connecting_printer
|
|
|
|
- java.lang.String r5 = r10.getString(r0)
|
|
|
|
- r6 = 0
|
|
|
|
- r0 = 17039370(0x104000a, float:2.42446E-38)
|
|
|
|
- java.lang.String r7 = r10.getString(r0)
|
|
|
|
- r8 = 0
|
|
|
|
- r9 = 0
|
|
|
|
- r3 = r11
|
|
|
|
- com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect r0 = com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect.newInstance(r3, r4, r5, r6, r7, r8, r9)
|
|
|
|
- goto L_0x00d6
|
|
|
|
- L_0x00cc:
|
|
|
|
- int r0 = com.epson.mobilephone.common.wifidirect.C1113R.string.str_connecting_printer
|
|
|
|
- java.lang.String r0 = r10.getString(r0)
|
|
|
|
- com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect r0 = com.epson.mobilephone.common.wifidirect.DialogProgressWiFiDirect.newInstance(r11, r2, r0)
|
|
|
|
- L_0x00d6:
|
|
|
|
- if (r0 == 0) goto L_0x00e2
|
|
|
|
- r0.setCancelable(r2)
|
|
|
|
- android.support.v4.app.FragmentManager r1 = r10.getSupportFragmentManager()
|
|
|
|
- r0.show(r1, r11)
|
|
|
|
- L_0x00e2:
|
|
|
|
- return
|
|
|
|
- */
|
|
|
|
- throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.ActivityConnectSimpleAP.showDialog(java.lang.String):void");
|
|
|
|
|
|
+
|
|
|
|
+ throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.showDialog(java.lang.String):void");
|
|
}
|
|
}
|
|
|
|
|
|
private void dismissDialog(String str) {
|
|
private void dismissDialog(String str) {
|
|
@@ -381,7 +256,7 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
}
|
|
}
|
|
|
|
|
|
private void onConnectedWiFi() {
|
|
private void onConnectedWiFi() {
|
|
- EPLog.m86d(TAG, "onConnect()");
|
|
|
|
|
|
+ EPLog.d(TAG, "onConnect()");
|
|
interruptConnecting();
|
|
interruptConnecting();
|
|
new AsyncTask<Void, Void, Void>() {
|
|
new AsyncTask<Void, Void, Void>() {
|
|
protected Void doInBackground(Void... voidArr) {
|
|
protected Void doInBackground(Void... voidArr) {
|
|
@@ -391,60 +266,60 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
|
|
|
|
protected void onPostExecute(Void voidR) {
|
|
protected void onPostExecute(Void voidR) {
|
|
ManageDefaultNetwork.getInstance(ActivityConnectSimpleAP.this).setDefaultNetworkSimpleAp();
|
|
ManageDefaultNetwork.getInstance(ActivityConnectSimpleAP.this).setDefaultNetworkSimpleAp();
|
|
- if (ActivityConnectSimpleAP.this.showConnectedTip) {
|
|
|
|
|
|
+ if (showConnectedTip) {
|
|
ActivityConnectSimpleAP activityConnectSimpleAP = ActivityConnectSimpleAP.this;
|
|
ActivityConnectSimpleAP activityConnectSimpleAP = ActivityConnectSimpleAP.this;
|
|
- Toast.makeText(activityConnectSimpleAP, activityConnectSimpleAP.getString(C1113R.string.str_notice_wifi_connected), 0).show();
|
|
|
|
|
|
+ Toast.makeText(activityConnectSimpleAP, getString(R.string.str_notice_wifi_connected), 0).show();
|
|
}
|
|
}
|
|
- if (!ActivityConnectSimpleAP.this.needInfo) {
|
|
|
|
- ActivityConnectSimpleAP.this.closeWaitingDialog();
|
|
|
|
- ActivityConnectSimpleAP.this.status = ActivityConnectBase.Status.IDLE;
|
|
|
|
- ActivityConnectSimpleAP.this.setResult(-1);
|
|
|
|
|
|
+ if (!needInfo) {
|
|
|
|
+ closeWaitingDialog();
|
|
|
|
+ status = ActivityConnectBase.Status.IDLE;
|
|
|
|
+ setResult(-1);
|
|
ActivityConnectBase.setLastDetailResult(-1);
|
|
ActivityConnectBase.setLastDetailResult(-1);
|
|
- ActivityConnectSimpleAP.this.finish();
|
|
|
|
|
|
+ finish();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (ActivityConnectSimpleAP.this.taskFindPrinter != null) {
|
|
|
|
- EPLog.m90w(ActivityConnectSimpleAP.TAG, "Already called onConnect()");
|
|
|
|
|
|
+ if (taskFindPrinter != null) {
|
|
|
|
+ EPLog.w(TAG, "Already called onConnect()");
|
|
}
|
|
}
|
|
String curP2PMacAdder = WiFiUtils.getInstance(ActivityConnectSimpleAP.this).getCurP2PMacAdder();
|
|
String curP2PMacAdder = WiFiUtils.getInstance(ActivityConnectSimpleAP.this).getCurP2PMacAdder();
|
|
- ActivityConnectSimpleAP.this.expectedPrtMacAddr = WiFiControl.p2pAddr2PtrAddrP2P(curP2PMacAdder, (String) null);
|
|
|
|
- ActivityConnectSimpleAP.this.status = ActivityConnectBase.Status.PRINTER_FINDING;
|
|
|
|
|
|
+ expectedPrtMacAddr = WiFiControl.p2pAddr2PtrAddrP2P(curP2PMacAdder, (String) null);
|
|
|
|
+ status = ActivityConnectBase.Status.PRINTER_FINDING;
|
|
ActivityConnectSimpleAP activityConnectSimpleAP2 = ActivityConnectSimpleAP.this;
|
|
ActivityConnectSimpleAP activityConnectSimpleAP2 = ActivityConnectSimpleAP.this;
|
|
- activityConnectSimpleAP2.taskFindPrinter = new FindPrinterTask(activityConnectSimpleAP2.mHandler, ActivityConnectSimpleAP.this.timeout, 1, 2);
|
|
|
|
- ActivityConnectSimpleAP.this.taskFindPrinter.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
|
|
|
|
|
|
+ activityConnectSimpleAP2.taskFindPrinter = new FindPrinterTask(activityConnectSimpleAP2.mHandler, timeout, 1, 2);
|
|
|
|
+ taskFindPrinter.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
|
|
}
|
|
}
|
|
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
|
|
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
|
|
}
|
|
}
|
|
|
|
|
|
private void onError() {
|
|
private void onError() {
|
|
closeWaitingDialog();
|
|
closeWaitingDialog();
|
|
- Toast.makeText(this, getString(C1113R.string.str_error_connecting_printer_short), 1).show();
|
|
|
|
- if (this.searchWiFiDirectPrinter != null) {
|
|
|
|
|
|
+ Toast.makeText(this, getString(R.string.str_error_connecting_printer_short), 1).show();
|
|
|
|
+ if (searchWiFiDirectPrinter != null) {
|
|
searchWiFiDirectPrinter.interrupt();
|
|
searchWiFiDirectPrinter.interrupt();
|
|
searchWiFiDirectPrinter = null;
|
|
searchWiFiDirectPrinter = null;
|
|
}
|
|
}
|
|
- if (this.status == ActivityConnectBase.Status.WIFI_CONNECTING && connectingNetworkId != -1) {
|
|
|
|
|
|
+ if (status == ActivityConnectBase.Status.WIFI_CONNECTING && connectingNetworkId != -1) {
|
|
interruptConnecting();
|
|
interruptConnecting();
|
|
- WiFiUtils.getInstance(this).removeNetwork(this.connectingNetworkId);
|
|
|
|
|
|
+ WiFiUtils.getInstance(this).removeNetwork(connectingNetworkId);
|
|
connectingNetworkId = -1;
|
|
connectingNetworkId = -1;
|
|
WiFiUtils.getInstance(this).reConnectNetwork();
|
|
WiFiUtils.getInstance(this).reConnectNetwork();
|
|
- if (this.showErrorDlg) {
|
|
|
|
|
|
+ if (showErrorDlg) {
|
|
mModelDialog.doShow(IDD_WIFI_ERROR);
|
|
mModelDialog.doShow(IDD_WIFI_ERROR);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- EPLog.m86d(TAG, "finish():RESULT_CANCELED");
|
|
|
|
|
|
+ EPLog.d(TAG, "finish():RESULT_CANCELED");
|
|
setResult(0);
|
|
setResult(0);
|
|
setLastDetailResult(2);
|
|
setLastDetailResult(2);
|
|
finish();
|
|
finish();
|
|
}
|
|
}
|
|
|
|
|
|
private void closeWaitingDialog() {
|
|
private void closeWaitingDialog() {
|
|
- EPLog.m86d(TAG, "Called closeWaitingDialog()");
|
|
|
|
|
|
+ EPLog.d(TAG, "Called closeWaitingDialog()");
|
|
try {
|
|
try {
|
|
mModelDialog.doDismiss(IDD_WIFI_WAITING);
|
|
mModelDialog.doDismiss(IDD_WIFI_WAITING);
|
|
} catch (IllegalArgumentException unused) {
|
|
} catch (IllegalArgumentException unused) {
|
|
- EPLog.m86d(TAG, "IDD_WIFI_WATING already closed");
|
|
|
|
|
|
+ EPLog.d(TAG, "IDD_WIFI_WATING already closed");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -453,186 +328,25 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
|
|
|
|
/* renamed from: $SwitchMap$com$epson$mobilephone$common$wifidirect$ActivityConnectBase$Status */
|
|
/* renamed from: $SwitchMap$com$epson$mobilephone$common$wifidirect$ActivityConnectBase$Status */
|
|
static final /* synthetic */ int[] f150x55760faf = new int[ActivityConnectBase.Status.values().length];
|
|
static final /* synthetic */ int[] f150x55760faf = new int[ActivityConnectBase.Status.values().length];
|
|
-
|
|
|
|
- /* JADX WARNING: Can't wrap try/catch for region: R(10:0|1|2|3|4|5|6|7|8|10) */
|
|
|
|
- /* JADX WARNING: Can't wrap try/catch for region: R(8:0|1|2|3|4|5|6|(3:7|8|10)) */
|
|
|
|
- /* JADX WARNING: Failed to process nested try/catch */
|
|
|
|
- /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0014 */
|
|
|
|
- /* JADX WARNING: Missing exception handler attribute for start block: B:5:0x001f */
|
|
|
|
- /* JADX WARNING: Missing exception handler attribute for start block: B:7:0x002a */
|
|
|
|
- static {
|
|
|
|
- /*
|
|
|
|
- com.epson.mobilephone.common.wifidirect.ActivityConnectBase$Status[] r0 = com.epson.mobilephone.common.wifidirect.ActivityConnectBase.Status.values()
|
|
|
|
- int r0 = r0.length
|
|
|
|
- int[] r0 = new int[r0]
|
|
|
|
- f150x55760faf = r0
|
|
|
|
- int[] r0 = f150x55760faf // Catch:{ NoSuchFieldError -> 0x0014 }
|
|
|
|
- com.epson.mobilephone.common.wifidirect.ActivityConnectBase$Status r1 = com.epson.mobilephone.common.wifidirect.ActivityConnectBase.Status.IDLE // Catch:{ NoSuchFieldError -> 0x0014 }
|
|
|
|
- int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0014 }
|
|
|
|
- r2 = 1
|
|
|
|
- r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0014 }
|
|
|
|
- L_0x0014:
|
|
|
|
- int[] r0 = f150x55760faf // Catch:{ NoSuchFieldError -> 0x001f }
|
|
|
|
- com.epson.mobilephone.common.wifidirect.ActivityConnectBase$Status r1 = com.epson.mobilephone.common.wifidirect.ActivityConnectBase.Status.WIFI_SCANNING // Catch:{ NoSuchFieldError -> 0x001f }
|
|
|
|
- int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x001f }
|
|
|
|
- r2 = 2
|
|
|
|
- r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x001f }
|
|
|
|
- L_0x001f:
|
|
|
|
- int[] r0 = f150x55760faf // Catch:{ NoSuchFieldError -> 0x002a }
|
|
|
|
- com.epson.mobilephone.common.wifidirect.ActivityConnectBase$Status r1 = com.epson.mobilephone.common.wifidirect.ActivityConnectBase.Status.WIFI_CONNECTING // Catch:{ NoSuchFieldError -> 0x002a }
|
|
|
|
- int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x002a }
|
|
|
|
- r2 = 3
|
|
|
|
- r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x002a }
|
|
|
|
- L_0x002a:
|
|
|
|
- int[] r0 = f150x55760faf // Catch:{ NoSuchFieldError -> 0x0035 }
|
|
|
|
- com.epson.mobilephone.common.wifidirect.ActivityConnectBase$Status r1 = com.epson.mobilephone.common.wifidirect.ActivityConnectBase.Status.PRINTER_FINDING // Catch:{ NoSuchFieldError -> 0x0035 }
|
|
|
|
- int r1 = r1.ordinal() // Catch:{ NoSuchFieldError -> 0x0035 }
|
|
|
|
- r2 = 4
|
|
|
|
- r0[r1] = r2 // Catch:{ NoSuchFieldError -> 0x0035 }
|
|
|
|
- L_0x0035:
|
|
|
|
- return
|
|
|
|
- */
|
|
|
|
- throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.ActivityConnectSimpleAP.C10874.<clinit>():void");
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- private void setupObserver() {
|
|
|
|
|
|
+ public void setupObserver() {
|
|
super.setupObserver();
|
|
super.setupObserver();
|
|
networkStateChangeReciever = new NetworkStateChangeReciever();
|
|
networkStateChangeReciever = new NetworkStateChangeReciever();
|
|
- registerReceiver(this.networkStateChangeReciever, new IntentFilter("android.net.wifi.STATE_CHANGE"));
|
|
|
|
- registerReceiver(this.networkStateChangeReciever, new IntentFilter("android.net.wifi.WIFI_STATE_CHANGED"));
|
|
|
|
- registerReceiver(this.networkStateChangeReciever, new IntentFilter("android.net.wifi.supplicant.STATE_CHANGE"));
|
|
|
|
|
|
+ registerReceiver(networkStateChangeReciever, new IntentFilter("android.net.wifi.STATE_CHANGE"));
|
|
|
|
+ registerReceiver(networkStateChangeReciever, new IntentFilter("android.net.wifi.WIFI_STATE_CHANGED"));
|
|
|
|
+ registerReceiver(networkStateChangeReciever, new IntentFilter("android.net.wifi.supplicant.STATE_CHANGE"));
|
|
}
|
|
}
|
|
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:17:0x0039 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:18:0x0045 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:19:0x0051 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:23:? A[RETURN, SYNTHETIC] */
|
|
|
|
- /* Code decompiled incorrectly, please refer to instructions dump. */
|
|
|
|
|
|
+
|
|
public void onPositiveClick(java.lang.String r5) {
|
|
public void onPositiveClick(java.lang.String r5) {
|
|
- /*
|
|
|
|
- r4 = this;
|
|
|
|
- int r0 = r5.hashCode()
|
|
|
|
- r1 = -872067019(0xffffffffcc055035, float:-3.4947284E7)
|
|
|
|
- r2 = 2
|
|
|
|
- r3 = 0
|
|
|
|
- if (r0 == r1) goto L_0x002a
|
|
|
|
- r1 = -692203673(0xffffffffd6bdcf67, float:-1.04349242E14)
|
|
|
|
- if (r0 == r1) goto L_0x0020
|
|
|
|
- r1 = 765832116(0x2da5abb4, float:1.883458E-11)
|
|
|
|
- if (r0 == r1) goto L_0x0016
|
|
|
|
- goto L_0x0034
|
|
|
|
- L_0x0016:
|
|
|
|
- java.lang.String r0 = "idd_wifi_error"
|
|
|
|
- boolean r5 = r5.equals(r0)
|
|
|
|
- if (r5 == 0) goto L_0x0034
|
|
|
|
- r5 = 0
|
|
|
|
- goto L_0x0035
|
|
|
|
- L_0x0020:
|
|
|
|
- java.lang.String r0 = "idd_wifi_profile_failed"
|
|
|
|
- boolean r5 = r5.equals(r0)
|
|
|
|
- if (r5 == 0) goto L_0x0034
|
|
|
|
- r5 = 2
|
|
|
|
- goto L_0x0035
|
|
|
|
- L_0x002a:
|
|
|
|
- java.lang.String r0 = "idd_wifi_simpleap"
|
|
|
|
- boolean r5 = r5.equals(r0)
|
|
|
|
- if (r5 == 0) goto L_0x0034
|
|
|
|
- r5 = 1
|
|
|
|
- goto L_0x0035
|
|
|
|
- L_0x0034:
|
|
|
|
- r5 = -1
|
|
|
|
- L_0x0035:
|
|
|
|
- switch(r5) {
|
|
|
|
- case 0: goto L_0x0051;
|
|
|
|
- case 1: goto L_0x0045;
|
|
|
|
- case 2: goto L_0x0039;
|
|
|
|
- default: goto L_0x0038;
|
|
|
|
- }
|
|
|
|
- L_0x0038:
|
|
|
|
- goto L_0x0061
|
|
|
|
- L_0x0039:
|
|
|
|
- java.lang.String r5 = "ActivityConnectSimpleAP"
|
|
|
|
- java.lang.String r0 = "finish():GOTO_WIFI_SETTINGS"
|
|
|
|
- com.epson.mobilephone.common.wifidirect.EPLog.m86d(r5, r0)
|
|
|
|
- r5 = 5
|
|
|
|
- com.epson.mobilephone.common.wifidirect.WiFiUtils.showOsWifiSettings(r4, r5)
|
|
|
|
- goto L_0x0061
|
|
|
|
- L_0x0045:
|
|
|
|
- java.lang.String r5 = "ActivityConnectSimpleAP"
|
|
|
|
- java.lang.String r0 = "finish():GOTO_WIFI_SETTINGS"
|
|
|
|
- com.epson.mobilephone.common.wifidirect.EPLog.m86d(r5, r0)
|
|
|
|
- r5 = 4
|
|
|
|
- com.epson.mobilephone.common.wifidirect.WiFiUtils.showOsWifiSettings(r4, r5)
|
|
|
|
- goto L_0x0061
|
|
|
|
- L_0x0051:
|
|
|
|
- java.lang.String r5 = "ActivityConnectSimpleAP"
|
|
|
|
- java.lang.String r0 = "finish():RESULT_CANCELED"
|
|
|
|
- com.epson.mobilephone.common.wifidirect.EPLog.m86d(r5, r0)
|
|
|
|
- r4.setResult(r3)
|
|
|
|
- setLastDetailResult(r2)
|
|
|
|
- r4.finish()
|
|
|
|
- L_0x0061:
|
|
|
|
- return
|
|
|
|
- */
|
|
|
|
- throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.ActivityConnectSimpleAP.onPositiveClick(java.lang.String):void");
|
|
|
|
|
|
+
|
|
|
|
+ throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.onPositiveClick(java.lang.String):void");
|
|
}
|
|
}
|
|
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:12:0x002a */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:13:0x0038 */
|
|
|
|
- /* JADX WARNING: Removed duplicated region for block: B:16:? A[RETURN, SYNTHETIC] */
|
|
|
|
- /* Code decompiled incorrectly, please refer to instructions dump. */
|
|
|
|
public void onNegativeClick(java.lang.String r5) {
|
|
public void onNegativeClick(java.lang.String r5) {
|
|
- /*
|
|
|
|
- r4 = this;
|
|
|
|
- int r0 = r5.hashCode()
|
|
|
|
- r1 = -872067019(0xffffffffcc055035, float:-3.4947284E7)
|
|
|
|
- r2 = 0
|
|
|
|
- r3 = 1
|
|
|
|
- if (r0 == r1) goto L_0x001b
|
|
|
|
- r1 = -692203673(0xffffffffd6bdcf67, float:-1.04349242E14)
|
|
|
|
- if (r0 == r1) goto L_0x0011
|
|
|
|
- goto L_0x0025
|
|
|
|
- L_0x0011:
|
|
|
|
- java.lang.String r0 = "idd_wifi_profile_failed"
|
|
|
|
- boolean r5 = r5.equals(r0)
|
|
|
|
- if (r5 == 0) goto L_0x0025
|
|
|
|
- r5 = 1
|
|
|
|
- goto L_0x0026
|
|
|
|
- L_0x001b:
|
|
|
|
- java.lang.String r0 = "idd_wifi_simpleap"
|
|
|
|
- boolean r5 = r5.equals(r0)
|
|
|
|
- if (r5 == 0) goto L_0x0025
|
|
|
|
- r5 = 0
|
|
|
|
- goto L_0x0026
|
|
|
|
- L_0x0025:
|
|
|
|
- r5 = -1
|
|
|
|
- L_0x0026:
|
|
|
|
- switch(r5) {
|
|
|
|
- case 0: goto L_0x0038;
|
|
|
|
- case 1: goto L_0x002a;
|
|
|
|
- default: goto L_0x0029;
|
|
|
|
- }
|
|
|
|
- L_0x0029:
|
|
|
|
- goto L_0x0048
|
|
|
|
- L_0x002a:
|
|
|
|
- java.lang.String r5 = "ActivityConnectSimpleAP"
|
|
|
|
- java.lang.String r0 = "finish():RESULT_CANCELED"
|
|
|
|
- com.epson.mobilephone.common.wifidirect.EPLog.m86d(r5, r0)
|
|
|
|
- r4.onError()
|
|
|
|
- setLastDetailResult(r3)
|
|
|
|
- goto L_0x0048
|
|
|
|
- L_0x0038:
|
|
|
|
- java.lang.String r5 = "ActivityConnectSimpleAP"
|
|
|
|
- java.lang.String r0 = "finish():RESULT_CANCELED"
|
|
|
|
- com.epson.mobilephone.common.wifidirect.EPLog.m86d(r5, r0)
|
|
|
|
- r4.setResult(r2)
|
|
|
|
- setLastDetailResult(r3)
|
|
|
|
- r4.finish()
|
|
|
|
- L_0x0048:
|
|
|
|
- return
|
|
|
|
- */
|
|
|
|
- throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.ActivityConnectSimpleAP.onNegativeClick(java.lang.String):void");
|
|
|
|
|
|
+
|
|
|
|
+ throw new UnsupportedOperationException("Method not decompiled: com.epson.mobilephone.common.wifidirect.onNegativeClick(java.lang.String):void");
|
|
}
|
|
}
|
|
|
|
|
|
class NetworkStateChangeReciever extends BroadcastReceiver {
|
|
class NetworkStateChangeReciever extends BroadcastReceiver {
|
|
@@ -642,31 +356,31 @@ public class ActivityConnectSimpleAP extends ActivityConnectBase implements Dial
|
|
public void onReceive(Context context, Intent intent) {
|
|
public void onReceive(Context context, Intent intent) {
|
|
String action = intent.getAction();
|
|
String action = intent.getAction();
|
|
if (action.equals("android.net.wifi.WIFI_STATE_CHANGED")) {
|
|
if (action.equals("android.net.wifi.WIFI_STATE_CHANGED")) {
|
|
- EPLog.m86d(ActivityConnectSimpleAP.TAG, String.format("WiFi State Change : wifiState = %d", new Object[]{Integer.valueOf(intent.getIntExtra("wifi_state", 4))}));
|
|
|
|
|
|
+ EPLog.d(TAG, String.format("WiFi State Change : wifiState = %d", new Object[]{Integer.valueOf(intent.getIntExtra("wifi_state", 4))}));
|
|
} else if (action.equals("android.net.wifi.STATE_CHANGE")) {
|
|
} else if (action.equals("android.net.wifi.STATE_CHANGE")) {
|
|
NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra("networkInfo");
|
|
NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra("networkInfo");
|
|
- EPLog.m86d(ActivityConnectSimpleAP.TAG, "Network State Changed:" + networkInfo.toString());
|
|
|
|
- if (networkInfo.isConnected() && ActivityConnectSimpleAP.this.targetSsid.equals(WiFiUtils.getInstance(ActivityConnectSimpleAP.this).getCurSSID())) {
|
|
|
|
- EPLog.m88i(ActivityConnectSimpleAP.TAG, "Wi-Fi connected.");
|
|
|
|
- ActivityConnectSimpleAP.mHandler.sendEmptyMessageDelayed(10, 1000);
|
|
|
|
|
|
+ EPLog.d(TAG, "Network State Changed:" + networkInfo.toString());
|
|
|
|
+ if (networkInfo.isConnected() && targetSsid.equals(WiFiUtils.getInstance(this).getCurSSID())) {
|
|
|
|
+ EPLog.i(TAG, "Wi-Fi connected.");
|
|
|
|
+ mHandler.sendEmptyMessageDelayed(10, 1000);
|
|
}
|
|
}
|
|
} else if (action.equals("android.net.wifi.supplicant.STATE_CHANGE")) {
|
|
} else if (action.equals("android.net.wifi.supplicant.STATE_CHANGE")) {
|
|
SupplicantState supplicantState = (SupplicantState) intent.getParcelableExtra("newState");
|
|
SupplicantState supplicantState = (SupplicantState) intent.getParcelableExtra("newState");
|
|
- EPLog.m86d(ActivityConnectSimpleAP.TAG, "Supplicant State Changed: State = " + supplicantState.toString());
|
|
|
|
|
|
+ EPLog.d(TAG, "Supplicant State Changed: State = " + supplicantState.toString());
|
|
if (intent.hasExtra("supplicantError")) {
|
|
if (intent.hasExtra("supplicantError")) {
|
|
Integer valueOf = Integer.valueOf(intent.getIntExtra("supplicantError", 0));
|
|
Integer valueOf = Integer.valueOf(intent.getIntExtra("supplicantError", 0));
|
|
- EPLog.m86d(ActivityConnectSimpleAP.TAG, "Supplicant State Changed: ErrorCode = " + valueOf.toString());
|
|
|
|
- if (ActivityConnectSimpleAP.this.status == ActivityConnectBase.Status.WIFI_CONNECTING) {
|
|
|
|
- EPLog.m86d(ActivityConnectSimpleAP.TAG, "EXTRA_SUPPLICANT_ERROR");
|
|
|
|
- ActivityConnectSimpleAP.this.onError();
|
|
|
|
|
|
+ EPLog.d(TAG, "Supplicant State Changed: ErrorCode = " + valueOf.toString());
|
|
|
|
+ if (status == ActivityConnectBase.Status.WIFI_CONNECTING) {
|
|
|
|
+ EPLog.d(TAG, "EXTRA_SUPPLICANT_ERROR");
|
|
|
|
+ onError();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (supplicantState == SupplicantState.ASSOCIATING && ActivityConnectSimpleAP.this.status == ActivityConnectBase.Status.WIFI_CONNECTING) {
|
|
|
|
- ActivityConnectSimpleAP.access$408(ActivityConnectSimpleAP.this);
|
|
|
|
- if (ActivityConnectSimpleAP.this.retryConnecting > 5) {
|
|
|
|
- EPLog.m86d(ActivityConnectSimpleAP.TAG, "Connecting Retry timeout");
|
|
|
|
- ActivityConnectSimpleAP.this.onError();
|
|
|
|
|
|
+ if (supplicantState == SupplicantState.ASSOCIATING && status == ActivityConnectBase.Status.WIFI_CONNECTING) {
|
|
|
|
+ access(ActivityConnectSimpleAP.this);
|
|
|
|
+ if (retryConnecting > 5) {
|
|
|
|
+ EPLog.d(TAG, "Connecting Retry timeout");
|
|
|
|
+ onError();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|