@Override
  public void onBackPressed() {
    // If this activity is started from {@link AddAccountActivity}, open it again.
    if (mStartFromAddAccountActivity) {
      startActivity(new Intent(BarcodeCaptureActivity.this, AddAccountActivity.class));
      finish();
    } else {
      super.onBackPressed();
    }
  }
Activity for managing barcode capture.

The detected barcode value is returned as a result from this activity. If the app doesn't have
the camera permission, it will try to request the permission.
java/com/google/android/apps/authenticator/barcode/BarcodeCaptureActivity.java