Bug 719195 - about:Home displayed briefly before session restore. r=mfinkle

This commit is contained in:
Brian Nicholson 2012-01-27 17:28:30 -08:00
parent f1c568b9cf
commit 5a6a82d6fd

View File

@ -1456,6 +1456,8 @@ abstract public class GeckoApp
@Override
public void onCreate(Bundle savedInstanceState)
{
mAppContext = this;
// StrictMode is set by defaults resource flag |enableStrictMode|.
if (getResources().getBoolean(R.bool.enableStrictMode)) {
enableStrictMode();
@ -1498,13 +1500,18 @@ abstract public class GeckoApp
mLastTitle = title;
}
if (mLastUri == null || mLastUri.equals("") ||
mLastUri.equals("about:home")) {
showAboutHome();
if (mLastUri == null || mLastUri.equals("") || mLastUri.equals("about:home")) {
// show about:home if we aren't restoring previous session
Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - start check sessionstore.bak exists");
File profileDir = getProfileDir();
boolean sessionExists = false;
if (profileDir != null)
sessionExists = new File(profileDir, "sessionstore.bak").exists();
Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - finish check sessionstore.bak exists");
if (!sessionExists)
showAboutHome();
}
mAppContext = this;
if (sGREDir == null)
sGREDir = new File(this.getApplicationInfo().dataDir);