diff options
author | Swarna Kumar <skumar@google.com> | 2009-11-24 13:33:13 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-11-24 13:33:13 -0800 |
commit | 20342ca83012b442913b409a9218635de9bd6aa6 (patch) | |
tree | c8b068513764846f6e5d96746cbe63f03e90e637 /tests | |
parent | 66358e24a6bbc2017c2edd921a64e616b4c9cac4 (diff) | |
parent | 7f8e34091efdee1a383280b08585f8254472c1fd (diff) | |
download | frameworks_base-20342ca83012b442913b409a9218635de9bd6aa6.zip frameworks_base-20342ca83012b442913b409a9218635de9bd6aa6.tar.gz frameworks_base-20342ca83012b442913b409a9218635de9bd6aa6.tar.bz2 |
am 7f8e3409: Merge change I816428ae into eclair
Merge commit '7f8e34091efdee1a383280b08585f8254472c1fd' into eclair-mr2
* commit '7f8e34091efdee1a383280b08585f8254472c1fd':
Temporarily add explicit step to disable keyguard to imf tests to attempt solve test flakiness.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/ImfTest/tests/AndroidManifest.xml | 2 | ||||
-rwxr-xr-x | tests/ImfTest/tests/src/com/android/imftest/samples/ImfBaseTestCase.java | 7 |
2 files changed, 9 insertions, 0 deletions
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 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.imftest.tests"> + <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> + <application> <uses-library android:name="android.test.runner" /> </application> 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<T extends Activity> 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 |