@Override protected void onPause() { mPausing = true; stopPreview(); // Close the camera now because other activities may need to use it. closeCamera(); resetScreenOn(); if (mFirstTimeInitialized) { mOrientationListener.disable(); hidePostCaptureAlert(); } // If we are in an image capture intent and has taken // a picture, we just clear it in onPause. mImageCapture.clearLastData(); mImageCapture = null; if (mStorageHint != null) { mStorageHint.cancel(); mStorageHint = null; } // Remove the messages in the event queue. mHandler.removeMessages(RESTART_PREVIEW); mHandler.removeMessages(FIRST_TIME_INIT); super.onPause(); }
@Override public void onPause() { super.onPause(); if (orientationListener != null) { orientationListener.disable(); orientationListener = null; } }
protected void onDestroy() { // Log.d(TAG, "enter ContShooting#onDestroy"); super.onDestroy(); if (mPreview != null) { mPreview.release(); } mOrientationListener.disable(); }
@Override protected void onPause() { super.onPause(); if (mHandleTask != null) { if (mHandleTask.cancel(true)) ; } if (mCamera != null) { mCamera.setPreviewCallback(null); mCamera.stopPreview(); mCamera.release(); mCamera = null; mPreviewing = false; Log.d("mPreviewing", "mPreviewing changed to :" + mPreviewing); } orientationEventListener.disable(); }
@Override protected void onDestroy() { if (mOrientationHelper != null) { mOrientationHelper.disable(); mOrientationHelper = null; } LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); if (lc != null) { lc.removeListener(mListener); } instance = null; super.onDestroy(); unbindDrawables(findViewById(R.id.topLayout)); System.gc(); }
@Override public void disable() { isEnabled = false; super.disable(); }