if (profile != null) {
Dimension resolution = profile.getResolution();
arguments().add("-windowsize",
String.format("%dx%d", resolution.getWidth(), resolution.getHeight()));
arguments().add(new OperaArgument("-ppi", profile.getPPI()));
if (profile.getIME() == EmulationProfile.IME.KEYPAD) {
arguments().add("-notouchwithtouchevents");
} else if (profile.getIME() == EmulationProfile.IME.TABLET) {
arguments().add(new OperaArgument("-tabletui"));
}
arguments().add("-user-agent-string", profile.getUserAgent());
arguments().add(new OperaArgument("-profile-name", profile.getProfileName()));
}
}