@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    delegate = new SMSDelegate(this, this, xmlResId);
    delegate.setHidden(getLastNonConfigurationInstance());
    delegate.onCreate(savedInstanceState);
  }
 public void startActivity(Intent intent) {
   if (delegate != null) {
     delegate.startActivity(intent);
   } else {
     super.startActivity(intent);
   }
 }
  @Override
  public void onStart() {
    if (delegate != null) {
      delegate.onStart();
    }

    super.onStart();
  }
  /** Something of a subversion: if they click search, we accept voice input. */
  @Override
  public boolean onSearchRequested() {
    if (delegate != null) {
      return delegate.onSearchRequested();
    }

    return false;
  }
  @Override
  public void onDestroy() {
    if (delegate != null) {
      delegate.onDestroy();
    }

    super.onDestroy();
  }
  @Override
  public void onPause() {
    if (delegate != null) {
      delegate.onPause();
    }

    super.onPause();
  }
 @Override
 public Object onRetainNonConfigurationInstance() {
   return delegate.onRetainNonConfigurationInstance();
 }
 public void speak(String text, SpeechType type) {
   if (delegate != null) {
     delegate.speak(text, type);
   }
 }
 public void speak(String text, SpeechType type, boolean doFlush) {
   if (delegate != null) {
     delegate.speak(text, type, doFlush);
   }
 }
 public void onInit(int arg0) {
   if (delegate != null) {
     delegate.onInit(arg0);
   }
 }
 public void setHidden(Object o) {
   if (delegate != null) {
     delegate.setHidden(o);
   }
 }
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (delegate != null) {
     delegate.onActivityResult(requestCode, resultCode, data);
   }
 }
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
   return delegate.onCreateOptionsMenu(menu);
 }