bug 634530 - Fennec fails to startup on Droid Pro when the device is connected to PC via USB r=mbrubeck a=blocking-fennec CLOSED TREE GECKO20b12pre_20110216_RELBRANCH FENNEC_4_0b5_BUILD2
authorBrad Lassey <blassey@mozilla.com>
Wed, 16 Feb 2011 12:02:10 -0500
branchGECKO20b12pre_20110216_RELBRANCH
changeset 62712 9693e30b9c9c04faa6aa25488a30b2b912428ddb
parent 62711 33142eed9686c22e06af2dd43980105d6e0b49fe
child 62713 25155fc1fa5c1c78aaed453dbe4dd1f313125b9e
push idunknown
push userunknown
push dateunknown
reviewersmbrubeck, blocking-fennec
bugs634530
milestone2.0b12pre
bug 634530 - Fennec fails to startup on Droid Pro when the device is connected to PC via USB r=mbrubeck a=blocking-fennec CLOSED TREE
embedding/android/GeckoAppShell.java
--- a/embedding/android/GeckoAppShell.java
+++ b/embedding/android/GeckoAppShell.java
@@ -211,32 +211,32 @@ class GeckoAppShell
             File profileDir = new File(homeDir, "mozilla");
             File oldHome = new File("/data/data/" + 
                         GeckoApp.mAppContext.getPackageName() + "/mozilla");
             if (oldHome.exists())
                 moveDir(oldHome, profileDir);
             if (Build.VERSION.SDK_INT >= 8) {
                 File extHome =  geckoApp.getExternalFilesDir(null);
                 File extProf = new File (extHome, "mozilla");
-                if (extHome.exists())
+                if (extHome != null && extProf != null && extProf.exists())
                     moveDir(extProf, profileDir);
             }
         } else {
             File home = geckoApp.getExternalFilesDir(null);
             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);
 
             File intHome =  geckoApp.getFilesDir();
             File intProf = new File(intHome, "mozilla");
-            if (intHome.exists())
+            if (intHome != null && intProf != null && intProf.exists())
                 moveDir(intProf, profileDir);
         }
         GeckoAppShell.putenv("HOME=" + homeDir);
         GeckoAppShell.putenv("GRE_HOME=" + GeckoApp.sGREDir.getPath());
         Intent i = geckoApp.getIntent();
         String env = i.getStringExtra("env0");
         Log.i("GeckoApp", "env0: "+ env);
         for (int c = 1; env != null; c++) {