From c694d0468258ef4a4e8584fa81d34a97d632066c Mon Sep 17 00:00:00 2001 From: Ian Lake Date: Mon, 10 Jul 2017 10:44:59 -0700 Subject: [PATCH] Remove AppCompat from TouchLatency test Ensure the TouchLatency test accurately reflects the latest framework and removes the need to update TouchLatency test as Support Library evolves. Test: ./gradlew assembleDebug works BUG: 28983951 Change-Id: Icce773f47674f94cad5f9057cce4913b7efce834 --- tests/TouchLatency/.gitignore | 1 + tests/TouchLatency/Android.mk | 12 +-- tests/TouchLatency/TouchLatency.iml | 19 ---- tests/TouchLatency/app/app.iml | 92 ------------------- tests/TouchLatency/app/build.gradle | 5 - .../touchlatency/TouchLatencyActivity.java | 4 +- .../src/main/res/menu/menu_touch_latency.xml | 3 +- .../app/src/main/res/values/styles.xml | 2 +- 8 files changed, 7 insertions(+), 131 deletions(-) delete mode 100644 tests/TouchLatency/TouchLatency.iml delete mode 100644 tests/TouchLatency/app/app.iml diff --git a/tests/TouchLatency/.gitignore b/tests/TouchLatency/.gitignore index cfb71643044b9..bd79078a904e7 100644 --- a/tests/TouchLatency/.gitignore +++ b/tests/TouchLatency/.gitignore @@ -3,3 +3,4 @@ /.idea .DS_Store /build +.iml diff --git a/tests/TouchLatency/Android.mk b/tests/TouchLatency/Android.mk index 6ad47057e8e81..969283df4af7a 100644 --- a/tests/TouchLatency/Android.mk +++ b/tests/TouchLatency/Android.mk @@ -8,19 +8,11 @@ LOCAL_MANIFEST_FILE := app/src/main/AndroidManifest.xml # omit gradle 'build' dir LOCAL_SRC_FILES := $(call all-java-files-under,app/src/main/java) -# use appcompat/support lib from the tree, so improvements/ -# regressions are reflected in test data LOCAL_RESOURCE_DIR := \ - $(LOCAL_PATH)/app/src/main/res \ - frameworks/support/v7/appcompat/res + $(LOCAL_PATH)/app/src/main/res LOCAL_AAPT_FLAGS := \ - --auto-add-overlay \ - --extra-packages android.support.v7.appcompat - -LOCAL_STATIC_JAVA_LIBRARIES := \ - android-support-v4 \ - android-support-v7-appcompat + --auto-add-overlay LOCAL_PACKAGE_NAME := TouchLatency diff --git a/tests/TouchLatency/TouchLatency.iml b/tests/TouchLatency/TouchLatency.iml deleted file mode 100644 index cd87cea19f1d1..0000000000000 --- a/tests/TouchLatency/TouchLatency.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/TouchLatency/app/app.iml b/tests/TouchLatency/app/app.iml deleted file mode 100644 index 689e5e0024da9..0000000000000 --- a/tests/TouchLatency/app/app.iml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/TouchLatency/app/build.gradle b/tests/TouchLatency/app/build.gradle index 7133beb8efeee..233711055eb80 100644 --- a/tests/TouchLatency/app/build.gradle +++ b/tests/TouchLatency/app/build.gradle @@ -18,8 +18,3 @@ android { } } } - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:21.0.3' -} diff --git a/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/TouchLatencyActivity.java b/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/TouchLatencyActivity.java index 55440c849ebcf..b763c78207dee 100644 --- a/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/TouchLatencyActivity.java +++ b/tests/TouchLatency/app/src/main/java/com/prefabulated/touchlatency/TouchLatencyActivity.java @@ -16,12 +16,12 @@ package com.prefabulated.touchlatency; +import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.CountDownTimer; -import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.method.Touch; import android.util.AttributeSet; @@ -173,7 +173,7 @@ class TouchLatencyView extends View implements View.OnTouchListener { private float mVelocityX, mVelocityY; } -public class TouchLatencyActivity extends AppCompatActivity { +public class TouchLatencyActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/tests/TouchLatency/app/src/main/res/menu/menu_touch_latency.xml b/tests/TouchLatency/app/src/main/res/menu/menu_touch_latency.xml index 1824f4a689958..5aef72e8d383e 100644 --- a/tests/TouchLatency/app/src/main/res/menu/menu_touch_latency.xml +++ b/tests/TouchLatency/app/src/main/res/menu/menu_touch_latency.xml @@ -14,8 +14,7 @@ limitations under the License. --> + android:orderInCategory="100" android:showAsAction="always" /> diff --git a/tests/TouchLatency/app/src/main/res/values/styles.xml b/tests/TouchLatency/app/src/main/res/values/styles.xml index aa7c09fff40df..22da7c1d050b0 100644 --- a/tests/TouchLatency/app/src/main/res/values/styles.xml +++ b/tests/TouchLatency/app/src/main/res/values/styles.xml @@ -16,7 +16,7 @@ -