Merge "Fix return type mismatch in Region's JNI code."

This commit is contained in:
Derek Sollenberger
2013-02-04 13:16:40 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -255,7 +255,7 @@ static JNINativeMethod gRegionMethods[] = {
// these are static methods
{ "nativeConstructor", "()I", (void*)Region_constructor },
{ "nativeDestructor", "(I)V", (void*)Region_destructor },
{ "nativeSetRegion", "(II)Z", (void*)Region_setRegion },
{ "nativeSetRegion", "(II)V", (void*)Region_setRegion },
{ "nativeSetRect", "(IIIII)Z", (void*)Region_setRect },
{ "nativeSetPath", "(III)Z", (void*)Region_setPath },
{ "nativeGetBounds", "(ILandroid/graphics/Rect;)Z", (void*)Region_getBounds },

View File

@@ -87,7 +87,8 @@ public class Region implements Parcelable {
/** Set the region to the specified region.
*/
public boolean set(Region region) {
return nativeSetRegion(mNativeRegion, region.mNativeRegion);
nativeSetRegion(mNativeRegion, region.mNativeRegion);
return true;
}
/** Set the region to the specified rectangle
@@ -406,8 +407,7 @@ public class Region implements Parcelable {
private static native int nativeConstructor();
private static native void nativeDestructor(int native_region);
private static native boolean nativeSetRegion(int native_dst,
int native_src);
private static native void nativeSetRegion(int native_dst, int native_src);
private static native boolean nativeSetRect(int native_dst, int left,
int top, int right, int bottom);
private static native boolean nativeSetPath(int native_dst, int native_path,