added c++11 fixes
removed old components disabled activity (for compiling reasons) added wifi 2.4ghz hack
This commit is contained in:
@@ -11,6 +11,7 @@ import android.os.Debug;
|
||||
import android.util.Log;
|
||||
import java.util.List;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class WiFi {
|
||||
|
||||
@@ -51,7 +52,19 @@ public class WiFi {
|
||||
// start the first scan
|
||||
triggerOneScan();
|
||||
|
||||
|
||||
//this is a very nice hack. do not try this at home.
|
||||
Method m = null;
|
||||
try {
|
||||
m = manager.getClass().getDeclaredMethod("setFrequencyBand", int.class, boolean.class);
|
||||
m.setAccessible(true);
|
||||
m.invoke(manager, 2, true);
|
||||
m.invoke(manager, 2, true);
|
||||
m.invoke(manager, 2, true);
|
||||
Log.d("wifi", "HACK IS RUNNING, BIAAAATCH");
|
||||
} catch (Exception e) {
|
||||
Log.d("wifi", "HACK HAS FAILED >.<");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// if the scan result takes longer than X milliseconds,
|
||||
// trigger another-scan to ensure nothing is stuck
|
||||
|
||||
Reference in New Issue
Block a user