bug 631760 - don't hard code /data/data/<package name>, follow up r=me a=bustage
authorBrad Lassey <blassey@mozilla.com>
Tue, 08 Feb 2011 03:39:15 -0500
changeset 62131 e24d6f8127b2b044b34f51fa39daca04c4bd644f
parent 62130 3470891975c7ff2cacb92c5c2a8f51dba94ae51e
child 62132 18cca558e0ff2c1354d972684b63090fc3739b54
push id18611
push userblassey@mozilla.com
push dateTue, 08 Feb 2011 08:40:08 +0000
treeherdermozilla-central@e24d6f8127b2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, bustage
bugs631760
milestone2.0b12pre
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 631760 - don't hard code /data/data/<package name>, follow up r=me a=bustage
embedding/android/GeckoApp.java
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -166,25 +166,18 @@ abstract public class GeckoApp
 
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState)
     {
         Log.i("GeckoApp", "create");
         super.onCreate(savedInstanceState);
 
-        if (sGREDir == null) {
-            // If application.ini already exists in the old dir, use its parent.
-            File app_ini =
-                new File("/data/data/" + getPackageName() + "/application.ini");
-            if (app_ini.exists())
-                sGREDir = app_ini.getParentFile();
-            else
-                sGREDir = this.getDir("gre", 0);
-        }
+        if (sGREDir == null)
+            sGREDir = new File(this.getApplicationInfo().dataDir);
 
         mAppContext = this;
 
         getWindow().setFlags(mFullscreen ?
                              WindowManager.LayoutParams.FLAG_FULLSCREEN : 0,
                              WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
         if (surfaceView == null)