Android Java Como impedir a abertura da atividade duas vezes programaticamente

intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
siyanda.zama