aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorJeff Hamilton <jham@android.com>2010-04-27 16:30:27 -0500
committerJeff Hamilton <jham@android.com>2010-04-27 22:57:53 -0500
commit731e9244aeb83b77a47efc4e65e9f2135ae634ff (patch)
tree6151525db31828db08ac0cc533e7ac83aec1a2e8 /android
parentb10d42d49ad5b87e91f0ae1d56e17ad4fb32bd8e (diff)
downloadexternal_qemu-731e9244aeb83b77a47efc4e65e9f2135ae634ff.zip
external_qemu-731e9244aeb83b77a47efc4e65e9f2135ae634ff.tar.gz
external_qemu-731e9244aeb83b77a47efc4e65e9f2135ae634ff.tar.bz2
When running from the Android build system and no skin is defined
on the command line check for a skin in $ANDROID_PRODUCT_OUT/skin. Change-Id: I776aa481b38bd4e48982fdb5c032a10c970576a8
Diffstat (limited to 'android')
-rw-r--r--android/avd/info.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/android/avd/info.c b/android/avd/info.c
index 5634ef6..992f292 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -1281,14 +1281,27 @@ _getBuildSkin( AvdInfo* i, AvdInfoParams* params )
D("selecting default skin name '%s'", skinName);
}
- i->skinName = ASTRDUP(skinName);
-
if (!skinDir) {
#define PREBUILT_SKINS_DIR "sdk/emulator/skins"
+#define PRODUCT_SKIN_DIR "skin"
do {
- /* try in <sysdir>/../skins first */
+ /* look for the product skin in $ANDROID_PRODUCT_OUT/skin if no skin name is defined */
+ if (!params->skinName) {
+ /* look for <product_out>/skin first */
+ p = bufprint( temp, end, "%s/skin",
+ i->androidOut );
+ if (path_exists(temp)) {
+ p = bufprint( temp, end, "%s",
+ i->androidOut );
+ skinName = PRODUCT_SKIN_DIR;
+ D("selecting default product skin at '%s/%s'", temp, skinName);
+ break;
+ }
+ }
+
+ /* next try in <sysdir>/../skins */
p = bufprint( temp, end, "%s/../skins",
i->androidBuildRoot );
if (path_exists(temp))
@@ -1303,6 +1316,8 @@ _getBuildSkin( AvdInfo* i, AvdInfoParams* params )
p = bufprint( temp, end, "%s", skinDir );
}
+ i->skinName = ASTRDUP(skinName);
+
q = bufprint(p, end, "/%s/layout", skinName);
if (q >= end || !path_exists(temp)) {
DD("skin content directory does not exist: %s", temp);