Index: tools/viewer/sk_app/android/surface_glue_android.cpp |
diff --git a/tools/viewer/sk_app/android/surface_glue_android.cpp b/tools/viewer/sk_app/android/surface_glue_android.cpp |
index daf26a3852ed2c6275816f4756829dc2d06a0567..958b7876b8baa674aec32cc89c684d8f7db0edda 100644 |
--- a/tools/viewer/sk_app/android/surface_glue_android.cpp |
+++ b/tools/viewer/sk_app/android/surface_glue_android.cpp |
@@ -46,7 +46,6 @@ |
fAndroidApp = env->NewGlobalRef(androidApp); |
jclass cls = env->GetObjectClass(fAndroidApp); |
fSetTitleMethodID = env->GetMethodID(cls, "setTitle", "(Ljava/lang/String;)V"); |
- fSetStateMethodID = env->GetMethodID(cls, "setState", "(Ljava/lang/String;)V"); |
fNativeWindow = nullptr; |
pthread_create(&fThread, nullptr, pthread_main, this); |
} |
@@ -69,12 +68,6 @@ |
jstring titleString = fPThreadEnv->NewStringUTF(title); |
fPThreadEnv->CallVoidMethod(fAndroidApp, fSetTitleMethodID, titleString); |
fPThreadEnv->DeleteLocalRef(titleString); |
-} |
- |
-void SkiaAndroidApp::setUIState(const Json::Value& state) const { |
- jstring jstr = fPThreadEnv->NewStringUTF(state.toStyledString().c_str()); |
- fPThreadEnv->CallVoidMethod(fAndroidApp, fSetStateMethodID, jstr); |
- fPThreadEnv->DeleteLocalRef(jstr); |
} |
void SkiaAndroidApp::postMessage(const Message& message) const { |
@@ -146,12 +139,6 @@ |
message.fTouchY); |
break; |
} |
- case kUIStateChanged: { |
- skiaAndroidApp->fWindow->onUIStateChanged(*message.stateName, *message.stateValue); |
- delete message.stateName; |
- delete message.stateValue; |
- break; |
- } |
default: { |
// do nothing |
} |
@@ -242,17 +229,4 @@ |
skiaAndroidApp->postMessage(message); |
} |
-extern "C" JNIEXPORT void JNICALL Java_org_skia_viewer_ViewerActivity_onUIStateChanged( |
- JNIEnv* env, jobject activity, jlong handle, jstring stateName, jstring stateValue) { |
- auto skiaAndroidApp = (SkiaAndroidApp*)handle; |
- Message message(kUIStateChanged); |
- const char* nameChars = env->GetStringUTFChars(stateName, nullptr); |
- const char* valueChars = env->GetStringUTFChars(stateValue, nullptr); |
- message.stateName = new SkString(nameChars); |
- message.stateValue = new SkString(valueChars); |
- skiaAndroidApp->postMessage(message); |
- env->ReleaseStringUTFChars(stateName, nameChars); |
- env->ReleaseStringUTFChars(stateValue, valueChars); |
-} |
- |
} // namespace sk_app |