changed comments
This commit is contained in:
parent
7fcb1e0874
commit
a1cfa9b8d6
@ -95,9 +95,7 @@ public class IITC_WebViewClient extends WebViewClient {
|
||||
// load iitc script from web or asset folder
|
||||
if (iitc_source.contains("http")) {
|
||||
URL url = new URL(iitc_source);
|
||||
// if url.openStream() is parsed from a scanner
|
||||
// the NetworkOnMainThread exception is thrown
|
||||
// use a async task for this
|
||||
// if parsing of the online iitc source timed out, use the script from assets
|
||||
try {
|
||||
js = new UrlContentToString().execute(url).get(5, TimeUnit.SECONDS);
|
||||
} catch (InterruptedException e) {
|
||||
|
@ -9,9 +9,9 @@ import java.net.URL;
|
||||
import java.util.Scanner;
|
||||
|
||||
/*
|
||||
* this class parses the content of an web page.
|
||||
* this class parses the content of a web page.
|
||||
* since network operations shouldn't be done on main UI thread
|
||||
* we use an async task for this.
|
||||
* (NetworkOnMainThread exception is thrown) we use an async task for this.
|
||||
*/
|
||||
public class UrlContentToString extends AsyncTask<URL, Integer, String> {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user