diff options
author | Dianne Hackborn <hackbod@google.com> | 2015-10-09 16:09:25 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2015-10-09 16:09:25 -0700 |
commit | 958b9d2ecc0fabdd1d6d3e99b001f0fa57897da9 (patch) | |
tree | 2d57d9ccbc47cda13346917b25c45e2c4acad7b1 /services | |
parent | 29433f701f6722e1f175dd3b735ed025309907b0 (diff) | |
download | frameworks_base-958b9d2ecc0fabdd1d6d3e99b001f0fa57897da9.zip frameworks_base-958b9d2ecc0fabdd1d6d3e99b001f0fa57897da9.tar.gz frameworks_base-958b9d2ecc0fabdd1d6d3e99b001f0fa57897da9.tar.bz2 |
Fix issue #24743380: VoiceInteractionManagerService doesn't use current...
...user for service info
Now it does.
The actual change is basically one line, passing in the current user
when building the service info. The rest is more debugging output to
be able to see what is going on.
Change-Id: I451884e0780aac6ee92fd2cd520071894afdf586
Diffstat (limited to 'services')
2 files changed, 14 insertions, 4 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java index a8874d0..a96c164 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java @@ -925,7 +925,7 @@ public class VoiceInteractionManagerService extends SystemService { return; } synchronized (this) { - pw.println("VOICE INTERACTION MANAGER (dumpsys voiceinteraction)\n"); + pw.println("VOICE INTERACTION MANAGER (dumpsys voiceinteraction)"); pw.println(" mEnableService: " + mEnableService); if (mImpl == null) { pw.println(" (No active implementation)"); diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java index 28520be..30296e1 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java @@ -36,6 +36,7 @@ import android.service.voice.IVoiceInteractionService; import android.service.voice.IVoiceInteractionSession; import android.service.voice.VoiceInteractionService; import android.service.voice.VoiceInteractionServiceInfo; +import android.util.PrintWriterPrinter; import android.util.Slog; import android.view.IWindowManager; @@ -114,9 +115,9 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mAm = ActivityManagerNative.getDefault(); VoiceInteractionServiceInfo info; try { - info = new VoiceInteractionServiceInfo(context.getPackageManager(), service); - } catch (PackageManager.NameNotFoundException e) { - Slog.w(TAG, "Voice interaction service not found: " + service); + info = new VoiceInteractionServiceInfo(context.getPackageManager(), service, mUser); + } catch (RemoteException|PackageManager.NameNotFoundException e) { + Slog.w(TAG, "Voice interaction service not found: " + service, e); mInfo = null; mSessionComponentName = null; mIWindowManager = null; @@ -260,9 +261,18 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne } return; } + pw.print(" mUser="); pw.println(mUser); pw.print(" mComponent="); pw.println(mComponent.flattenToShortString()); pw.print(" Session service="); pw.println(mInfo.getSessionService()); + pw.println(" Service info:"); + mInfo.getServiceInfo().dump(new PrintWriterPrinter(pw), " "); + pw.println(" Application info:"); + mInfo.getServiceInfo().applicationInfo.dump(new PrintWriterPrinter(pw), " "); + pw.print(" Recognition service="); pw.println(mInfo.getRecognitionService()); pw.print(" Settings activity="); pw.println(mInfo.getSettingsActivity()); + pw.print(" Supports assist="); pw.println(mInfo.getSupportsAssist()); + pw.print(" Supports launch from keyguard="); + pw.println(mInfo.getSupportsLaunchFromKeyguard()); if (mDisabledShowContext != 0) { pw.print(" mDisabledShowContext="); pw.println(Integer.toHexString(mDisabledShowContext)); |