Bug 1038775 - Always launch search activity on dashboard. r=margaret

This commit is contained in:
Eric Edens 2014-07-15 14:12:29 -07:00
Родитель 383c49026b
Коммит ea303f4e22
2 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -4,7 +4,6 @@
package org.mozilla.search;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.View;
@ -33,7 +32,6 @@ public class MainActivity extends FragmentActivity implements AcceptsSearchQuery
protected void onCreate(Bundle stateBundle) {
super.onCreate(stateBundle);
setContentView(R.layout.search_activity_main);
startPresearch();
}
@Override
@ -43,6 +41,13 @@ public class MainActivity extends FragmentActivity implements AcceptsSearchQuery
.startSearch(s);
}
@Override
protected void onResume() {
super.onResume();
// When the app launches, make sure we're in presearch *always*
startPresearch();
}
private void startPresearch() {
if (state != State.PRESEARCH) {
state = State.PRESEARCH;

Просмотреть файл

@ -119,11 +119,7 @@ public class SearchFragment extends Fragment implements AdapterView.OnItemClickL
new AutoCompleteAgentManager(getActivity(), new MainUiHandler(autoCompleteAdapter));
// This will hide the autocomplete box and background frame.
// Is there a case where we *shouldn't* hide this upfront?
// Uncomment show card stream first.
// transitionToWaiting();
transitionToRunning();
transitionToWaiting();
// Attach listener for tapping on a suggestion.
suggestionDropdown.setOnItemClickListener(new AdapterView.OnItemClickListener() {