Code example for Instrumentation

Methods: callActivityOnResume

0
    } 
 
    public static void callOnResumeOnUiThread(final Activity a, final Instrumentation instr) {
        a.runOnUiThread(new Runnable() {
            public void run() { 
                instr.callActivityOnResume(a);
            } 
        }); 
    } 
 
    public static void sleep(int ms) {
        try { 
            Thread.sleep(ms);
        } catch (InterruptedException ie) {
            // just end it. 
        } 
    } 
 
    public static void wait(Instrumentation inst, int times) {
        inst.waitForIdleSync();
        sleep(WAIT_FOR_ANIM_FINISHED_TIME * times);