Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 442da48b authored by Bjorn Bringert's avatar Bjorn Bringert
Browse files

Use FLAG_ACTIVITY_CLEAR_TOP when launching search suggestions.

Fixes http://b/issue?id=2118143
"Sometimes clicking a contact suggestion opens the
wrong activity in Contacts"

Change-Id: Ie4c150e91e455949e9f17245920850cfe7e6599e
parent 585c67f7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1617,6 +1617,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS
        // Now build the Intent
        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);
        if (data != null) {
            intent.setData(data);
        }