mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-04 00:13:20 +08:00
Silence some deprecation linter warnings
This commit is contained in:
parent
f1f1ac3cbd
commit
47bb5184a0
@ -144,7 +144,7 @@ public class CoreAndroid extends CordovaPlugin {
|
||||
public void clearCache() {
|
||||
cordova.getActivity().runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
webView.clearCache(true);
|
||||
webView.clearCache();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -58,7 +58,11 @@ class SystemCookieManager implements ICordovaCookieManager {
|
||||
}
|
||||
|
||||
public void clearCookies() {
|
||||
cookieManager.removeAllCookie();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
cookieManager.removeAllCookies(null);
|
||||
} else {
|
||||
cookieManager.removeAllCookie();
|
||||
}
|
||||
}
|
||||
|
||||
public void flush() {
|
||||
|
@ -142,6 +142,7 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
* Handle database quota exceeded notification.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize,
|
||||
long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater)
|
||||
{
|
||||
@ -180,11 +181,13 @@ public class SystemWebChromeClient extends WebChromeClient {
|
||||
|
||||
// API level 7 is required for this, see if we could lower this using something else
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
|
||||
parentEngine.getCordovaWebView().showCustomView(view, callback);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onHideCustomView() {
|
||||
parentEngine.getCordovaWebView().hideCustomView();
|
||||
}
|
||||
|
@ -74,7 +74,8 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
* @param url The url to be loaded.
|
||||
* @return true to override, false for default behavior
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
return parentEngine.client.onNavigationAttempt(url);
|
||||
}
|
||||
@ -186,6 +187,7 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
* @param failingUrl The url that failed to load.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
|
||||
// Ignore error due to stopLoading().
|
||||
if (!isCurrentlyLoading) {
|
||||
@ -316,6 +318,7 @@ public class SystemWebViewClient extends WebViewClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
||||
try {
|
||||
// Check the against the whitelist and lock out access to the WebView directory
|
||||
|
Loading…
Reference in New Issue
Block a user