Search - optimize when updating the Index is done - part 2

- well, fix a regression when launching WiFi / Bluetooth settings
from the Quick Settings: we can only get the Intent properties
after the call to super.onCreate(...)

Change-Id: I21abbee610ad53dd0022c645268e55a6ba31a7b0
This commit is contained in:
Fabrice Di Meglio
2014-04-21 10:14:28 -07:00
parent 5ebabfcd35
commit 5cda21b449

View File

@@ -413,12 +413,6 @@ public class SettingsActivity extends Activity
getWindow().setUiOptions(getIntent().getIntExtra(EXTRA_UI_OPTIONS, 0));
}
final String initialFragmentName = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
if (initialFragmentName == null) {
Index.getInstance(this).update();
}
mAuthenticatorHelper = new AuthenticatorHelper();
mAuthenticatorHelper.updateAuthDescriptions(this);
mAuthenticatorHelper.onAccountsUpdated(this, null);
@@ -441,6 +435,13 @@ public class SettingsActivity extends Activity
mDisplayHomeAsUpEnabled = true;
// Getting Intent properties can only be done after the super.onCreate(...)
final String initialFragmentName = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
if (initialFragmentName == null) {
Index.getInstance(this).update();
}
if (savedState != null) {
// We are restarting from a previous saved state; used that to initialize, instead
// of starting fresh.
@@ -473,7 +474,6 @@ public class SettingsActivity extends Activity
setTitle(mInitialTitle);
Bundle initialArguments = getIntent().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS);
switchToFragment( initialFragmentName, initialArguments, true, false,
mInitialTitle, false);
} else {