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

Commit b5dc215a authored by Chris Craik's avatar Chris Craik
Browse files

Pass webview instance when getting base layer / color, and prevent null value

Depends on external/webkit change: https://android-git.corp.google.com/g/#/c/188470/

bug:6429897
Change-Id: Ic948f102034dbe57c61d7fc6de73a4ddd062f686
parent 87156c96
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -3299,7 +3299,8 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
    }
    }


    public int getPageBackgroundColor() {
    public int getPageBackgroundColor() {
        return nativeGetBackgroundColor();
        if (mNativeClass == 0) return Color.WHITE;
        return nativeGetBackgroundColor(mNativeClass);
    }
    }


    /**
    /**
@@ -4456,7 +4457,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
        if (mNativeClass == 0) {
        if (mNativeClass == 0) {
            return 0;
            return 0;
        }
        }
        return nativeGetBaseLayer();
        return nativeGetBaseLayer(mNativeClass);
    }
    }


    private void onZoomAnimationStart() {
    private void onZoomAnimationStart() {
@@ -8593,7 +8594,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
    private native void     nativeSetHeightCanMeasure(boolean measure);
    private native void     nativeSetHeightCanMeasure(boolean measure);
    private native boolean  nativeSetBaseLayer(int nativeInstance,
    private native boolean  nativeSetBaseLayer(int nativeInstance,
            int layer, boolean showVisualIndicator, boolean isPictureAfterFirstLayout);
            int layer, boolean showVisualIndicator, boolean isPictureAfterFirstLayout);
    private native int      nativeGetBaseLayer();
    private native int      nativeGetBaseLayer(int nativeInstance);
    private native void     nativeCopyBaseContentToPicture(Picture pict);
    private native void     nativeCopyBaseContentToPicture(Picture pict);
    private native boolean  nativeHasContent();
    private native boolean  nativeHasContent();
    private native void     nativeStopGL();
    private native void     nativeStopGL();
@@ -8621,7 +8622,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
     */
     */
    private native boolean  nativeScrollLayer(int nativeInstance, int layer, int newX, int newY);
    private native boolean  nativeScrollLayer(int nativeInstance, int layer, int newX, int newY);
    private native void     nativeSetIsScrolling(boolean isScrolling);
    private native void     nativeSetIsScrolling(boolean isScrolling);
    private native int      nativeGetBackgroundColor();
    private native int      nativeGetBackgroundColor(int nativeInstance);
    native boolean  nativeSetProperty(String key, String value);
    native boolean  nativeSetProperty(String key, String value);
    native String   nativeGetProperty(String key);
    native String   nativeGetProperty(String key);
    /**
    /**