summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorMike Reed <reed@google.com>2010-03-05 10:13:34 -0500
committerMike Reed <reed@google.com>2010-03-05 10:13:34 -0500
commitd5eee69bc37b5d92d376e6d3e07890550c452e6d (patch)
treedcf9418e81147326a62433dbb7e5b4e4f4ecdb8d /src/com/android
parente95d75e89eb7da2089bfacc2536c6590ddc29388 (diff)
downloadpackages_apps_Browser-d5eee69bc37b5d92d376e6d3e07890550c452e6d.zip
packages_apps_Browser-d5eee69bc37b5d92d376e6d3e07890550c452e6d.tar.gz
packages_apps_Browser-d5eee69bc37b5d92d376e6d3e07890550c452e6d.tar.bz2
if savePicture failes, delete the file (which is now unreliable, and possibly large)
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/browser/Tab.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 7b54e38..e502e5b 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -1802,6 +1802,10 @@ class Tab {
mMainView.hashCode() + "_pic.save");
if (mMainView.savePicture(mSavedState, f)) {
mSavedState.putString(CURRPICTURE, f.getPath());
+ } else {
+ // if savePicture returned false, we can't trust the contents,
+ // and it may be large, so we delete it right away
+ f.delete();
}
}