From 9b77b6b8a30cbbb7252f6b26be052addff68934e Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 10 Dec 2015 17:23:07 -0500 Subject: [PATCH] Bug 1230522 - Make some unimplemented functions not be native. r=rbarker --- .../gecko/gfx/NativePanZoomController.java | 11 +++++- mozglue/android/jni-stubs.inc | 38 ------------------- widget/android/AndroidJNI.cpp | 14 ------- 3 files changed, 9 insertions(+), 54 deletions(-) diff --git a/mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java b/mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java index 74a6c785ac4..f57a7b75d72 100644 --- a/mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java +++ b/mobile/android/base/java/org/mozilla/gecko/gfx/NativePanZoomController.java @@ -92,10 +92,17 @@ class NativePanZoomController implements PanZoomController, GeckoEventListener { public native void destroy(); @Override public native boolean getRedrawHint(); + @Override - public native void setOverScrollMode(int overscrollMode); + public void setOverScrollMode(int overscrollMode) { + // FIXME implement this + } + @Override - public native int getOverScrollMode(); + public int getOverScrollMode() { + // FIXME implement this + return 0; + } @WrapForJNI(allowMultithread = true, stubName = "RequestContentRepaintWrapper") private void requestContentRepaint(float x, float y, float width, float height, float resolution) { diff --git a/mozglue/android/jni-stubs.inc b/mozglue/android/jni-stubs.inc index 44cce979df6..757c54cf17b 100644 --- a/mozglue/android/jni-stubs.inc +++ b/mozglue/android/jni-stubs.inc @@ -742,44 +742,6 @@ Java_org_mozilla_gecko_gfx_NativePanZoomController_getRedrawHint(JNIEnv * arg0, #ifdef JNI_STUBS -typedef void (*Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode_t)(JNIEnv *, jobject, jint); -static Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode_t f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode; -extern "C" NS_EXPORT void MOZ_JNICALL -Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode(JNIEnv * arg0, jobject arg1, jint arg2) { - if (!f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode) { - arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"), - "JNI Function called before it was loaded"); - return ; - } - f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode(arg0, arg1, arg2); -} -#endif - -#ifdef JNI_BINDINGS - xul_dlsym("Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode", &f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode); -#endif - -#ifdef JNI_STUBS - -typedef jint (*Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode_t)(JNIEnv *, jobject); -static Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode_t f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode; -extern "C" NS_EXPORT jint MOZ_JNICALL -Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(JNIEnv * arg0, jobject arg1) { - if (!f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode) { - arg0->ThrowNew(arg0->FindClass("java/lang/UnsupportedOperationException"), - "JNI Function called before it was loaded"); - return 0; - } - return f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(arg0, arg1); -} -#endif - -#ifdef JNI_BINDINGS - xul_dlsym("Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode", &f_Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode); -#endif - -#ifdef JNI_STUBS - typedef void (*Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled_t)(JNIEnv *, jobject, jboolean); static Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled_t f_Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled; extern "C" NS_EXPORT void MOZ_JNICALL diff --git a/widget/android/AndroidJNI.cpp b/widget/android/AndroidJNI.cpp index d82ce938622..c8065bdc29a 100644 --- a/widget/android/AndroidJNI.cpp +++ b/widget/android/AndroidJNI.cpp @@ -402,20 +402,6 @@ Java_org_mozilla_gecko_gfx_NativePanZoomController_getRedrawHint(JNIEnv* env, jo return true; } -NS_EXPORT void JNICALL -Java_org_mozilla_gecko_gfx_NativePanZoomController_setOverScrollMode(JNIEnv* env, jobject instance, jint overscrollMode) -{ - // FIXME implement this -} - -NS_EXPORT jint JNICALL -Java_org_mozilla_gecko_gfx_NativePanZoomController_getOverScrollMode(JNIEnv* env, jobject instance) -{ - // FIXME implement this - return 0; -} - - NS_EXPORT void JNICALL Java_org_mozilla_gecko_gfx_NativePanZoomController_setIsLongpressEnabled(JNIEnv* env, jobject instance, jboolean isLongpressEnabled) {