summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2009-08-12 09:35:42 -0700
committerGrace Kloba <klobag@google.com>2009-08-12 09:35:42 -0700
commit4d7880fe3061ed691d220e64cd9e54a8c7b2d1bf (patch)
treeced40097da274d1ff09959f3075cd834350baa01 /src/com
parent722f755c14ea05ddaf041b282ab68c30a6ed05e6 (diff)
downloadpackages_apps_Browser-4d7880fe3061ed691d220e64cd9e54a8c7b2d1bf.zip
packages_apps_Browser-4d7880fe3061ed691d220e64cd9e54a8c7b2d1bf.tar.gz
packages_apps_Browser-4d7880fe3061ed691d220e64cd9e54a8c7b2d1bf.tar.bz2
Change the Browser trace file from data dir to sdcard, increase the size
from 8M to 20M so that common sites like nytimes.com can fit.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/BrowserActivity.java21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 5c4a63d..5c2764b 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3017,31 +3017,18 @@ public class BrowserActivity extends Activity
// database can be updated.
updateIcon(view, favicon);
- if (mSettings.isTracing() == true) {
- // FIXME: we should save the trace file somewhere other than data.
- // I can't use "/tmp" as it competes for system memory.
- File file = getDir("browserTrace", 0);
- String baseDir = file.getPath();
- if (!baseDir.endsWith(File.separator)) baseDir += File.separator;
+ if (mSettings.isTracing()) {
String host;
try {
WebAddress uri = new WebAddress(url);
host = uri.mHost;
} catch (android.net.ParseException ex) {
- host = "unknown_host";
+ host = "browser";
}
host = host.replace('.', '_');
- baseDir = baseDir + host;
- file = new File(baseDir+".data");
- if (file.exists() == true) {
- file.delete();
- }
- file = new File(baseDir+".key");
- if (file.exists() == true) {
- file.delete();
- }
+ host += ".trace";
mInTrace = true;
- Debug.startMethodTracing(baseDir, 8 * 1024 * 1024);
+ Debug.startMethodTracing(host, 20 * 1024 * 1024);
}
// Performance probe