为什么SDK源代码中的WebView扩展了MockView?

lir*_*rui 6 android webview

在我的android工作室中,我找到了WebView源代码,但它似乎是空的,而最高评论是:

/**
* Mock version of the WebView.
* Only non override public methods from the real WebView have been added in there.
* Methods that take an unknown class as parameter or as return object, have been removed for now.
* 
* TODO: generate automatically.
*
*/
Run Code Online (Sandbox Code Playgroud)

但是在github android源代码中,它不是这样的,而且看起来这是真实的WebView.

所以我的问题是为什么有两个不同的WebView源代码,是MockView什么?

sra*_*ain 5

在提供的范围中,WebViewin android.jar是模拟版本,仅用于开发目的,使用模拟版本webview可以在布局窗口中呈现webview,可以在代码中调用API。

在运行时范围中,WebView将被替换。