Code example for Instrumentation

Methods: addMonitorsendKeyDownUpSyncwaitForIdleSync

0
				public void run() {         
					mActivity.setSelection(position);
				} 
			}	    	 
		); 
		mInst.sendKeyDownUpSync(KeyEvent.KEYCODE_ENTER);
		mInst.waitForIdleSync();
 
         
    } 
 
    public void testCase01_activityDisplay() { 
        assertTrue(mActivity!= null);
        assertTrue(mLanguage!= null);
        assertTrue(mInputSwitch != null);            
        assertTrue(mKeyboardSetting != null);
    } 
 
    public void testCase02_LanguageDisplay(){ 
        assertTrue(mLanguage!= null);
   	   	ActivityMonitor monitor = 
    		mInst.addMonitor("com.android.settings.LocalePicker", null, false);
            	 
       /* 
        * Launch Language activity. 
    	*/