Bug 688930 - Fix detection of installation location when in /system, r=cjones
authorMichael Wu <mwu@mozilla.com>
Fri, 23 Sep 2011 21:54:59 -0700
changeset 77494 d5727cb7221b318d11d940daa5d67836ec8ca515
parent 77493 cf051f97c0934928c51d557ddd61c3ac5b25c259
child 77495 c764918036ab50a93c44c906597e4044ea7a553f
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerscjones
bugs688930
milestone9.0a1
Bug 688930 - Fix detection of installation location when in /system, r=cjones
embedding/android/GeckoAppShell.java
--- a/embedding/android/GeckoAppShell.java
+++ b/embedding/android/GeckoAppShell.java
@@ -273,17 +273,18 @@ public class GeckoAppShell
     public static void loadGeckoLibs(String apkName) {
         // The package data lib directory isn't placed in ld.so's
         // search path, so we have to manually load libraries that
         // libxul will depend on.  Not ideal.
         System.loadLibrary("mozutils");
         GeckoApp geckoApp = GeckoApp.mAppContext;
         String homeDir;
         if (Build.VERSION.SDK_INT < 8 ||
-            geckoApp.getApplication().getPackageResourcePath().startsWith("/data")) {
+            geckoApp.getApplication().getPackageResourcePath().startsWith("/data") ||
+            geckoApp.getApplication().getPackageResourcePath().startsWith("/system")) {
             File home = geckoApp.getFilesDir();
             homeDir = home.getPath();
             // handle the application being moved to phone from sdcard
             File profileDir = new File(homeDir, "mozilla");
             File oldHome = new File("/data/data/" + 
                         GeckoApp.mAppContext.getPackageName() + "/mozilla");
             if (oldHome.exists())
                 moveDir(oldHome, profileDir);