super.onCreate(savedInstanceState);
Intent intent = getIntent();
if ((intent != null) && Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
if (!TextUtils.isEmpty(query)) {
// forward query to browser for Google search
Intent search = new Intent(Intent.ACTION_WEB_SEARCH);
search.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
search.putExtra(SearchManager.QUERY, query);
final Bundle appData = intent.getBundleExtra(SearchManager.APP_DATA);
if (appData != null) {
search.putExtra(SearchManager.APP_DATA, appData);
}
startActivity(search);
}
}
finish();