Index: platform_tools/android/apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp |
diff --git a/platform_tools/android/apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp b/platform_tools/android/apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp |
index 15f01a94bfb1e35bc4d14c967196e93846a75115..7da4fa81ca8011f40aec93ef6228f7f3a51c782d 100644 |
--- a/platform_tools/android/apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp |
+++ b/platform_tools/android/apps/sample_app/src/main/jni/com_skia_SkiaSampleRenderer.cpp |
@@ -27,13 +27,11 @@ struct ActivityGlue { |
jweak m_obj; |
jmethodID m_setTitle; |
jmethodID m_setSlideList; |
- jmethodID m_addToDownloads; |
ActivityGlue() { |
m_env = nullptr; |
m_obj = nullptr; |
m_setTitle = nullptr; |
m_setSlideList = nullptr; |
- m_addToDownloads = nullptr; |
} |
} gActivityGlue; |
@@ -122,30 +120,6 @@ void SkOSWindow::onHandleInval(const SkIRect& rect) |
env->CallVoidMethod(gWindowGlue.m_obj, gWindowGlue.m_inval); |
} |
-void SkOSWindow::onPDFSaved(const char title[], const char desc[], |
- const char path[]) |
-{ |
- JNIEnv* env = gActivityGlue.m_env; |
- if (!env || !gActivityGlue.m_addToDownloads || !gActivityGlue.m_obj) { |
- return; |
- } |
- if (env->IsSameObject(gActivityGlue.m_obj, nullptr)) { |
- SkDebugf("ERROR: The JNI WeakRef to the Activity is invalid"); |
- return; |
- } |
- |
- jstring jtitle = env->NewStringUTF(title); |
- jstring jdesc = env->NewStringUTF(desc); |
- jstring jpath = env->NewStringUTF(path); |
- |
- env->CallVoidMethod(gActivityGlue.m_obj, gActivityGlue.m_addToDownloads, |
- jtitle, jdesc, jpath); |
- |
- env->DeleteLocalRef(jtitle); |
- env->DeleteLocalRef(jdesc); |
- env->DeleteLocalRef(jpath); |
-} |
- |
/////////////////////////////////////////// |
/////////////// SkEvent impl ////////////// |
/////////////////////////////////////////// |
@@ -198,8 +172,6 @@ JNIEXPORT void JNICALL Java_com_skia_SkiaSampleRenderer_init(JNIEnv* env, |
gActivityGlue.m_obj = env->NewWeakGlobalRef(jsampleActivity); |
gActivityGlue.m_setTitle = GetJMethod(env, clazz, "setTitle", "(Ljava/lang/CharSequence;)V"); |
gActivityGlue.m_setSlideList = GetJMethod(env, clazz, "setSlideList", "([Ljava/lang/String;)V"); |
- gActivityGlue.m_addToDownloads = GetJMethod(env, clazz, "addToDownloads", |
- "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); |
env->DeleteLocalRef(clazz); |
// setup jni hooks to the java renderer |