Automated import from //branches/cupcake/...@141843,141843

This commit is contained in:
Dianne Hackborn 2009-03-24 18:30:18 -07:00 committed by The Android Open Source Project
parent f18b9082e8
commit 92d0dda3dc
2 changed files with 4 additions and 2 deletions

View File

@ -412,7 +412,8 @@ public final class Launcher extends Activity implements View.OnClickListener, On
intent.putExtra(Contacts.Intents.UI.FILTER_TEXT_EXTRA_KEY, str); intent.putExtra(Contacts.Intents.UI.FILTER_TEXT_EXTRA_KEY, str);
} }
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
try { try {
startActivity(intent); startActivity(intent);

View File

@ -505,7 +505,8 @@ public class LauncherProvider extends ContentProvider {
ComponentName cn = new ComponentName(packageName, className); ComponentName cn = new ComponentName(packageName, className);
info = packageManager.getActivityInfo(cn, 0); info = packageManager.getActivityInfo(cn, 0);
intent.setComponent(cn); intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
values.put(Favorites.INTENT, intent.toURI()); values.put(Favorites.INTENT, intent.toURI());
values.put(Favorites.TITLE, info.loadLabel(packageManager).toString()); values.put(Favorites.TITLE, info.loadLabel(packageManager).toString());
values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_APPLICATION); values.put(Favorites.ITEM_TYPE, Favorites.ITEM_TYPE_APPLICATION);