WebViewFragment中违反了一系列事件

时间:2018-01-26 07:47:34

标签: android android-webview

https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/webkit/WebViewFragment.java 它写道:

public boolean retainAll(Collection c) {  
    if(c == null)
    {
        throw new NullPointerException("collection is null");
    }
    Iterator itr = iterator(); // i.e. iterate over this list

    boolean found = false;
    while(itr.hasNext())
    {   
        if(!c.contains(itr.next()))
        {
            itr.remove(); 
            found = true; 
        }
    }

    return found;
}

我认为,有一个错误。可能/** * Called when the fragment is visible to the user and actively running. Resumes the WebView. */ @Override public void onPause() { super.onPause(); mWebView.onPause(); } /** * Called when the fragment is no longer resumed. Pauses the WebView. */ @Override public void onResume() { mWebView.onResume(); super.onResume(); } 应替换为onPause,反之亦然。如果我替换了复制粘贴类中的行为,我可以得到任何错误吗?

0 个答案:

没有答案