From 0cc62f860c22d7d0b82716732429e97a3d13361b Mon Sep 17 00:00:00 2001 From: jackqdyulei Date: Tue, 15 Aug 2017 17:02:58 -0700 Subject: [PATCH] Add wakelock action in testing app This cl adds action to hold the wakelock for specific time. With this action we could test whether wakelock detector is effective. Bug: 2731722 Test: make -j40 AnomalyTester Change-Id: I1d44c12363f126ea9b8fc44f4c135e46b898186c --- tests/anomaly-tester/AndroidManifest.xml | 5 +- .../res/layout/activity_main.xml | 2 + .../res/layout/wakelock_anomaly.xml | 60 +++++++++++++++++++ .../anomaly/tester/AnomalyActivity.java | 28 +++++++++ .../anomaly/tester/utils/AnomalyActions.java | 17 ++++++ 5 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 tests/anomaly-tester/res/layout/wakelock_anomaly.xml diff --git a/tests/anomaly-tester/AndroidManifest.xml b/tests/anomaly-tester/AndroidManifest.xml index c057a66ec45..68e2dd71a0f 100644 --- a/tests/anomaly-tester/AndroidManifest.xml +++ b/tests/anomaly-tester/AndroidManifest.xml @@ -16,11 +16,12 @@ - - + + + + + \ No newline at end of file diff --git a/tests/anomaly-tester/res/layout/wakelock_anomaly.xml b/tests/anomaly-tester/res/layout/wakelock_anomaly.xml new file mode 100644 index 00000000000..08cb7958419 --- /dev/null +++ b/tests/anomaly-tester/res/layout/wakelock_anomaly.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + +