From d0635d51bc8a71e7dcc7dda39862f18aca5bd135 Mon Sep 17 00:00:00 2001 From: Mike LeBeau Date: Thu, 1 Apr 2010 18:08:34 -0700 Subject: Use flattenToShortString instead of toShortString on ComponentNames to be sent in RecognizerIntent.EXTRA_CALLING_PACKAGE. This never should have been using toShortString because that includes curly braces and is not correctly parsed by ComponentName.unflattenFromString. This was needed as part of http://b/2546173 Change-Id: If34a9273cbcae13a75347be0b6b7ef307134ed40 --- core/java/android/app/SearchDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/java/android/app/SearchDialog.java') diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java index d6bb7b6d6937..9d217ec19946 100644 --- a/core/java/android/app/SearchDialog.java +++ b/core/java/android/app/SearchDialog.java @@ -819,7 +819,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS Intent voiceIntent = new Intent(baseIntent); ComponentName searchActivity = searchable.getSearchActivity(); voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, - searchActivity == null ? null : searchActivity.toShortString()); + searchActivity == null ? null : searchActivity.flattenToShortString()); return voiceIntent; } @@ -878,7 +878,7 @@ public class SearchDialog extends Dialog implements OnItemClickListener, OnItemS voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language); voiceIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults); voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, - searchActivity == null ? null : searchActivity.toShortString()); + searchActivity == null ? null : searchActivity.flattenToShortString()); // Add the values that configure forwarding the results voiceIntent.putExtra(RecognizerIntent.EXTRA_RESULTS_PENDINGINTENT, pending); -- cgit v1.2.3