aboutsummaryrefslogtreecommitdiff
path: root/testapps/libsAndJarTest/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'testapps/libsAndJarTest/app/src')
-rw-r--r--testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.java33
-rw-r--r--testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.txt1
-rw-r--r--testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/Main.java34
3 files changed, 68 insertions, 0 deletions
diff --git a/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.java b/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.java
new file mode 100644
index 000000000..aa5d1571f
--- /dev/null
+++ b/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.java
@@ -0,0 +1,33 @@
+package com.android.tests.javaprojecttest.app;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class App {
+
+ public static String getContent() {
+ InputStream input = App.class.getResourceAsStream("App.txt");
+ if (input == null) {
+ return "FAILED TO FIND App.txt";
+ }
+
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
+
+ return reader.readLine();
+ } catch (IOException e) {
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return "FAILED TO READ CONTENT";
+ }
+}
diff --git a/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.txt b/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.txt
new file mode 100644
index 000000000..d488bc465
--- /dev/null
+++ b/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/App.txt
@@ -0,0 +1 @@
+SUCCESS from App \ No newline at end of file
diff --git a/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/Main.java b/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/Main.java
new file mode 100644
index 000000000..95dd00c3e
--- /dev/null
+++ b/testapps/libsAndJarTest/app/src/com/android/tests/javaprojecttest/app/Main.java
@@ -0,0 +1,34 @@
+package com.android.tests.javaprojecttest.app;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.TextView;
+
+import com.android.tests.basicjar.BasicJar;
+import com.android.tests.basicjar2.BasicJar2;
+import com.android.tests.javaprojecttest.lib1.Lib1;
+import com.android.tests.javaprojecttest.lib2.Lib2;
+
+public class Main extends Activity {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+
+ TextView tv = (TextView) findViewById(R.id.app);
+ tv.setText("App: " + App.getContent());
+
+ tv = (TextView) findViewById(R.id.lib1);
+ tv.setText("Lib1: " + Lib1.getContent());
+
+ tv = (TextView) findViewById(R.id.lib2);
+ tv.setText("Lib2: " + Lib2.getContent());
+
+ tv = (TextView) findViewById(R.id.basicJar);
+ tv.setText("BasicJar: " + BasicJar.getContent());
+
+ tv = (TextView) findViewById(R.id.basicJar2);
+ tv.setText("BasicJar2: " + BasicJar2.getContent());
+ }
+} \ No newline at end of file