private void onProfileChanged(int newProfile) {
    LinphoneCore lc = LinphoneManager.getLc();
    lc.setUploadBandwidth(bandwidthes[newProfile][0]);
    lc.setDownloadBandwidth(bandwidthes[newProfile][1]);

    if (lc.isIncall()) {
      CallManager.getInstance().reinvite();
    } else {
      updateWithProfileSettings(lc, null);
    }
  }
  public void switchCamera() {
    try {
      int videoDeviceId = LinphoneManager.getLc().getVideoDevice();
      videoDeviceId = (videoDeviceId + 1) % AndroidCameraConfiguration.retrieveCameras().length;
      LinphoneManager.getLc().setVideoDevice(videoDeviceId);
      CallManager.getInstance().updateCall();

      // previous call will cause graph reconstruction -> regive preview
      // window
      if (mCaptureView != null) {
        LinphoneManager.getLc().setPreviewWindow(mCaptureView);
      }
    } catch (ArithmeticException ae) {
      Log.e("Cannot swtich camera : no camera");
    }
  }