Put back support for hardware.ini at the top level of an add-on.

Change-Id: Ifb4e567e69f0f5e6ffde8f98c636336cf1289e42
This commit is contained in:
Xavier Ducrohet
2009-09-14 14:14:09 -07:00
parent 2196fd0317
commit 80c767f761

View File

@@ -590,6 +590,7 @@ public final class AvdManager {
// priority order is: // priority order is:
// - values provided by the user // - values provided by the user
// - values provided by the skin // - values provided by the skin
// - values provided by the target (add-on only).
// In order to follow this priority, we'll add the lowest priority values first and then // In order to follow this priority, we'll add the lowest priority values first and then
// override by higher priority values. // override by higher priority values.
// In the case of a platform with override values from the user, the skin value might // In the case of a platform with override values from the user, the skin value might
@@ -597,6 +598,16 @@ public final class AvdManager {
HashMap<String, String> finalHardwareValues = new HashMap<String, String>(); HashMap<String, String> finalHardwareValues = new HashMap<String, String>();
File targetHardwareFile = new File(target.getLocation(), AvdManager.HARDWARE_INI);
if (targetHardwareFile.isFile()) {
Map<String, String> targetHardwareConfig = SdkManager.parsePropertyFile(
targetHardwareFile, log);
if (targetHardwareConfig != null) {
finalHardwareValues.putAll(targetHardwareConfig);
values.putAll(targetHardwareConfig);
}
}
// get the hardware properties for this skin // get the hardware properties for this skin
File skinFolder = getSkinPath(skinName, target); File skinFolder = getSkinPath(skinName, target);
File skinHardwareFile = new File(skinFolder, AvdManager.HARDWARE_INI); File skinHardwareFile = new File(skinFolder, AvdManager.HARDWARE_INI);