mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -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();
|
return showDownloadDialog();
|
||||||
}
|
}
|
||||||
intentScan.setPackage(targetAppPackage);
|
intentScan.setPackage(targetAppPackage);
|
||||||
|
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
|
intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
|
||||||
activity.startActivityForResult(intentScan, REQUEST_CODE);
|
activity.startActivityForResult(intentScan, REQUEST_CODE);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -314,6 +316,8 @@ public final class IntentIntegrator {
|
||||||
showDownloadDialog();
|
showDownloadDialog();
|
||||||
} else {
|
} else {
|
||||||
intent.setPackage(targetAppPackage);
|
intent.setPackage(targetAppPackage);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
|
||||||
activity.startActivity(intent);
|
activity.startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue