From 9abc55ec4a81cf83aebda6513c425553d8b33ae3 Mon Sep 17 00:00:00 2001 From: Swarna Kumar Date: Tue, 24 Nov 2009 11:02:37 -0800 Subject: Temporarily add explicit step to disable keyguard to imf tests to attempt solve test flakiness. Bug number : 2177113 --- tests/ImfTest/tests/AndroidManifest.xml | 2 ++ .../tests/src/com/android/imftest/samples/ImfBaseTestCase.java | 7 +++++++ 2 files changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/ImfTest/tests/AndroidManifest.xml b/tests/ImfTest/tests/AndroidManifest.xml index 122d202..c02fa0b 100755 --- a/tests/ImfTest/tests/AndroidManifest.xml +++ b/tests/ImfTest/tests/AndroidManifest.xml @@ -18,6 +18,8 @@ + + diff --git a/tests/ImfTest/tests/src/com/android/imftest/samples/ImfBaseTestCase.java b/tests/ImfTest/tests/src/com/android/imftest/samples/ImfBaseTestCase.java index 61dc611..1957640 100755 --- a/tests/ImfTest/tests/src/com/android/imftest/samples/ImfBaseTestCase.java +++ b/tests/ImfTest/tests/src/com/android/imftest/samples/ImfBaseTestCase.java @@ -17,6 +17,8 @@ package com.android.imftest.samples; import android.app.Activity; +import android.app.KeyguardManager; +import android.content.Context; import android.os.SystemClock; import android.test.InstrumentationTestCase; import android.view.KeyEvent; @@ -58,6 +60,11 @@ public abstract class ImfBaseTestCase extends Instrumentatio mTargetActivity = launchActivity(TARGET_PACKAGE_NAME, mTargetActivityClass, null); mExpectAutoPop = mTargetActivity.getResources().getBoolean(R.bool.def_expect_ime_autopop); mImm = InputMethodManager.getInstance(mTargetActivity); + + KeyguardManager keyguardManager = + (KeyguardManager) getInstrumentation().getContext().getSystemService( + Context.KEYGUARD_SERVICE); + keyguardManager.newKeyguardLock("imftest").disableKeyguard(); } // Utility test methods -- cgit v1.1