public void test01_Receive() { Intent intent = new Intent(); intent.setAction(android.provider.Telephony.Intents.SECRET_CODE_ACTION); intent.setData(Uri.parse("android_secret_code://3646633")); mReceiver.onReceive(getContext(), intent); EmOperate.waitSomeTime(EmOperate.TIME_LONG); }
public void test02_SetTest() { Activity testActivity = mSolo.getCurrentActivity(); mSolo.assertCurrentActivity("Not SspDebugModeActivity Class", SspDebugModeActivity.class); mSolo.sleep(EmOperate.TIME_LONG); if (!mSolo.isCheckBoxChecked(0)) { mSolo.clickOnCheckBox(0); mSolo.sleep(EmOperate.TIME_LONG); mSolo.clickOnButton(0); mSolo.sleep(EmOperate.TIME_SUPER_LONG); BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); // BluetoothAdapterEx adapterEx = BluetoothAdapterEx.getDefaultAdapterEx(); // adapterEx.setSSPDebugMode(false); mSolo.sleep(EmOperate.TIME_SUPER_LONG); mSolo.sleep(EmOperate.TIME_SUPER_LONG); mSolo.sleep(EmOperate.TIME_SUPER_LONG); if (BluetoothAdapter.STATE_OFF != adapter.getState()) { adapter.disable(); int jumpCount = 0; while ((BluetoothAdapter.STATE_OFF != adapter.getState()) && (jumpCount++ < 15)) { EmOperate.waitSomeTime(EmOperate.TIME_SUPER_LONG); } } } else { mSolo.sleep(EmOperate.TIME_SUPER_LONG); mSolo.clickOnCheckBox(0); mSolo.sleep(EmOperate.TIME_LONG); mSolo.goBack(); } }