mirror of
https://github.com/zxing/zxing.git
synced 2025-01-13 04:07:27 -08:00
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:
parent
699e7a14f5
commit
c4e860f812
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue