diff options
author | Jack Palevich <jackpal@google.com> | 2009-09-30 06:14:24 -0700 |
---|---|---|
committer | Jack Palevich <jackpal@google.com> | 2009-09-30 06:14:24 -0700 |
commit | 8018f091b94f02eabc6538295fefe3546d9cfeb5 (patch) | |
tree | bf04424c92d8fa4cae3a3b6b170fe18c2ba65962 /opengl/tests/gl_jni/src | |
parent | 057018399c7ce6d3893ee5fc622f1592f51773b9 (diff) | |
download | frameworks_base-8018f091b94f02eabc6538295fefe3546d9cfeb5.zip frameworks_base-8018f091b94f02eabc6538295fefe3546d9cfeb5.tar.gz frameworks_base-8018f091b94f02eabc6538295fefe3546d9cfeb5.tar.bz2 |
Add very simple input path. Fix end-of-line issues.
Diffstat (limited to 'opengl/tests/gl_jni/src')
3 files changed, 15 insertions, 9 deletions
diff --git a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java b/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java index df1f957..c6f5313 100644 --- a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java +++ b/opengl/tests/gl_jni/src/com/android/gljni/GLJNIActivity.java @@ -18,28 +18,27 @@ package com.android.gljni; import android.app.Activity; import android.os.Bundle; -import android.util.Log; -import android.view.WindowManager; - -import java.io.File; - public class GLJNIActivity extends Activity { GLJNIView mView; - @Override protected void onCreate(Bundle icicle) { + @Override + protected void onCreate(Bundle icicle) { super.onCreate(icicle); mView = new GLJNIView(getApplication()); - setContentView(mView); + mView.setFocusableInTouchMode(true); + setContentView(mView); } - @Override protected void onPause() { + @Override + protected void onPause() { super.onPause(); mView.onPause(); } - @Override protected void onResume() { + @Override + protected void onResume() { super.onResume(); mView.onResume(); } diff --git a/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java b/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java index 8662725..f56d2af 100644 --- a/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java +++ b/opengl/tests/gl_jni/src/com/android/gljni/GLJNILib.java @@ -30,4 +30,5 @@ public class GLJNILib { */ public static native void init(int width, int height); public static native void step(); + public static native void changeBackground(); } diff --git a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java b/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java index 9ea1059..9a2c8c4 100644 --- a/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java +++ b/opengl/tests/gl_jni/src/com/android/gljni/GLJNIView.java @@ -80,5 +80,11 @@ class GLJNIView extends GLSurfaceView { // Do nothing. } } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + GLJNILib.changeBackground(); + return true; + } } |