From 06ca9977d41f0d3739a06e26171a2b1b142fcef4 Mon Sep 17 00:00:00 2001 From: lge-aosp Date: Tue, 15 Mar 2011 10:25:57 +0900 Subject: 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 Change-Id: I9c24d83ca3b7c20976bb7daebeff7fd694ce3a2f --- core/java/android/app/Dialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index da8c9e5..d70ec0b 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -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; -- cgit v1.1