Fixed a setting, lowered priority on a thread
This commit is contained in:
parent
7e67770617
commit
59c720d7d8
@ -90,6 +90,7 @@ public class SearchAdapter extends BaseAdapter implements Filterable {
|
||||
mSearchDrawable = ThemeUtils.getThemedDrawable(context, R.drawable.ic_search, mDarkTheme);
|
||||
mBookmarkDrawable = ThemeUtils.getThemedDrawable(context, R.drawable.ic_bookmark, mDarkTheme);
|
||||
mHistoryDrawable = ThemeUtils.getThemedDrawable(context, R.drawable.ic_history, mDarkTheme);
|
||||
delete.setPriority(Thread.MIN_PRIORITY);
|
||||
delete.start();
|
||||
}
|
||||
|
||||
|
@ -317,6 +317,9 @@ public class LightningView {
|
||||
if (mPreferences.getJavaScriptEnabled()) {
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(true);
|
||||
} else {
|
||||
settings.setJavaScriptEnabled(false);
|
||||
settings.setJavaScriptCanOpenWindowsAutomatically(false);
|
||||
}
|
||||
|
||||
if (mPreferences.getTextReflowEnabled()) {
|
||||
@ -707,12 +710,12 @@ public class LightningView {
|
||||
|
||||
@Override
|
||||
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (mAdBlock.isAd(request.getUrl().getHost())) {
|
||||
ByteArrayInputStream EMPTY = new ByteArrayInputStream("".getBytes());
|
||||
return new WebResourceResponse("text/plain", "utf-8", EMPTY);
|
||||
}
|
||||
|
||||
}
|
||||
return super.shouldInterceptRequest(view, request);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user