Skip to content

Commit

Permalink
remoced some unnecessary stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
decipher2k committed Oct 31, 2017
1 parent 161a3c5 commit 93f4bc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,8 @@ public void onClick(DialogInterface dialog, int id) {

public void clkUpdateHostsFile(View view) {
writePrefs();
HostsFileDownloader dlr = new HostsFileDownloader();
ArrayList l = new ArrayList();
HostsFileDownloader.StevenBlackSublist sl[] = {};

ArrayList l = new ArrayList();

((Button)findViewById(R.id.bnEditHostsFile)).setEnabled(false);
((Button)findViewById(R.id.bnResetHostsFile)).setEnabled(false);
Expand Down Expand Up @@ -463,9 +461,9 @@ public void reset()

public void clkReseteHostsFile(View view) {
try {
HostsFileDownloader dlr = new HostsFileDownloader();

ArrayList l = new ArrayList();
HostsFileDownloader.StevenBlackSublist sl[] = {};




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,45 +111,8 @@ public void run() {
Looper.prepare();
act.setText();
Runtime.getRuntime().exec(new String[] { "su", "-c", "mount -o ro,remount /system"});
}catch(Exception e){}

}

private static String getURL(String surl,MainActivity act) {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);

System.setProperty("java.net.preferIPv4Addresses", "true");
System.setProperty("java.net.preferIPv6Addresses", "false");
System.setProperty("validated.ipv6", "false");
String fullString = "";
try {

URL url = new URL(surl);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
long count=0;
while ((line = reader.readLine()) != null) {
fullString += line+"\n";
}
reader.close();
} catch (Exception ex) {
AlertDialog.Builder builder1 = new AlertDialog.Builder(act);
builder1.setMessage("Error: "+ex.getMessage());
builder1.setCancelable(false);

builder1.setPositiveButton(
"OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert11 = builder1.create();
alert11.show();
}catch(Exception e){
}

return fullString;
}
}
}

0 comments on commit 93f4bc2

Please sign in to comment.