public void actionNextTimerTask() {
   if (isSlideshowRunning) {
     userCreatedTouchEvent = false;
     gallery.setUserCreatedTouchEvent(false);
     slideshowTimerTask = new SlideshowTimerTask();
     slideshowTimerTask.execute();
   }
 }
 public void actionResumeSlideshow() {
   isSlideshowRunning = true;
   slideshowTimerTask = new SlideshowTimerTask();
   slideshowTimerTask.execute();
   menu.setGroupVisible(R.id.menuGroupPaused, false);
   menu.setGroupVisible(R.id.menuGroupPlaying, true);
   Toast.makeText(this, R.string.msg_resume_slideshow, Toast.LENGTH_SHORT).show();
 }
  /* (non-Javadoc)
   * @see android.app.Activity#onResume()
   */
  @Override
  protected void onResume() {
    Log.d(LOG_PREFIX, "onResume called");
    if (cachedPhotosDeleted) {
      Intent homeIntent = new Intent(this, SlideshowActivity.class);
      homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      startActivity(homeIntent);
      super.onResume();
      return;
    }
    if (isSlideshowRunning) {
      slideshowTimerTask = new SlideshowTimerTask();
      slideshowTimerTask.execute();
    }

    super.onResume();
  }