From 725d8ff6c5b4e27c8b7f2969ce1ddf6ec715ea6d Mon Sep 17 00:00:00 2001 From: Bjorn Bringert Date: Wed, 29 Jul 2009 10:59:25 +0100 Subject: [PATCH] Log uid and package name when launching intents from search This is to help debug http://b/issue?id=2020252 where the WEB_SEARCH intent is sometimes not handled. --- core/java/android/app/SearchDialog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index e991bc6f8e313..fcfbd17378baa 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -1297,6 +1297,9 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS if (mGlobalSearchMode) { launchGlobalSearchIntent(intent); } else { + // If the intent was created from a suggestion, it will always have an explicit + // component here. + Log.i(LOG_TAG, "Starting (as ourselves) " + intent.toURI()); getContext().startActivity(intent); // If the search switches to a different activity, // SearchDialogWrapper#performActivityResuming @@ -1338,7 +1341,6 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); setBrowserApplicationId(intent); - if (DBG) Log.d(LOG_TAG, "Launching intent " + intent.toURI() + " as " + packageName); startActivityInPackage(intent, packageName); } @@ -1379,6 +1381,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS String resultWho = null; int requestCode = -1; boolean onlyIfNeeded = false; + Log.i(LOG_TAG, "Starting (uid " + uid + ", " + packageName + ") " + intent.toURI()); int result = ActivityManagerNative.getDefault().startActivityInPackage( uid, intent, resolvedType, resultTo, resultWho, requestCode, onlyIfNeeded); checkStartActivityResult(result, intent);