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 78805 d5727cb7221b318d11d940daa5d67836ec8ca515
parent 78804 cf051f97c0934928c51d557ddd61c3ac5b25c259
child 78806 c764918036ab50a93c44c906597e4044ea7a553f
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs688930
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);