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
|
// load iitc script from web or asset folder
|
||||||
if (iitc_source.contains("http")) {
|
if (iitc_source.contains("http")) {
|
||||||
URL url = new URL(iitc_source);
|
URL url = new URL(iitc_source);
|
||||||
// if url.openStream() is parsed from a scanner
|
// if parsing of the online iitc source timed out, use the script from assets
|
||||||
// the NetworkOnMainThread exception is thrown
|
|
||||||
// use a async task for this
|
|
||||||
try {
|
try {
|
||||||
js = new UrlContentToString().execute(url).get(5, TimeUnit.SECONDS);
|
js = new UrlContentToString().execute(url).get(5, TimeUnit.SECONDS);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
@ -9,9 +9,9 @@ import java.net.URL;
|
|||||||
import java.util.Scanner;
|
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
|
* 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> {
|
public class UrlContentToString extends AsyncTask<URL, Integer, String> {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user