am ca4603db: SDK: fix NPE in AVD Manager > Start when skin.path is missing.

Merge commit 'ca4603db2fa5cd0231d75ebcef239cd69e1772ad' into eclair

* commit 'ca4603db2fa5cd0231d75ebcef239cd69e1772ad':
  SDK: fix NPE in AVD Manager > Start when skin.path is missing.
This commit is contained in:
Raphael
2009-11-06 14:00:55 -08:00
committed by Android Git Automerger

View File

@@ -424,6 +424,7 @@ final class AvdStartDialog extends GridDialog {
mSize2 = Integer.parseInt(m.group(2));
mSkinDisplay = skinName;
mEnableScaling = true;
return;
}
}
@@ -431,7 +432,9 @@ final class AvdStartDialog extends GridDialog {
mEnableScaling = false; // default to false for now.
// path to the skin layout file.
File skinFolder = new File(mSdkLocation, prop.get(AvdManager.AVD_INI_SKIN_PATH));
String skinPath = prop.get(AvdManager.AVD_INI_SKIN_PATH);
if (skinPath != null) {
File skinFolder = new File(mSdkLocation, skinPath);
if (skinFolder.isDirectory()) {
File layoutFile = new File(skinFolder, "layout");
if (layoutFile.isFile()) {
@@ -444,6 +447,7 @@ final class AvdStartDialog extends GridDialog {
}
}
}
}
/**
* Parses a layout file.