Intent intent = getEvent();
if (verbose > 0) {
System.out.println(":Switch: " + intent.toURI());
}
try {
iam.startActivity(null, intent, null, null, 0, null, null, 0,
false, false);
} catch (RemoteException e) {
System.err.println("** Failed talking with activity manager!");
return MonkeyEvent.INJECT_ERROR_REMOTE_EXCEPTION;
} catch (SecurityException e) {
if (verbose > 0) {
System.out.println("** Permissions error starting activity "
+ intent.toURI());
}
return MonkeyEvent.INJECT_ERROR_SECURITY_EXCEPTION;
}
return MonkeyEvent.INJECT_SUCCESS;