Created
August 14, 2019 01:12
-
-
Save nrafter/aec56b71bb282d617f5c53abd1cba979 to your computer and use it in GitHub Desktop.
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
private void p() | |
{ | |
String s1 = com.waybots.blackbox.s.c(this); | |
WifiManager wifimanager = (WifiManager)getSystemService("wifi"); | |
if(!"\"waybridge\"".equals(s1)) | |
{ | |
a("Setting up wifi"); | |
WifiConfiguration wificonfiguration = new WifiConfiguration(); | |
wificonfiguration.SSID = "\"waybridge\""; | |
wificonfiguration.hiddenSSID = true; | |
wificonfiguration.status = 2; | |
wificonfiguration.allowedGroupCiphers.set(2); | |
wificonfiguration.allowedGroupCiphers.set(3); | |
wificonfiguration.allowedKeyManagement.set(1); | |
wificonfiguration.allowedPairwiseCiphers.set(1); | |
wificonfiguration.allowedPairwiseCiphers.set(2); | |
wificonfiguration.allowedProtocols.set(1); | |
wificonfiguration.allowedProtocols.set(0); | |
wificonfiguration.preSharedKey = "\"waybots1\""; | |
int i1 = wifimanager.addNetwork(wificonfiguration); | |
Log.d("MainService", (new StringBuilder()).append("# addNetwork returned ").append(i1).toString()); | |
boolean flag = wifimanager.enableNetwork(i1, true); | |
Log.d("MainService", (new StringBuilder()).append("# enableNetwork returned ").append(flag).toString()); | |
wifimanager.setWifiEnabled(true); | |
} else | |
{ | |
a("No need to set up wifi"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment