@Override public void onPause() { super.onPause(); mIsActive = false; mAlbumSetDataAdapter.pause(); mAlbumSetView.pause(); mActionModeHandler.pause(); mEyePosition.pause(); DetailsHelper.pause(); // Call disableClusterMenu to avoid receiving callback after paused. // Don't hide menu here otherwise the list menu will disappear earlier than // the action bar, which is janky and unwanted behavior. mActionBar.disableClusterMenu(false); if (mSyncTask != null) { mSyncTask.cancel(); mSyncTask = null; clearLoadingBit(BIT_LOADING_SYNC); } }
@Override protected void onPause() { super.onPause(); mIsActive = false; if (mSelectionManager.inSelectionMode()) { mSelectionManager.leaveSelectionMode(); } mAlbumView.setSlotFilter(null); mActionModeHandler.pause(); mAlbumDataAdapter.pause(); mAlbumView.pause(); DetailsHelper.pause(); if (!mGetContent) { mActivity.getGalleryActionBar().disableAlbumModeMenu(true); } if (mSyncTask != null) { mSyncTask.cancel(); mSyncTask = null; clearLoadingBit(BIT_LOADING_SYNC); } }