remove save/restore picture from browser app
These pictures may be arbitrarily large, and with the
newer caching mechanism, are rarely used.
Also, remove any old pictures when the Browser starts.
Change-Id: I08e1720a198b159733fda819304dc6af6811390a
http://b/2650945
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 1c32ecd..ad82fd0 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -368,6 +368,15 @@
attachTabToContentView(mTabControl.getCurrentTab());
}
+ // Delete old thumbnails to save space
+ File dir = mTabControl.getThumbnailDir();
+ if (dir.exists()) {
+ for (String child : dir.list()) {
+ File f = new File(dir, child);
+ f.delete();
+ }
+ }
+
// Read JavaScript flags if it exists.
String jsFlags = mSettings.getJsFlags();
if (jsFlags.trim().length() != 0) {