Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Unified Diff: platform_tools/android/app/jni/com_skia_SkiaIntentService.cpp

Issue 22617002: Update Skia Android tools. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fixes to make the bots happy Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: platform_tools/android/app/jni/com_skia_SkiaIntentService.cpp
diff --git a/platform_tools/android/app/jni/com_skia_SkiaIntentService.cpp b/platform_tools/android/app/jni/com_skia_SkiaIntentService.cpp
deleted file mode 100644
index cd1d6a12759ab493bc8c78e1dc2f48b52f8cb167..0000000000000000000000000000000000000000
--- a/platform_tools/android/app/jni/com_skia_SkiaIntentService.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-#include "com_skia_SkiaIntentService.h"
-
-#include <stdint.h>
-#include <stdio.h>
-
-extern int main(int argc, char * const argv[]);
-
-void cleanUp(JNIEnv* env, jobjectArray jstrs, const char** strs, int32_t count) {
- for (int32_t i = 0; i < count; ++i)
- env->ReleaseStringUTFChars(
- (jstring) env->GetObjectArrayElement(jstrs, i), strs[i]);
-}
-
-JNIEXPORT jint JNICALL Java_com_skia_SkiaIntentService_run(
- JNIEnv* env,
- jobject,
- jobjectArray args) {
-
- // Convert command line arguments to C format.
- int argc = env->GetArrayLength(args);
- const char** argv = new const char*[argc];
- for (int32_t i = 0; i < argc; ++i) {
- jstring str = (jstring) env->GetObjectArrayElement(args, i);
- argv[i] = env->GetStringUTFChars(str, NULL);
- if (NULL == argv[i]) {
- cleanUp(env, args, argv, i - 1);
- return 1;
- }
- }
-
- // Execute program main()
- int retval = main(argc, (char* const*) argv);
-
- // Clean up temporaries and return the exit code.
- cleanUp(env, args, argv, argc);
- delete[] argv;
- return retval;
-}

Powered by Google App Engine
This is Rietveld 408576698