I need to know which class sets the value of WebView
's setSavePassword()
to true
.
I have checked the framework source code of WebSettings in the path:
frameworks/base/core/java/android/webkit/WebSettings.java
But I found only the abstract class method.
/**
* Sets whether the WebView should save passwords. The default is {@code true}.
* @deprecated Saving passwords in WebView will not be supported in future versions.
*/
@Deprecated
public abstract void setSavePassword(boolean save);
Let me know which class the default value of the boolean changed to true
.
Locate the WebView source code: Navigate to the WebView module in the AOSP source code. The WebView code is typically located in the frameworks/base/core/java/android/webkit directory.
Find the WebSettings class: Look for the WebSettings class within the android.webkit package. The file might be named WebSettings.java.
Locate the setSavePassword method: Search for the setSavePassword method within the WebSettings class. It should be a public method responsible for setting whether passwords should be saved.
Modify the method implementation: Change the implementation of the setSavePassword method to set the value to true. The code might look like this: