Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ef3b4cd authored by Swarna Kumar's avatar Swarna Kumar Committed by Android Git Automerger
Browse files

am 7f8e3409: Merge change I816428ae into eclair

Merge commit '7f8e3409' into eclair-plus-aosp

* commit '7f8e3409':
  Temporarily add explicit step to disable keyguard to imf tests to attempt solve test flakiness.
parents debe35d5 7f8e3409
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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>
+7 −0
Original line number Diff line number Diff line
@@ -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