Search - optimize when updating the Index is done
- we should only try to update the index when the Settings app is launched Change-Id: I0543d518ea3e06804ce6fb09c987ea722bcc87cd
This commit is contained in:
@@ -412,7 +412,12 @@ public class SettingsActivity extends Activity
|
||||
if (getIntent().hasExtra(EXTRA_UI_OPTIONS)) {
|
||||
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);
|
||||
@@ -436,9 +441,6 @@ public class SettingsActivity extends Activity
|
||||
|
||||
mDisplayHomeAsUpEnabled = true;
|
||||
|
||||
String initialFragmentName = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
|
||||
Bundle initialArguments = getIntent().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS);
|
||||
|
||||
if (savedState != null) {
|
||||
// We are restarting from a previous saved state; used that to initialize, instead
|
||||
// of starting fresh.
|
||||
@@ -470,6 +472,8 @@ public class SettingsActivity extends Activity
|
||||
mInitialTitle = (initialTitle != null) ? initialTitle : getTitle();
|
||||
setTitle(mInitialTitle);
|
||||
|
||||
Bundle initialArguments = getIntent().getBundleExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS);
|
||||
|
||||
switchToFragment( initialFragmentName, initialArguments, true, false,
|
||||
mInitialTitle, false);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user