Merge "Provide an API to set print document name."
This commit is contained in:
@@ -32735,7 +32735,8 @@ package android.webkit {
|
||||
method public void clearSslPreferences();
|
||||
method public deprecated void clearView();
|
||||
method public android.webkit.WebBackForwardList copyBackForwardList();
|
||||
method public android.print.PrintDocumentAdapter createPrintDocumentAdapter();
|
||||
method public deprecated android.print.PrintDocumentAdapter createPrintDocumentAdapter();
|
||||
method public android.print.PrintDocumentAdapter createPrintDocumentAdapter(java.lang.String);
|
||||
method public void destroy();
|
||||
method public void documentHasImages(android.os.Message);
|
||||
method public void evaluateJavascript(java.lang.String, android.webkit.ValueCallback<java.lang.String>);
|
||||
|
||||
@@ -1135,10 +1135,19 @@ public class WebView extends AbsoluteLayout
|
||||
return mProvider.capturePicture();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #createPrintDocumentAdapter(String)} which requires user
|
||||
* to provide a print document name.
|
||||
*/
|
||||
@Deprecated
|
||||
public PrintDocumentAdapter createPrintDocumentAdapter() {
|
||||
checkThread();
|
||||
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "createPrintDocumentAdapter");
|
||||
return mProvider.createPrintDocumentAdapter("default");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a PrintDocumentAdapter that provides the content of this Webview for printing.
|
||||
* Only supported for API levels
|
||||
* {@link android.os.Build.VERSION_CODES#KITKAT} and above.
|
||||
*
|
||||
* The adapter works by converting the Webview contents to a PDF stream. The Webview cannot
|
||||
* be drawn during the conversion process - any such draws are undefined. It is recommended
|
||||
@@ -1146,11 +1155,14 @@ public class WebView extends AbsoluteLayout
|
||||
* temporarily hide a visible WebView by using a custom PrintDocumentAdapter instance
|
||||
* wrapped around the object returned and observing the onStart and onFinish methods. See
|
||||
* {@link android.print.PrintDocumentAdapter} for more information.
|
||||
*
|
||||
* @param documentName The user-facing name of the printed document. See
|
||||
* {@link android.print.PrintDocumentInfo}
|
||||
*/
|
||||
public PrintDocumentAdapter createPrintDocumentAdapter() {
|
||||
public PrintDocumentAdapter createPrintDocumentAdapter(String documentName) {
|
||||
checkThread();
|
||||
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "createPrintDocumentAdapter");
|
||||
return mProvider.createPrintDocumentAdapter();
|
||||
return mProvider.createPrintDocumentAdapter(documentName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,7 +148,7 @@ public interface WebViewProvider {
|
||||
|
||||
public Picture capturePicture();
|
||||
|
||||
public PrintDocumentAdapter createPrintDocumentAdapter();
|
||||
public PrintDocumentAdapter createPrintDocumentAdapter(String documentName);
|
||||
|
||||
public float getScale();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user