diff options
| author | Adam Powell <adamp@google.com> | 2012-01-24 13:33:09 -0800 |
|---|---|---|
| committer | Adam Powell <adamp@google.com> | 2012-01-24 13:46:45 -0800 |
| commit | 314419ccb9daa215c5148f59e5b60c696ef51385 (patch) | |
| tree | befaa41df12b20f62f9c7ffd7940e38cac5005b3 /core/java/android/widget/ActivityChooserView.java | |
| parent | 629c6765ca21b6ef23db893a35c62eef6a2a28b6 (diff) | |
Update ShareActionProvider to clear the sharing activity when the task
is reset.
As per platform guidelines, when launching a sharing activity the Intent
flag FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET should be used.
Change-Id: I30bd3d20eb75aee7943b681dc2d9c7f44a04e919
Diffstat (limited to 'core/java/android/widget/ActivityChooserView.java')
| -rw-r--r-- | core/java/android/widget/ActivityChooserView.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/widget/ActivityChooserView.java b/core/java/android/widget/ActivityChooserView.java index 60b24bc1207e..b1df6b44bb82 100644 --- a/core/java/android/widget/ActivityChooserView.java +++ b/core/java/android/widget/ActivityChooserView.java @@ -547,6 +547,7 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod position = mAdapter.getShowDefaultActivity() ? position : position + 1; Intent launchIntent = mAdapter.getDataModel().chooseActivity(position); if (launchIntent != null) { + launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); mContext.startActivity(launchIntent); } } @@ -564,6 +565,7 @@ public class ActivityChooserView extends ViewGroup implements ActivityChooserMod final int index = mAdapter.getDataModel().getActivityIndex(defaultActivity); Intent launchIntent = mAdapter.getDataModel().chooseActivity(index); if (launchIntent != null) { + launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); mContext.startActivity(launchIntent); } } else if (view == mExpandActivityOverflowButton) { |
