26  @Override 
public void onCreate(Bundle savedInstanceState)
 
   28    super.onCreate(savedInstanceState);
 
   29    handleIntent(getIntent());
 
   32  @Override 
protected void onNewIntent(Intent intent)
 
   38  private void startSessionWithConnectionReference(String refStr)
 
   41    Bundle bundle = 
new Bundle();
 
   42    bundle.putString(SessionActivity.PARAM_CONNECTION_REFERENCE, refStr);
 
   43    Intent sessionIntent = 
new Intent(
this, SessionActivity.class);
 
   44    sessionIntent.putExtras(bundle);
 
   46    startActivityForResult(sessionIntent, 0);
 
   49  private void editBookmarkWithConnectionReference(String refStr)
 
   51    Bundle bundle = 
new Bundle();
 
   52    bundle.putString(BookmarkActivity.PARAM_CONNECTION_REFERENCE, refStr);
 
   53    Intent bookmarkIntent = 
new Intent(this.getApplicationContext(), BookmarkActivity.class);
 
   54    bookmarkIntent.putExtras(bundle);
 
   55    startActivityForResult(bookmarkIntent, 0);
 
   58  private void handleIntent(Intent intent)
 
   61    String action = intent.getAction();
 
   62    if (Intent.ACTION_SEARCH.equals(action))
 
   63      startSessionWithConnectionReference(ConnectionReference.getHostnameReference(
 
   64          intent.getStringExtra(SearchManager.QUERY)));
 
   65    else if (Intent.ACTION_VIEW.equals(action))
 
   66      startSessionWithConnectionReference(intent.getDataString());
 
   67    else if (Intent.ACTION_EDIT.equals(action))
 
   68      editBookmarkWithConnectionReference(intent.getDataString());
 
   71  @Override 
protected void onActivityResult(
int requestCode, 
int resultCode, Intent data)
 
   73    super.onActivityResult(requestCode, resultCode, data);
 
   74    this.setResult(resultCode);