OSDN Git Service

Build bugreport paths for emulated storage.
authorJeff Sharkey <jsharkey@android.com>
Wed, 12 Sep 2012 20:15:50 +0000 (13:15 -0700)
committerJeff Sharkey <jsharkey@android.com>
Wed, 12 Sep 2012 20:15:50 +0000 (13:15 -0700)
Bug: 7152673
Change-Id: Iae7b298721d2b6690ce9b57245400702fb5d0c4c

bugmailer/bugmailer.sh

index 8b1b7fe..c467aee 100755 (executable)
@@ -9,15 +9,16 @@ if [ "x$(getprop ro.build.type)" = "xuser" -a \
   exit 0
 fi
 
-# Use bugreport-specific paths if defined
-if [ -n "$BUGREPORT_WRITE_PATH" ]; then
-  writePath="$BUGREPORT_WRITE_PATH"
+# Build emulated storage paths when appropriate
+# See storage config details at http://source.android.com/tech/storage/
+if [ -n "$EMULATED_STORAGE_SOURCE" ]; then
+  writePath="$EMULATED_STORAGE_SOURCE/0"
+  readPath="$EMULATED_STORAGE_TARGET/0"
 else
   writePath="$EXTERNAL_STORAGE"
+  readPath="$EXTERNAL_STORAGE"
 fi
 
-readPath="$EXTERNAL_STORAGE"
-
 tmpPath="/data/local/tmp"
 bugreportPath="bugreports"
 screenshotPath="Pictures/Screenshots"