Skip to content
Browse files

minor changes

  • Loading branch information...
1 parent 1557a42 commit dde2bf91c2ec6b5c332ec4ee468dda37146997c0 @mdykman committed Oct 24, 2012
View
2 project.properties
@@ -8,4 +8,4 @@
# project structure.
# Project target.
-target=android-8
+target=android-7
View
6 src/org/dykman/j/JInterface.java
@@ -216,9 +216,13 @@ public void output(int type,String s) {
static {
try {
- System.loadLibrary("j");
+
+// System.loadLibrary("j");
+ // load the laoder
+ System.loadLibrary("jld");
} catch(Exception e) {
Log.e("J-interface", "failed to load j shared object", e);
+ throw new RuntimeException(e);
}
}
View
13 src/org/dykman/j/android/JConsoleApp.java
@@ -44,7 +44,7 @@
public AndroidJInterface jInterface = null;
public AbstractActivity activity;
- private static Context context;
+// private static Context context;
public static JConsoleApp theApp = null;
protected Map<String, Intent> intentMap = new HashMap<String, Intent>();
@@ -80,15 +80,15 @@ public void handleMessage(Message msg) {
intent.putExtra("jargy", b.getString("jargy"));
activity.startActivity(intent);
} catch (ClassNotFoundException e) {
- // fail
+ Log.e(LogTag, "failed to launch class " + b.getString("class"),e);
}
}
};
@Override
public void onCreate() {
super.onCreate();
- JConsoleApp.theApp = (JConsoleApp) this;
+ JConsoleApp.theApp = (JConsoleApp) this;
}
public void setup(JActivity activity, Console console) {
@@ -137,7 +137,8 @@ protected void addIntent(String path, Intent intent) {
if (!JActivity.JCONSOLE.equals(path)) {
path = new File(path).getName();
} else {
-// intent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
+
+ intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY|Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
}
@@ -538,8 +539,8 @@ protected String doInBackground(File... params) {
if(ex.canWrite()) {
String cmd = "2!:0 'cp -r " + lo.getAbsolutePath()
+ " /sdcard'";
- publishProgress("migrating user files");
-// jInterface.callSuperJ(new String[]{cmd});
+ publishProgress("migrating user files to sdcard");
+ jInterface.callSuperJ(new String[]{cmd});
}
}
}
View
7 src/org/dykman/jn/Glcmds.java
@@ -1,13 +1,13 @@
package org.dykman.jn;
import java.io.UnsupportedEncodingException;
-import android.util.Log;
+
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
-import android.graphics.Point;
import android.graphics.RectF;
+import android.util.Log;
public class Glcmds {
@@ -65,7 +65,8 @@ public int glcmds ( Canvas canvas, Paint paint, int[] ipar, String font, int[] b
int errcnt = 0;
int cmd;
int p = 0;
-int i,j,c,cnt;
+int i,c,cnt;
+//int i,j,c,cnt;
Log.d("JJNI", "Glcmds ncnt: " + Integer.toString(ncnt));
while (p<ncnt) {
View
4 src/org/dykman/jn/android/app/Activity.java
@@ -4,14 +4,14 @@
protected java.lang.String jlocale = null;
protected java.lang.String jchildid = null;
protected java.lang.String jchildidx = null;
-protected java.util.ArrayList jnOverrideList = null;
+protected java.util.ArrayList<Object> jnOverrideList = null;
protected java.lang.String japparg = null;
protected void jparseargs (java.lang.String jlocale, java.lang.String jchildid, java.lang.String joverride ) { this.jlocale = jlocale; this.jchildid = jchildid; if (jchildid != null && jchildid.length() > 0) jchildidx = jchildid + "_"; else jchildidx = ""; if (joverride != null && joverride.length() > 0) { java.lang.String[] ss = joverride.split(" "); for (int i = 0; i < ss.length; i++) setjnOverride(ss[i]); } }
public void clearjnOverride () { jnOverrideList.clear (); }
public void setjnOverride (java.lang.String arg1 ) { if (!testjnOverride (arg1)) jnOverrideList.add (arg1); }
public void setjnOverride (java.lang.String arg1, boolean arg2 ) { if (arg2) { if (!testjnOverride (arg1)) jnOverrideList.add (arg1); } else jnOverrideList.remove (arg1); }
public boolean testjnOverride (java.lang.String arg1 ) { return jnOverrideList.contains (arg1); }
-public Activity(){ super(); jnOverrideList = new java.util.ArrayList(); jnOverrideList.add ("onCreate"); }
+public Activity(){ super(); jnOverrideList = new java.util.ArrayList<Object>(); jnOverrideList.add ("onCreate"); }
@Override protected void finalize() throws java.lang.Throwable{ if (!testjnOverride( "finalize" )) { super.finalize(); return; } jInterface.Jnido( this, jchildidx + "finalize_" + jlocale + "_", null ); }
@Override public android.content.Intent getIntent(){ if (!testjnOverride( "getIntent" )) return super.getIntent(); return (android.content.Intent) jInterface.Jnido( this, jchildidx + "getIntent_" + jlocale + "_", null ); }
@Override public void setIntent(android.content.Intent arg1) { if (!testjnOverride( "setIntent" )) { super.setIntent( arg1); return; } jInterface.Jnido( this, jchildidx + "setIntent_" + jlocale + "_", new java.lang.Object[]{ arg1 } ); }
View
2 src/org/dykman/jn/android/view/View.java
@@ -4,7 +4,7 @@
protected java.lang.String jlocale = null;
protected java.lang.String jchildid = null;
protected java.lang.String jchildidx = null;
-protected java.util.ArrayList jnOverrideList = null;
+protected java.util.ArrayList<Object> jnOverrideList = null;
protected void jparseargs (java.lang.String jlocale, java.lang.String jchildid, java.lang.String joverride ) { this.jlocale = jlocale; this.jchildid = jchildid; if (jchildid != null && jchildid.length() > 0) jchildidx = jchildid + "_"; else jchildidx = ""; if (joverride != null && joverride.length() > 0) { java.lang.String[] ss = joverride.split(" "); for (int i = 0; i < ss.length; i++) setjnOverride(ss[i]); } }
public void clearjnOverride () { jnOverrideList.clear (); }
public void setjnOverride (java.lang.String arg1 ) { if (!testjnOverride (arg1)) jnOverrideList.add (arg1); }

0 comments on commit dde2bf9

Please sign in to comment.
Something went wrong with that request. Please try again.