summaryrefslogtreecommitdiff
path: root/tests/anomaly-tester
diff options
context:
space:
mode:
authorjackqdyulei <jackqdyulei@google.com>2017-08-14 13:54:22 -0700
committerjackqdyulei <jackqdyulei@google.com>2017-08-23 17:35:26 -0700
commit7e97d2d9a50b2083ba561f932e0c1e727e7fa233 (patch)
tree37b55c932519df1b0c9c4aec22907e99365aa392 /tests/anomaly-tester
parentd0275e53ebfd473b980c6b08bbfe5f75999abf53 (diff)
downloadSettings-7e97d2d9a50b2083ba561f932e0c1e727e7fa233.tar.gz
Set up anomaly test app in settings
This cl set up the basic android framework for anomly test app. Anomaly test app has the similar architecture compared with settings api tester. 1. Add Android.mk and AndroidManifest.xml 2. Add blank AnomalyActivity 3. Add related resource files. Bug: 62602318 Test: make -j40 AnomalyTester Change-Id: I1d59517c9c2d8d0b8e219e3a67dfae73ca5a968e
Diffstat (limited to 'tests/anomaly-tester')
-rw-r--r--tests/anomaly-tester/Android.mk16
-rw-r--r--tests/anomaly-tester/AndroidManifest.xml34
-rw-r--r--tests/anomaly-tester/res/layout/activity_main.xml27
-rw-r--r--tests/anomaly-tester/res/values/strings.xml19
-rw-r--r--tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java28
5 files changed, 124 insertions, 0 deletions
diff --git a/tests/anomaly-tester/Android.mk b/tests/anomaly-tester/Android.mk
new file mode 100644
index 00000000000..beb5d69a9e7
--- /dev/null
+++ b/tests/anomaly-tester/Android.mk
@@ -0,0 +1,16 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PROGUARD_ENABLED := disabled
+
+LOCAL_PACKAGE_NAME := AnomalyTester
+
+LOCAL_CERTIFICATE := platform
+
+LOCAL_USE_AAPT2 := true
+
+include $(BUILD_PACKAGE) \ No newline at end of file
diff --git a/tests/anomaly-tester/AndroidManifest.xml b/tests/anomaly-tester/AndroidManifest.xml
new file mode 100644
index 00000000000..b5f50c4573c
--- /dev/null
+++ b/tests/anomaly-tester/AndroidManifest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.settings.anomaly.tester">
+
+ <application
+ android:allowBackup="false"
+ android:label="@string/app_name"
+ android:supportsRtl="true"
+ android:theme="@android:style/Theme.Material.Light.DarkActionBar">
+ <activity
+ android:name=".AnomalyActivity"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest> \ No newline at end of file
diff --git a/tests/anomaly-tester/res/layout/activity_main.xml b/tests/anomaly-tester/res/layout/activity_main.xml
new file mode 100644
index 00000000000..6977d78370a
--- /dev/null
+++ b/tests/anomaly-tester/res/layout/activity_main.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="Anomaly App"/>
+</LinearLayout> \ No newline at end of file
diff --git a/tests/anomaly-tester/res/values/strings.xml b/tests/anomaly-tester/res/values/strings.xml
new file mode 100644
index 00000000000..99de34e62dd
--- /dev/null
+++ b/tests/anomaly-tester/res/values/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources>
+ <string name="app_name">AnomalyTester</string>
+</resources>
diff --git a/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java b/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java
new file mode 100644
index 00000000000..8628091f8d1
--- /dev/null
+++ b/tests/anomaly-tester/src/com/android/settings/anomaly/tester/AnomalyActivity.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.settings.anomaly.tester;
+
+import android.app.Activity;
+import android.os.Bundle;
+import com.android.settings.anomaly.tester.R;
+
+public class AnomalyActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+ }
+}