Set better intent flags in integration so user's activity stays on top

git-svn-id: https://zxing.googlecode.com/svn/trunk@2024 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-11-11 09:32:30 +00:00
parent 699e7a14f5
commit c4e860f812

View file

@ -233,6 +233,8 @@ public final class IntentIntegrator {
return showDownloadDialog();
}
intentScan.setPackage(targetAppPackage);
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
activity.startActivityForResult(intentScan, REQUEST_CODE);
return null;
}
@ -314,6 +316,8 @@ public final class IntentIntegrator {
showDownloadDialog();
} else {
intent.setPackage(targetAppPackage);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
activity.startActivity(intent);
}
}