|
|
@ -94,14 +94,10 @@ public class LightningView { |
|
|
|
private final WebViewHandler mWebViewHandler = new WebViewHandler(this); |
|
|
|
private final WebViewHandler mWebViewHandler = new WebViewHandler(this); |
|
|
|
private final Map<String, String> mRequestHeaders = new ArrayMap<>(); |
|
|
|
private final Map<String, String> mRequestHeaders = new ArrayMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
@Inject |
|
|
|
@Inject Bus mEventBus; |
|
|
|
Bus mEventBus; |
|
|
|
@Inject PreferenceManager mPreferences; |
|
|
|
|
|
|
|
@Inject LightningDialogBuilder mBookmarksDialogBuilder; |
|
|
|
@Inject |
|
|
|
@Inject ProxyUtils mProxyUtils; |
|
|
|
PreferenceManager mPreferences; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Inject |
|
|
|
|
|
|
|
LightningDialogBuilder mBookmarksDialogBuilder; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("NewApi") |
|
|
|
@SuppressLint("NewApi") |
|
|
|
public LightningView(Activity activity, String url, boolean isIncognito) { |
|
|
|
public LightningView(Activity activity, String url, boolean isIncognito) { |
|
|
@ -362,7 +358,6 @@ public class LightningView { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Initialize the settings of the WebView that are intrinsic to Lightning and cannot |
|
|
|
* Initialize the settings of the WebView that are intrinsic to Lightning and cannot |
|
|
|
* be altered by the user. Distinguish between Incognito and Regular tabs here. |
|
|
|
* be altered by the user. Distinguish between Incognito and Regular tabs here. |
|
|
|
* |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@SuppressLint("NewApi") |
|
|
|
@SuppressLint("NewApi") |
|
|
|
private void initializeSettings() { |
|
|
|
private void initializeSettings() { |
|
|
@ -724,7 +719,7 @@ public class LightningView { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public synchronized void reload() { |
|
|
|
public synchronized void reload() { |
|
|
|
// Check if configured proxy is available
|
|
|
|
// Check if configured proxy is available
|
|
|
|
if (!ProxyUtils.getInstance().isProxyReady()) { |
|
|
|
if (!mProxyUtils.isProxyReady()) { |
|
|
|
// User has been notified
|
|
|
|
// User has been notified
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -976,7 +971,7 @@ public class LightningView { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public synchronized void loadUrl(@NonNull String url) { |
|
|
|
public synchronized void loadUrl(@NonNull String url) { |
|
|
|
// Check if configured proxy is available
|
|
|
|
// Check if configured proxy is available
|
|
|
|
if (!ProxyUtils.getInstance().isProxyReady()) { |
|
|
|
if (!mProxyUtils.isProxyReady()) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|