Skip to content

Commit b010601

Browse files
ChrisCraikAndroid (Google) Code Review
authored andcommitted
Merge "Pass webview instance when getting base layer / color, and prevent null value" into jb-dev
2 parents 5602d02 + b5dc215 commit b010601

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,7 +3298,8 @@ public int getContentWidth() {
32983298
}
32993299

33003300
public int getPageBackgroundColor() {
3301-
return nativeGetBackgroundColor();
3301+
if (mNativeClass == 0) return Color.WHITE;
3302+
return nativeGetBackgroundColor(mNativeClass);
33023303
}
33033304

33043305
/**
@@ -4455,7 +4456,7 @@ int getBaseLayer() {
44554456
if (mNativeClass == 0) {
44564457
return 0;
44574458
}
4458-
return nativeGetBaseLayer();
4459+
return nativeGetBaseLayer(mNativeClass);
44594460
}
44604461

44614462
private void onZoomAnimationStart() {
@@ -8657,7 +8658,7 @@ private native void nativeUpdateDrawGLFunction(int nativeInstance, Rect invS
86578658
private native void nativeSetHeightCanMeasure(boolean measure);
86588659
private native boolean nativeSetBaseLayer(int nativeInstance,
86598660
int layer, boolean showVisualIndicator, boolean isPictureAfterFirstLayout);
8660-
private native int nativeGetBaseLayer();
8661+
private native int nativeGetBaseLayer(int nativeInstance);
86618662
private native void nativeCopyBaseContentToPicture(Picture pict);
86628663
private native boolean nativeHasContent();
86638664
private native void nativeStopGL();
@@ -8685,7 +8686,7 @@ private native int nativeScrollableLayer(int nativeInstance, int x, int y,
86858686
*/
86868687
private native boolean nativeScrollLayer(int nativeInstance, int layer, int newX, int newY);
86878688
private native void nativeSetIsScrolling(boolean isScrolling);
8688-
private native int nativeGetBackgroundColor();
8689+
private native int nativeGetBackgroundColor(int nativeInstance);
86898690
native boolean nativeSetProperty(String key, String value);
86908691
native String nativeGetProperty(String key);
86918692
/**

0 commit comments

Comments
 (0)