@Override
  public void onDestroy() {
    inCallActivity = null;

    mCaptureView = null;
    if (mVideoView != null) {
      mVideoView.setOnTouchListener(null);
      mVideoView = null;
    }
    if (androidVideoWindowImpl != null) {
      // Prevent linphone from crashing if correspondent hang up while you are rotating
      androidVideoWindowImpl.release();
      androidVideoWindowImpl = null;
    }
    if (mGestureDetector != null) {
      mGestureDetector.setOnDoubleTapListener(null);
      mGestureDetector = null;
    }
    if (mScaleDetector != null) {
      mScaleDetector.destroy();
      mScaleDetector = null;
    }

    super.onDestroy();
  }
  public boolean onScale(CompatibilityScaleGestureDetector detector) {

    Log.i("================videoSize===001==");

    mZoomFactor *= detector.getScaleFactor();
    // Don't let the object get too small or too large.
    // Zoom to make the video fill the screen vertically
    float portraitZoomFactor =
        ((float) mVideoView.getHeight()) / (float) ((3 * mVideoView.getWidth()) / 4);
    // Zoom to make the video fill the screen horizontally
    float landscapeZoomFactor =
        ((float) mVideoView.getWidth()) / (float) ((3 * mVideoView.getHeight()) / 4);
    mZoomFactor =
        Math.max(0.1f, Math.min(mZoomFactor, Math.max(portraitZoomFactor, landscapeZoomFactor)));

    LinphoneCall currentCall = LinphoneManager.getLc().getCurrentCall();
    if (currentCall != null) {
      currentCall.zoomVideo(mZoomFactor, mZoomCenterX, mZoomCenterY);
      return true;
    }
    return false;
  }