From a34f30a3a3eff137c0cc2d6ef16798dfbb4510ff Mon Sep 17 00:00:00 2001
From: Jakub Adam <jakub.adam@tieto.com>
Date: Fri, 15 Mar 2013 12:29:29 +0100
Subject: [PATCH] fix-traceview-script-paths

---
 traceview/etc/traceview |   28 +---------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/traceview/etc/traceview b/traceview/etc/traceview
index cd4a25f..5c73534 100755
--- a/traceview/etc/traceview
+++ b/traceview/etc/traceview
@@ -36,7 +36,7 @@ prog="${progdir}"/"${progname}"
 cd "${oldwd}"
 
 jarfile=traceview.jar
-frameworkdir="$progdir"
+frameworkdir="/usr/share/java"
 libdir="$progdir"
 if [ ! -r "$frameworkdir/$jarfile" ]
 then
@@ -75,32 +75,6 @@ done
 
 jarpath="$frameworkdir/$jarfile"
 
-# Figure out the path to the swt.jar for the current architecture.
-# if ANDROID_SWT is defined, then just use this.
-# else, if running in the Android source tree, then look for the correct swt folder in prebuilt
-# else, look for the correct swt folder in the SDK under tools/lib/
-swtpath=""
-if [ -n "$ANDROID_SWT" ]; then
-    swtpath="$ANDROID_SWT"
-else
-    vmarch=`${javaCmd} -jar "${frameworkdir}"/archquery.jar`
-    if [ -n "$ANDROID_BUILD_TOP" ]; then
-        osname=`uname -s | tr A-Z a-z`
-        swtpath="${ANDROID_BUILD_TOP}/prebuilts/tools/${osname}-${vmarch}/swt"
-    else
-        swtpath="${frameworkdir}/${vmarch}"
-    fi
-fi
-
-# Combine the swtpath and the framework dir path.
-if [ -d "$swtpath" ]; then
-    frameworkdir="${swtpath}:${frameworkdir}"
-else
-    echo "SWT folder '${swtpath}' does not exist."
-    echo "Please export ANDROID_SWT to point to the folder containing swt.jar for your platform."
-    exit 1
-fi
-
 if [ -x $progdir/monitor ]; then
     echo "The standalone version of traceview is deprecated."
     echo "Please use Android Device Monitor (tools/monitor) instead."
-- 
1.7.10.4

