@Override public void onStart() { super.onStart(); mPaused = false; if (!init(mSavedUri)) { Log.w(TAG, "init failed: " + mSavedUri); finish(); return; } // normally this will never be zero but if one "backs" into this // activity after removing the sdcard it could be zero. in that // case just "finish" since there's nothing useful that can happen. int count = mAllImages.getCount(); if (count == 0) { finish(); return; } else if (count <= mCurrentPosition) { mCurrentPosition = count - 1; } if (mGetter == null) { makeGetter(); } if (mMode == MODE_SLIDESHOW) { loadNextImage(mCurrentPosition, 0, true); } else { // MODE_NORMAL setImage(mCurrentPosition, mShowControls); mShowControls = false; } }
@Override protected void onStart() { super.onStart(); for (LifeCycleListener listener : mListeners) { listener.onActivityStarted(this); } }