Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 153f1061 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Cleanup functor system-api surface"

parents 67491373 e9aeadb1
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -9637,16 +9637,16 @@ package android.webkit {
  public final class WebViewDelegate {
  public final class WebViewDelegate {
    method public void addWebViewAssetPath(android.content.Context);
    method public void addWebViewAssetPath(android.content.Context);
    method public void callDrawGlFunction(android.graphics.Canvas, long);
    method @Deprecated public void callDrawGlFunction(android.graphics.Canvas, long);
    method public void callDrawGlFunction(@NonNull android.graphics.Canvas, long, @Nullable Runnable);
    method @Deprecated public void callDrawGlFunction(@NonNull android.graphics.Canvas, long, @Nullable Runnable);
    method public boolean canInvokeDrawGlFunctor(android.view.View);
    method @Deprecated public boolean canInvokeDrawGlFunctor(android.view.View);
    method public void detachDrawGlFunctor(android.view.View, long);
    method @Deprecated public void detachDrawGlFunctor(android.view.View, long);
    method public void drawWebViewFunctor(@NonNull android.graphics.Canvas, int);
    method public void drawWebViewFunctor(@NonNull android.graphics.Canvas, int);
    method public android.app.Application getApplication();
    method public android.app.Application getApplication();
    method public String getDataDirectorySuffix();
    method public String getDataDirectorySuffix();
    method public String getErrorString(android.content.Context, int);
    method public String getErrorString(android.content.Context, int);
    method public int getPackageId(android.content.res.Resources, String);
    method public int getPackageId(android.content.res.Resources, String);
    method public void invokeDrawGlFunctor(android.view.View, long, boolean);
    method @Deprecated public void invokeDrawGlFunctor(android.view.View, long, boolean);
    method public boolean isMultiProcessEnabled();
    method public boolean isMultiProcessEnabled();
    method public boolean isTraceTagEnabled();
    method public boolean isTraceTagEnabled();
    method public void setOnTraceEnabledChangeListener(android.webkit.WebViewDelegate.OnTraceEnabledChangeListener);
    method public void setOnTraceEnabledChangeListener(android.webkit.WebViewDelegate.OnTraceEnabledChangeListener);
+12 −1
Original line number Original line Diff line number Diff line
@@ -79,7 +79,10 @@ public final class WebViewDelegate {
    /**
    /**
     * Returns {@code true} if the draw GL functor can be invoked (see {@link #invokeDrawGlFunctor})
     * Returns {@code true} if the draw GL functor can be invoked (see {@link #invokeDrawGlFunctor})
     * and {@code false} otherwise.
     * and {@code false} otherwise.
     *
     * @deprecated Use {@link #drawWebViewFunctor(Canvas, int)}
     */
     */
    @Deprecated
    public boolean canInvokeDrawGlFunctor(View containerView) {
    public boolean canInvokeDrawGlFunctor(View containerView) {
        return true;
        return true;
    }
    }
@@ -90,7 +93,9 @@ public final class WebViewDelegate {
     *
     *
     * @param nativeDrawGLFunctor the pointer to the native functor that implements
     * @param nativeDrawGLFunctor the pointer to the native functor that implements
     *        system/core/include/utils/Functor.h
     *        system/core/include/utils/Functor.h
     * @deprecated Use {@link #drawWebViewFunctor(Canvas, int)}
     */
     */
    @Deprecated
    public void invokeDrawGlFunctor(View containerView, long nativeDrawGLFunctor,
    public void invokeDrawGlFunctor(View containerView, long nativeDrawGLFunctor,
            boolean waitForCompletion) {
            boolean waitForCompletion) {
        ViewRootImpl.invokeFunctor(nativeDrawGLFunctor, waitForCompletion);
        ViewRootImpl.invokeFunctor(nativeDrawGLFunctor, waitForCompletion);
@@ -105,7 +110,9 @@ public final class WebViewDelegate {
     * @param nativeDrawGLFunctor the pointer to the native functor that implements
     * @param nativeDrawGLFunctor the pointer to the native functor that implements
     *        system/core/include/utils/Functor.h
     *        system/core/include/utils/Functor.h
     * @throws IllegalArgumentException if the canvas is not hardware accelerated
     * @throws IllegalArgumentException if the canvas is not hardware accelerated
     * @deprecated Use {@link #drawWebViewFunctor(Canvas, int)}
     */
     */
    @Deprecated
    public void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor) {
    public void callDrawGlFunction(Canvas canvas, long nativeDrawGLFunctor) {
        if (!(canvas instanceof RecordingCanvas)) {
        if (!(canvas instanceof RecordingCanvas)) {
            // Canvas#isHardwareAccelerated() is only true for subclasses of HardwareCanvas.
            // Canvas#isHardwareAccelerated() is only true for subclasses of HardwareCanvas.
@@ -126,7 +133,9 @@ public final class WebViewDelegate {
     * @param releasedRunnable Called when this nativeDrawGLFunctor is no longer referenced by this
     * @param releasedRunnable Called when this nativeDrawGLFunctor is no longer referenced by this
     *        canvas, so is safe to be destroyed.
     *        canvas, so is safe to be destroyed.
     * @throws IllegalArgumentException if the canvas is not hardware accelerated
     * @throws IllegalArgumentException if the canvas is not hardware accelerated
     * @deprecated Use {@link #drawWebViewFunctor(Canvas, int)}
     */
     */
    @Deprecated
    public void callDrawGlFunction(@NonNull Canvas canvas, long nativeDrawGLFunctor,
    public void callDrawGlFunction(@NonNull Canvas canvas, long nativeDrawGLFunctor,
            @Nullable Runnable releasedRunnable) {
            @Nullable Runnable releasedRunnable) {
        if (!(canvas instanceof RecordingCanvas)) {
        if (!(canvas instanceof RecordingCanvas)) {
@@ -139,7 +148,7 @@ public final class WebViewDelegate {


    /**
    /**
     * Call webview draw functor. See API in draw_fn.h.
     * Call webview draw functor. See API in draw_fn.h.
     * @param canvas a hardware accelerated canvas (see {@link Canvas#isHardwareAccelerated()}).
     * @param canvas a {@link RecordingCanvas}.
     * @param functor created by AwDrawFn_CreateFunctor in draw_fn.h.
     * @param functor created by AwDrawFn_CreateFunctor in draw_fn.h.
     */
     */
    public void drawWebViewFunctor(@NonNull Canvas canvas, int functor) {
    public void drawWebViewFunctor(@NonNull Canvas canvas, int functor) {
@@ -156,7 +165,9 @@ public final class WebViewDelegate {
     *
     *
     * @param nativeDrawGLFunctor the pointer to the native functor that implements
     * @param nativeDrawGLFunctor the pointer to the native functor that implements
     *        system/core/include/utils/Functor.h
     *        system/core/include/utils/Functor.h
     * @deprecated Use {@link #drawWebViewFunctor(Canvas, int)}
     */
     */
    @Deprecated
    public void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor) {
    public void detachDrawGlFunctor(View containerView, long nativeDrawGLFunctor) {
        ViewRootImpl viewRootImpl = containerView.getViewRootImpl();
        ViewRootImpl viewRootImpl = containerView.getViewRootImpl();
        if (nativeDrawGLFunctor != 0 && viewRootImpl != null) {
        if (nativeDrawGLFunctor != 0 && viewRootImpl != null) {
+4 −0
Original line number Original line Diff line number Diff line
@@ -166,7 +166,9 @@ public final class RecordingCanvas extends DisplayListCanvas {
     * @param drawGLFunction A native function pointer
     * @param drawGLFunction A native function pointer
     *
     *
     * @hide
     * @hide
     * @deprecated Use {@link #drawWebViewFunctor(int)}
     */
     */
    @Deprecated
    public void callDrawGLFunction2(long drawGLFunction) {
    public void callDrawGLFunction2(long drawGLFunction) {
        nCallDrawGLFunction(mNativeCanvasWrapper, drawGLFunction, null);
        nCallDrawGLFunction(mNativeCanvasWrapper, drawGLFunction, null);
    }
    }
@@ -184,7 +186,9 @@ public final class RecordingCanvas extends DisplayListCanvas {
     * canvas's display list has been released.
     * canvas's display list has been released.
     *
     *
     * @hide
     * @hide
     * @deprecated Use {@link #drawWebViewFunctor(int)}
     */
     */
    @Deprecated
    public void drawGLFunctor2(long drawGLFunctor, @Nullable Runnable releasedCallback) {
    public void drawGLFunctor2(long drawGLFunctor, @Nullable Runnable releasedCallback) {
        nCallDrawGLFunction(mNativeCanvasWrapper, drawGLFunctor, releasedCallback);
        nCallDrawGLFunction(mNativeCanvasWrapper, drawGLFunctor, releasedCallback);
    }
    }