From 74aefdf28f4accbaa5d8f0978008472fe562196a Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 7 Aug 2015 10:37:21 -0700 Subject: [PATCH] Debugging for issue #22556778: Starting under voice control not allowed Better error messages in log to explain what is going on. Change-Id: Ie686a323ceedd42453b6581fe79653b407d49ee5 --- .../com/android/server/am/ActivityStackSupervisor.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 71fd49b71c987..7c796612feebe 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -1509,9 +1509,13 @@ public final class ActivityStackSupervisor implements DisplayListener { intent.addCategory(Intent.CATEGORY_VOICE); if (!AppGlobals.getPackageManager().activitySupportsIntent( intent.getComponent(), intent, resolvedType)) { + Slog.w(TAG, + "Activity being started in current voice task does not support voice: " + + intent); err = ActivityManager.START_NOT_VOICE_COMPATIBLE; } } catch (RemoteException e) { + Slog.w(TAG, "Failure checking voice capabilities", e); err = ActivityManager.START_NOT_VOICE_COMPATIBLE; } } @@ -1523,9 +1527,13 @@ public final class ActivityStackSupervisor implements DisplayListener { try { if (!AppGlobals.getPackageManager().activitySupportsIntent(intent.getComponent(), intent, resolvedType)) { + Slog.w(TAG, + "Activity being started in new voice task does not support: " + + intent); err = ActivityManager.START_NOT_VOICE_COMPATIBLE; } } catch (RemoteException e) { + Slog.w(TAG, "Failure checking voice capabilities", e); err = ActivityManager.START_NOT_VOICE_COMPATIBLE; } }