Merge "Fix startSearch condition on Dialog, because pressing search key causes ANR popup. If search key is pressed on Dialog and there is no search item then do nothing. How to reproduce the issue: Settings > About phone > Legal information > Google legal > Press search key > Touch list item or press back key > ANR popup is shown"

This commit is contained in:
Conley Owens
2011-04-29 09:59:48 -07:00
committed by Android Code Review

View File

@@ -823,7 +823,7 @@ public class Dialog implements DialogInterface, Window.Callback,
// associate search with owner activity
final ComponentName appName = getAssociatedActivity();
if (appName != null) {
if (appName != null && searchManager.getSearchableInfo(appName) != null) {
searchManager.startSearch(null, false, appName, null, false);
dismiss();
return true;