private void requestCameraPermission() {
    Log.w(TAG, "Camera permission is not granted. Requesting permission");

    final String[] permissions = new String[]{Manifest.permission.CAMERA};

    if (!mPermissionRequestor
        .shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA)) {
      mPermissionRequestor.requestPermissions(this, permissions, RC_HANDLE_CAMERA_PERM);
      return;
    }

    View.OnClickListener listener = new View.OnClickListener() {
      @Override
      public void onClick(View view) {
        mPermissionRequestor
            .requestPermissions(BarcodeCaptureActivity.this, permissions, RC_HANDLE_CAMERA_PERM);
      }
    };

    Snackbar.make(mGraphicOverlay, R.string.permission_camera_rationale,
        Snackbar.LENGTH_INDEFINITE)
        .setAction(R.string.ok, listener)
        .show();
  }
Handles the requesting of the camera permission.  This includes showing a "Snackbar" message of
why the permission is needed then sending the request.
java/com/google/android/apps/authenticator/barcode/BarcodeCaptureActivity.java