diff options
| author | 2009-11-06 16:56:51 -0500 | |
|---|---|---|
| committer | 2009-11-06 16:56:51 -0500 | |
| commit | 2b3970a2956152a508254aa2675b68df363d46c1 (patch) | |
| tree | e483d70ecc4a6b72e04ac4efde7fbc15e1646a84 | |
| parent | 8d51f7101d2427953dbff9b4b8f8c9fdc0dc4a91 (diff) | |
| parent | dc1396c881b80074c99d171aee02d3a5486180ca (diff) | |
Merge change Idc1396c8 into eclair
* changes:
Only use FLAG_ACTIVITY_CLEAR_TOP on the search intent when from global search.
| -rw-r--r-- | core/java/android/app/SearchDialog.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index 8faef59bab25..e5a769bb59dd 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -1646,8 +1646,11 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS Intent intent = new Intent(action); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // We need CLEAR_TOP to avoid reusing an old task that has other activities - // on top of the one we want. - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + // on top of the one we want. We don't want to do this in in-app search though, + // as it can be destructive to the activity stack. + if (mGlobalSearchMode) { + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + } if (data != null) { intent.setData(data); } |