aboutsummaryrefslogtreecommitdiffstats
path: root/android/avd
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-06-23 18:23:08 +0200
committerDavid 'Digit' Turner <digit@android.com>2011-06-23 18:28:38 +0200
commitadc34fb9e9ad0700e9752ca67174c68925ca0c71 (patch)
tree77fd58e1db35304397476ded126e5a4283f71171 /android/avd
parentac395e1dff366240b8b0fa5ea4cdeb0cc7a8b797 (diff)
downloadexternal_qemu-adc34fb9e9ad0700e9752ca67174c68925ca0c71.zip
external_qemu-adc34fb9e9ad0700e9752ca67174c68925ca0c71.tar.gz
external_qemu-adc34fb9e9ad0700e9752ca67174c68925ca0c71.tar.bz2
Fix -sysdir handling.
This patch fixes the processing of the -sysdir option. Previously, using -sysdir <path> would imply that the -system <path>/<path>/system.img is used, which is incorrect. Also fixes the skin search for the case where we are using the emulator without a pre-existing AVD outside of platform builds (e.g. when running tests). This happens with stuff like: emulator -sysdir /path/to/known/sdk/platforms/<name>/images The patch ensures that the /path/to/known/sdk/platforms/<name>/skins directory is probed (this was the behaviour of the Tools R11 emulator). Change-Id: I32398bec0d7a28ead234f63c847d3ec95ed14b63
Diffstat (limited to 'android/avd')
-rw-r--r--android/avd/info.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/android/avd/info.c b/android/avd/info.c
index 4df5969..f1514f2 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -1138,6 +1138,17 @@ avdInfo_getSkinInfo( AvdInfo* i, char** pSkinName, char** pSkinDir )
if (skinPath != NULL)
break;
}
+
+ /* or in the parent directory of the system dir */
+ {
+ char* parentDir = path_parent(i->androidOut, 1);
+ if (parentDir != NULL) {
+ skinPath = _checkSkinSkinsDir(parentDir, skinName);
+ AFREE(parentDir);
+ if (skinPath != NULL)
+ break;
+ }
+ }
}
/* look in the search paths. For each <dir> in the list,
@@ -1158,6 +1169,7 @@ avdInfo_getSkinInfo( AvdInfo* i, char** pSkinName, char** pSkinDir )
}
/* We didn't find anything ! */
+ *pSkinName = skinName;
return;
} while (0);