Permalink
Browse files

Merge branch 'android' of git://192.168.21.75/lightning into android

  • Loading branch information...
2 parents 8108159 + ce1ff13 commit 9b311eaea21c1511033c9eb42f88f2b5f6b73dd3 @nazarov-andrey nazarov-andrey committed Sep 11, 2012
Showing with 12 additions and 8 deletions.
  1. +2 −2 src/Lightning.ml
  2. +9 −5 src/android/java/src/ru/redspell/lightning/LightView.java
  3. +1 −1 src/android/mlwrapper_android.c
View
@@ -107,11 +107,11 @@ ELSE
IFDEF ANDROID THEN
external addExceptionInfo: string -> unit = "ml_addExceptionInfo";
external setSupportEmail: string -> unit = "ml_setSupportEmail";
-ENDIF;
-
+ELSE
value addExceptionInfo (_:string) = ();
value setSupportEmail (_:string) = ();
ENDIF;
+ENDIF;
IFDEF ANDROID THEN
@@ -442,11 +442,14 @@ public void openURL(String url){
}
private String supportEmail = "mail@redspell.ru";
- public void setSupportEmail(String d){ supportEmail = d; }
+ public void mlSetSupportEmail(String d){ supportEmail = d; }
- public void addExceptionInfo(String d) {
- //openURL("mailto:".concat(supportEmail).concat("?subject=test&body=wtf"));
- }
+ private String additionalExceptionInfo = "\n";
+ public void mlAddExceptionInfo(String d) {
+ additionalExceptionInfo += d;
+ Log.d("LIGHTNING", "additionalExceptionInfo now is" + additionalExceptionInfo + '\n');
+ //openURL("mailto:".concat(supportEmail).concat("?subject=test&body=wtf"));
+ }
public void mlUncaughtException(String exn,String[] bt) {
Context c = getContext();
@@ -464,6 +467,7 @@ public void mlUncaughtException(String exn,String[] bt) {
for (String b : bt) {
body.append(b);body.append('\n');
};
+ body.append(additionalExceptionInfo);
uri.append("&body=" + Uri.encode(body.toString()));
Log.d("LIGHTNING","URI: " + uri.toString());
Intent sendIntent = new Intent(Intent.ACTION_VIEW,Uri.parse(uri.toString ()));
@@ -642,4 +646,4 @@ public void curlExternalLoaderError(int req, int errCode, int errMes) {
Log.d("LIGHTNING", "curlExternalLoaderError " + errCode + " " + errMes);
queueEvent(new CurlExternErrorCallbackRunnable(req, errCode, errMes));
}
-}
+}
@@ -994,7 +994,7 @@ void ml_addExceptionInfo (value info){
void ml_setSupportEmail (value d){
JNIEnv *env;
- DEBUG("set support email");
+ DEBUG("DDD: set support email");
(*gJavaVM)->GetEnv(gJavaVM, (void **)&env, JNI_VERSION_1_4);
char* cd = String_val(d);

0 comments on commit 9b311ea

Please sign in to comment.