代码拉取完成,页面将自动刷新
同步操作将从 MengWenYao/xwalk_core_library 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
replaceArr=( "android\.\*"
"com.tencent.smtt.export.external.interfaces.*"
"android\.webkit\.WebStorage\.\*"
"com.tencent.smtt.export.external.interfaces.*"
"android\.webkit\.\*"
"com.tencent.smtt.export.external.interfaces.*"
"android\.net\.\*"
"com.tencent.smtt.export.external.interfaces.*"
"android\.net\.http\.\*"
"com.tencent.smtt.export.external.interfaces.*"
"android\.webkit\.ConsoleMessage"
"com.tencent.smtt.export.external.interfaces.ConsoleMessage"
"android\.webkit\.Cachemanager"
"com.tencent.smtt.sdk.Cachemanager"
"android\.webkit\.CookieManager"
"com.tencent.smtt.sdk.CookieManager"
"android\.webkit\.CookieSyncManager"
"com.tencent.smtt.sdk.CookieSyncManager"
"android\.webkit\.DownloadListener"
"com.tencent.smtt.sdk.DownloadListener"
"android\.webkit\.GeolocationPermissions"
"com.tencent.smtt.export.external.interfaces.GeolocationPermissionsCallback"
"android\.webkit\.HttpAuthHandler"
"com.tencent.smtt.export.external.interfaces.HttpAuthHandler"
"android\.webkit\.JspromptResult"
"com.tencent.smtt.export.external.interfaces.JsPromptResult"
"android\.webkit\.JsResult"
"com.tencent.smtt.export.external.interfaces.JsResult"
"android\.webkit\.SslErrorHandler"
"com.tencent.smtt.export.external.interfaces.SslErrorHandler"
"android\.webkit\.ValueCallback"
"com.tencent.smtt.sdk.ValueCallback"
"android\.webkit\.WebBackForwardList"
"com.tencent.smtt.sdk.WebBackForwardList"
"android\.webkit\.WebChromeClient"
"com.tencent.smtt.sdk.WebChromeClient"
"android\.webkit\.WebHistoryItem"
"com.tencent.smtt.sdk.WebHistoryItem"
"android\.webkit\.WebIconDatabase"
"com.tencent.smtt.sdk.WebIconDatabase"
"android\.webkit\.WebResourceResponse"
"com.tencent.smtt.export.external.interfaces.WebResourceResponse"
"android\.webkit\.WebSettings"
"com.tencent.smtt.sdk.WebSettings"
"android\.webkit\.WebStorage"
"com.tencent.smtt.sdk.WebStorage"
"android\.webkit\.WebView[^C]"
"com.tencent.smtt.sdk.WebView"
"android\.webkit\.WebViewClient"
"com.tencent.smtt.sdk.WebViewClient"
"android\.webkit\.WebStorage.QuotaUpdater"
"com.tencent.smtt.export.external.interfaces.QuotaUpdater"
"android\.net\.SslError"
"com.tencent.smtt.export.external.interfaces.SslError"
"android\.net\.\*"
"com.tencent.smtt.export.external.interfaces.*"
"android\.webkit\.WebViewDatabase"
"com.tencent.smtt.sdk.WebViewDatabase"
)
#ignoreFolder="ReaderZone"
ignoreFolder="somefolder"
#step1 find all java files containing potential bad codings
BAD_FILES=(`grep -E "android\.webkit\.|android\.net\." . -rl | grep "\.java$" | grep -v ${ignoreFolder}`)
#step2 print every bad coding.
for file in ${BAD_FILES[@]}; do
i=0
while [ $i -lt ${#replaceArr[@]} ]
do
#echo ${replaceArr[$i]}
result=`grep "${replaceArr[$i]}" ${file} | grep -v "^\s*\*" | grep -v "^\s*//"`
if [ "${result}"x != ""x ]; then
echo "======" ${file} "=========="
grep "${replaceArr[$i]}" ${file} -n
echo "!!!please replace with ${replaceArr[${i}+1]}"
fi
let i+=2
done
done
#step2 find all xml files containing potential bad codings
BAD_FILES_XML=(`grep -E "<\s*WebView" . -rl | grep "\.xml$" | grep -v ${ignoreFolder}`)
ALL_JAVA_FILES=(`find . -name "*.java" | grep -v ${ignoreFolder}`)
for file in ${BAD_FILES_XML[@]}; do
result=`grep "<\s*WebView" ${file} | grep -v "^\s*<!"`
if [ "${result}"x != ""x ]; then
#echo "======" ${file} "=========="
viewIds=`sed -n '/<\s*WebView/,/\/.*>/ p' ${file} | grep "android:id.*/\(.*\)\"" | sed -e 's/.*android.*\///' | sed -e 's/".*//'`
for viewId in ${viewIds[@]}; do
#echo ${viewId}
foundInJava=`grep -E "\b${viewId}\b" . -rl | grep -E "\.java$"`
#if a viewId is never used, ignore it.
if [ "${foundInJava}"x != ""x ]; then
echo "======" ${file} "=========="
echo "!!!please replace \"<WebView\" of id ${viewId} with \"<com.tencent.smtt.sdk.WebView\""
fi
done
fi
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。