Bug 760165 - Don't cleanup libraries in the cache directory during startup. r=blassey
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 04 Jun 2012 08:17:49 +0200
changeset 95741 ad829b84b2da95b0aadc8c8369daae8961932090
parent 95740 4fbdf778beac420ca1933705013880df7990e8cb
child 95742 699ded02ce5a5d83e9c93c4d09d864af279ee0a3
push idunknown
push userunknown
push dateunknown
reviewersblassey
bugs760165
milestone15.0a1
Bug 760165 - Don't cleanup libraries in the cache directory during startup. r=blassey
mobile/android/base/GeckoThread.java
--- a/mobile/android/base/GeckoThread.java
+++ b/mobile/android/base/GeckoThread.java
@@ -31,32 +31,16 @@ public class GeckoThread extends Thread 
         mUri = uri;
         mRestoreMode = restoreMode;
 
         setName("Gecko");
     }
 
     public void run() {
         final GeckoApp app = GeckoApp.mAppContext;
-        File cacheFile = GeckoAppShell.getCacheDir(app);
-        File libxulFile = new File(cacheFile, "libxul.so");
-
-        if ((!libxulFile.exists() ||
-             new File(app.getApplication().getPackageResourcePath()).lastModified() >= libxulFile.lastModified())) {
-            File[] libs = cacheFile.listFiles(new FilenameFilter() {
-                public boolean accept(File dir, String name) {
-                    return name.endsWith(".so");
-                }
-            });
-            if (libs != null) {
-                for (int i = 0; i < libs.length; i++) {
-                    libs[i].delete();
-                }
-            }
-        }
 
         // At some point while loading the gecko libs our default locale gets set
         // so just save it to locale here and reset it as default after the join
         Locale locale = Locale.getDefault();
 
         String resourcePath = app.getApplication().getPackageResourcePath();
         GeckoAppShell.setupGeckoEnvironment(app);
         GeckoAppShell.loadSQLiteLibs(app, resourcePath);