-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
899 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
ESP8266_button/app/src/main/java/org/thinkcreate/esp8266_button/activity_B_class.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package org.thinkcreate.esp8266_button; | ||
|
||
import android.app.Activity; | ||
import android.app.ProgressDialog; | ||
import android.content.DialogInterface; | ||
import android.content.DialogInterface.OnCancelListener; | ||
import android.os.AsyncTask; | ||
import android.widget.Toast; | ||
|
||
/** | ||
* Created by sundeqing on 4/16/15. | ||
*/ | ||
public class activity_B_class extends AsyncTask | ||
{ | ||
private Activity b; | ||
private ProgressDialog c; | ||
private activity_C_class_maybe_handle d; | ||
private final String ssidStr; | ||
private final String passwordStr; | ||
private boolean g; | ||
|
||
public activity_B_class(MainActivity paramEspTouchActivity, Activity paramActivity, String ssid, String password) | ||
{ | ||
this.b = paramActivity; | ||
this.g = false; | ||
this.ssidStr = ssid; | ||
this.passwordStr = password; | ||
this.d = new activity_C_class_maybe_handle(this.ssidStr, this.passwordStr); | ||
} | ||
|
||
protected Boolean a(String... paramVarArgs) | ||
{ | ||
//return Boolean.valueOf(this.d.b()); | ||
return true; | ||
} | ||
|
||
protected void a(Boolean paramBoolean) | ||
{ | ||
this.c.dismiss(); | ||
int i; | ||
if (paramBoolean.booleanValue()) { | ||
i = 2131427563; | ||
} | ||
/*for (;;) | ||
{ | ||
// Toast.makeText(this.b, i, 1).show(); | ||
return; | ||
if (this.g) { | ||
i = 2131427566; | ||
} else if (MainActivity.b(this.a).equals(this.e)) { | ||
i = 2131427564; | ||
} else { | ||
i = 2131427565; | ||
} | ||
}*/ | ||
} | ||
|
||
public void onCancel(DialogInterface paramDialogInterface) | ||
{ | ||
if (this.d != null) | ||
{ | ||
this.g = true; | ||
this.d.a(); | ||
} | ||
} | ||
|
||
@Override | ||
protected Object doInBackground(Object[] objects) { | ||
return null; | ||
} | ||
|
||
protected void onPreExecute() | ||
{ | ||
/*this.c = new ProgressDialog(this.b); | ||
this.c.setMessage(this.a.getString(2131427562, new Object[] { this.e })); | ||
this.c.setCanceledOnTouchOutside(false); | ||
this.c.setOnCancelListener(this); | ||
this.c.show();*/ | ||
} | ||
|
||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...utton/app/src/main/java/org/thinkcreate/esp8266_button/activity_C_class_maybe_handle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.thinkcreate.esp8266_button; | ||
|
||
import org.thinkcreate.esp_reverse.rev_Class_h; | ||
/** | ||
* Created by sundeqing on 4/16/15. | ||
*/ | ||
public class activity_C_class_maybe_handle { | ||
public rev_Class_h a; | ||
|
||
public activity_C_class_maybe_handle(String ssid, String password) | ||
{ | ||
this.a = new rev_Class_h(ssid, password); | ||
} | ||
|
||
public void a() | ||
{ | ||
this.a.a(); | ||
} | ||
|
||
public boolean b() | ||
{ | ||
return this.a.b(); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
ESP8266_button/app/src/main/java/org/thinkcreate/esp8266_button/testClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.thinkcreate.esp8266_button; | ||
|
||
/** | ||
* Created by sundeqing on 4/16/15. | ||
*/ | ||
public class testClass { | ||
} |
61 changes: 61 additions & 0 deletions
61
ESP8266_button/app/src/main/java/org/thinkcreate/esp_reverse/rev_Class_a.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package org.thinkcreate.esp_reverse; | ||
|
||
/** | ||
* Created by sundeqing on 4/16/15. | ||
*/ | ||
|
||
public class rev_Class_a | ||
{ | ||
private final byte a; | ||
private final byte b; | ||
private final byte c; | ||
private final byte d; | ||
private final byte e; | ||
|
||
public rev_Class_a(char paramChar, int paramInt) | ||
{ | ||
if (paramInt > 63) { | ||
throw new RuntimeException("index > INDEX_MAX"); | ||
} | ||
byte[] localObject0 = rev_Class_l_maybe_util.b(paramChar); | ||
this.b = localObject0[0]; | ||
this.c = localObject0[1]; | ||
rev_Class_m localObject1 = new rev_Class_m(); | ||
((rev_Class_m)localObject1).update(rev_Class_l_maybe_util.a(paramChar)); | ||
((rev_Class_m)localObject1).update(paramInt); | ||
byte[] localObject2 = rev_Class_l_maybe_util.b((char)(int)((rev_Class_m)localObject1).getValue()); | ||
this.d = localObject2[0]; | ||
this.e = localObject2[1]; | ||
if ((this.c == 0) && (this.e == 0)) | ||
{ | ||
this.a = ((byte)(paramInt | 0x1940)); | ||
return; | ||
} | ||
this.a = ((byte)(paramInt | 0x1900)); | ||
} | ||
|
||
public byte[] a() | ||
{ | ||
return new byte[] { 0, rev_Class_l_maybe_util.a(this.d, this.b), 1, this.a, 0, rev_Class_l_maybe_util.a(this.e, this.c) }; | ||
} | ||
|
||
public String toString() | ||
{ | ||
StringBuilder localStringBuilder = new StringBuilder(); | ||
byte[] arrayOfByte = a(); | ||
int i = 0; | ||
for (;;) | ||
{ | ||
if (i >= 6) { | ||
return localStringBuilder.toString(); | ||
} | ||
String str = rev_Class_l_maybe_util.b(arrayOfByte[i]); | ||
localStringBuilder.append("0x"); | ||
if (str.length() == 1) { | ||
localStringBuilder.append("0"); | ||
} | ||
localStringBuilder.append(str).append(" "); | ||
i += 1; | ||
} | ||
} | ||
} |
83 changes: 83 additions & 0 deletions
83
...266_button/app/src/main/java/org/thinkcreate/esp_reverse/rev_Class_c_ssidpwd_encoder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
package org.thinkcreate.esp_reverse; | ||
|
||
/** | ||
* Created by sundeqing on 4/16/15. | ||
*/ | ||
|
||
public class rev_Class_c_ssidpwd_encoder | ||
implements rev_Class_g_encoder_interface | ||
{ | ||
private final byte[][] a; | ||
private final byte[][] b; | ||
private final byte[][] c; | ||
private final byte[][] d; | ||
|
||
public rev_Class_c_ssidpwd_encoder(String ssid, String password) | ||
{ | ||
char c1 = (char)(ssid.length() + password.length()); | ||
char c2 = (char)password.length(); | ||
byte[] localObject = new rev_Class_d().a(); | ||
this.a = new byte[localObject.length][]; | ||
int i = 0; | ||
if (i >= this.a.length) //todo | ||
{ | ||
/* localObject = new rev_Class_e(c1, ssid).b(); | ||
this.b = new byte[localObject.length][]; | ||
i = 0; | ||
label87: | ||
if (i < this.b.length) { | ||
break label195; | ||
} | ||
localObject = new f(c2).b(); | ||
this.c = new byte[localObject.length][]; | ||
i = 0; | ||
label124: | ||
if (i < this.c.length) { | ||
break label219; | ||
} | ||
ssid = new b(ssid, password).b(); | ||
this.d = new byte[ssid.length][]; | ||
i = j;*/ | ||
} | ||
for (;;) | ||
{ | ||
/* if (i >= this.d.length) | ||
{ | ||
return; | ||
this.a[i] = rev_Class_l_maybe_util.c(localObject[i]); | ||
i += 1; | ||
break; | ||
label195: | ||
this.b[i] = rev_Class_l_maybe_util.c(localObject[i]); | ||
i += 1; | ||
break label87; | ||
label219: | ||
this.c[i] = rev_Class_l_maybe_util.c(localObject[i]); | ||
i += 1; | ||
break label124; | ||
} | ||
this.d[i] = rev_Class_l_maybe_util.c(ssid[i]); | ||
i += 1;*/ | ||
} | ||
} | ||
|
||
public byte[][] a() | ||
{ | ||
return this.a; | ||
} | ||
|
||
public byte[][] b() | ||
{ | ||
return this.b; | ||
} | ||
|
||
public byte[][] c() | ||
{ | ||
return this.c; | ||
} | ||
|
||
public byte[][] d() | ||
{ | ||
return this.d; | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
ESP8266_button/app/src/main/java/org/thinkcreate/esp_reverse/rev_Class_d.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.thinkcreate.esp_reverse; | ||
|
||
/** | ||
* Created by sundeqing on 4/16/15. | ||
*/ | ||
public class rev_Class_d { | ||
public byte[] a() | ||
{ | ||
return new byte[] { 1, 2, 3, 4 }; | ||
} | ||
|
||
public String toString() | ||
{ | ||
StringBuilder localStringBuilder = new StringBuilder(); | ||
byte[] arrayOfByte = a(); | ||
int i = 0; | ||
for (;;) | ||
{ | ||
if (i >= 4) { | ||
return localStringBuilder.toString(); | ||
} | ||
String str = rev_Class_l_maybe_util.b(arrayOfByte[i]); | ||
localStringBuilder.append("0x"); | ||
if (str.length() == 1) { | ||
localStringBuilder.append("0"); | ||
} | ||
localStringBuilder.append(str).append(" "); | ||
i += 1; | ||
} | ||
} | ||
} |
Oops, something went wrong.