[Desc.] change default resolution (WVGA, HD) and set x86 image id 0, arm image start 1.
[Issue] N/A
+* 1.3.64
+- change set of resolution (WVGA, HD)
+- set x86 image id 0 (arm image start 1)
+== jihye kim <jihye1128.kim@samsung.com> 2012-12-03
+
* 1.3.63
- change emulator-manager.app for mac
== jihye kim <jihye1128.kim@samsung.com> 2012-11-29
Source: emulator-manager
-Version: 1.3.63
+Version: 1.3.64
Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
Package: emulator-manager
private static CommandLineParser processor = null;
private static boolean isConsoleMode = true;
// for multi touch
- private static boolean isInhoseMode = true;
+ private static boolean isInhoseMode = false;
private static RandomAccessFile randomAccessFile;
private static boolean isMac = false;
public class BaseImage {
private Platform platform;
- private String id;
+ private String id = "x";
private String platformName;
private String type;
private String name;
private String path;
private String information;
- public BaseImage(Platform platform, File path, int id) throws IOException {
+ public BaseImage(Platform platform, File path) throws IOException {
this.platform = platform;
- loadProperty(id, path);
+ loadProperty(path);
settingImagePath(path);
- information = getName() + "\n" +
- " ID : " + getID() + "\n" +
- " Platform : " + getPlatformName() + "\n" +
- " Type : " + getType() + "\n" +
- " Version : " + getVersion() + "\n" +
- " Release Version : " + getRelease() + "\n" +
- " Target CPU : " + getCpu().toUpperCase() + "\n" +
- " Product Domain : " + getDomain() + "\n" +
- " Base Disk Image Path : " + getPath() + "\n";
}
- private void loadProperty(int id, File path) throws IOException {
- this.id = Integer.toString(id);
+ private void loadProperty(File path) throws IOException {
File f = new File(path + File.separator + StringResource.IMAGE_INFO_FILENAME);
FileInputStream inputStream = null;
try {
throw new IOException("Failed getting image file path.");
}
}
+
+ void setID(int id) {
+ this.id = Integer.toString(id);
+ //
+ information = getName() + "\n" +
+ " ID : " + getID() + "\n" +
+ " Platform : " + getPlatformName() + "\n" +
+ " Type : " + getType() + "\n" +
+ " Version : " + getVersion() + "\n" +
+ " Release Version : " + getRelease() + "\n" +
+ " Target CPU : " + getCpu().toUpperCase() + "\n" +
+ " Product Domain : " + getDomain() + "\n" +
+ " Base Disk Image Path : " + getPath() + "\n";
+ //
+ }
+
public String getID() {
return id;
}
for (File f : defaultImages.listFiles()) {
if (f.isDirectory()) {
try {
- image = new BaseImage(this, f, ++id);
+ image = new BaseImage(this, f);
for (BaseImage i : imageList) {
if (i.getName().equals(image.getName())){
// TODO: duplicate name
EMLogger.getLogger().warning("The same name of the base disk image already exist.(name : " + image.getName() + " )");
- --id;
throw new IOException();
}
}
for (File f : addonsImages.listFiles()) {
if (f.isDirectory()) {
try {
- image = new BaseImage(this, f, ++id);
+ image = new BaseImage(this, f);
for (BaseImage i : imageList) {
if (i.getName().equals(image.getName())){
// TODO: duplicate name
EMLogger.getLogger().warning("The same name of the base disk image already exist.(name : " + image.getName() + " )");
- --id;
throw new IOException();
}
}
}
}
}
+
+ // set image id
+ for (BaseImage i : imageList) {
+ if (i.getCpu().equals("x86")) {
+ i.setID(id++);
+ break;
+ }
+ }
+ for (BaseImage i : imageList) {
+ if (!i.getID().equals("0")) {
+ i.setID(id++);
+ }
+ }
}
VMCreateHelper helper = new VMCreateHelper();
resolutionCombo = helper.makeCombo(table);
- helper.addComboItem(resolutionCombo, DisplayResoultion.getInstance().getList(),
- DisplayResoultion.getInstance().findIndex(oldResolution.toString()));
+ DisplayResolution.getInstance().initialize(oldResolution);
+
+ helper.addComboItem(resolutionCombo, DisplayResolution.getInstance().getList(),
+ DisplayResolution.getInstance().findIndex(oldResolution.toString()));
+
resolutionCombo.setToolTipText(resolutionCombo.getItem(resolutionCombo.getSelectionIndex()));
return true;
}
public void widgetSelected(SelectionEvent e) {
String re = resolutionCombo.getItem(resolutionCombo.getSelectionIndex());
resolutionCombo.setToolTipText(re);
- for (RESOLUTION d : RESOLUTION.values()) {
- if (re.equals(d.toString())) {
- newResolution = d;
- Spinner dpi = (Spinner)(TableWidgetList.getInstance()
- .findVMWidget("dpi", isCreateMode()).getWidget());
- dpi.setSelection(d.getDPI());
- SkinCombo skin = (SkinCombo)TableWidgetList.getInstance().findVMWidget("skin", isCreateMode());
- skin.selectResolution(d.getValue());
- }
+ RESOLUTION d = DisplayResolution.getInstance().findResolution(re);
+ if (d != null) {
+ newResolution = d;
+ Spinner dpi = (Spinner)(TableWidgetList.getInstance()
+ .findVMWidget("dpi", isCreateMode()).getWidget());
+ dpi.setSelection(d.getDPI());
+ SkinCombo skin = (SkinCombo)TableWidgetList.getInstance().findVMWidget("skin", isCreateMode());
+ skin.selectResolution(d.getValue());
}
if (!isCreateMode()) {
import java.util.ArrayList;
+import org.tizen.emulator.manager.EmulatorManager;
+import org.tizen.emulator.manager.EmulatorManager.ManagerModeType;
import org.tizen.emulator.manager.tool.StringResource;
import org.tizen.emulator.manager.vms.RAM_SIZE;
import org.tizen.emulator.manager.vms.RESOLUTION;
}
}
-class DisplayResoultion extends StringArrayResource
+class DisplayResolution extends StringArrayResource
{
- private static DisplayResoultion resolution = new DisplayResoultion();
- public static DisplayResoultion getInstance()
+ private static RESOLUTION[] minResoultion = {RESOLUTION.WVGA, RESOLUTION.HD};
+
+ private static DisplayResolution resolution = new DisplayResolution();
+ public static DisplayResolution getInstance()
{
return resolution;
}
- private DisplayResoultion()
+ private DisplayResolution()
{
int i = 0;
- for (RESOLUTION r : RESOLUTION.values()) {
- if (r == RESOLUTION.HD) {
- setDefaultIndex(i);
+ if (EmulatorManager.getInstance().getManagerMode() == ManagerModeType.INHOUSE_MODE) {
+ for (RESOLUTION r : RESOLUTION.values()) {
+ if (r == RESOLUTION.HD) {
+ setDefaultIndex(i);
+ }
+ add(i++, r.toString());
+ }
+ } else {
+ for (RESOLUTION r : minResoultion) {
+ if (r == RESOLUTION.HD) {
+ setDefaultIndex(i);
+ }
+ add(i++, r.toString());
+ }
+ }
+ }
+
+ public void initialize(RESOLUTION re) {
+ if (!(EmulatorManager.getInstance().getManagerMode() == ManagerModeType.INHOUSE_MODE)) {
+ for (String s : getList()) {
+ if (s.equals(re.toString())) {
+ return;
+ }
}
- add(i++, r.toString());
+ add(0, re.toString());
}
}
+ public RESOLUTION findResolution(String resolution) {
+ if (EmulatorManager.getInstance().getManagerMode() == ManagerModeType.INHOUSE_MODE) {
+ for (RESOLUTION r : RESOLUTION.values()) {
+ if (resolution.equals(r.toString())) {
+ return r;
+ }
+ }
+ } else {
+ for (RESOLUTION r : minResoultion) {
+ if (resolution.equals(r.toString())) {
+ return r;
+ }
+ }
+ }
+ return null;
+ }
+
public int findIndex(String r) {
String[] strArray = getList();
String s = null;
return i;
}
}
+
return getDefaultIndex();
}
}