diff options
author | Dianne Hackborn <hackbod@google.com> | 2015-05-29 17:58:53 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2015-06-01 11:42:04 -0700 |
commit | 2ee5c368f844bc0f6ce55ff6d5cf3d5604cad5d8 (patch) | |
tree | 592fceaa701e4bb71162f6d4da7ccc951fe5caa5 /services/voiceinteraction | |
parent | 4573dddcce3f232d2eeb20bfe0e204e15a9416e9 (diff) | |
download | frameworks_base-2ee5c368f844bc0f6ce55ff6d5cf3d5604cad5d8.zip frameworks_base-2ee5c368f844bc0f6ce55ff6d5cf3d5604cad5d8.tar.gz frameworks_base-2ee5c368f844bc0f6ce55ff6d5cf3d5604cad5d8.tar.bz2 |
Update VoiceInteractionService from API review.
This may even manage to retain compatibility with existing
binaries! (For now.)
Change-Id: I3b1386287a6b9b20b57ac2e2444fd6f458837277
Diffstat (limited to 'services/voiceinteraction')
2 files changed, 8 insertions, 6 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java index 35bdceb..8834497 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java @@ -46,6 +46,7 @@ import android.service.voice.IVoiceInteractionService; import android.service.voice.IVoiceInteractionSession; import android.service.voice.VoiceInteractionService; import android.service.voice.VoiceInteractionServiceInfo; +import android.service.voice.VoiceInteractionSession; import android.speech.RecognitionService; import android.text.TextUtils; import android.util.Slog; @@ -732,9 +733,9 @@ public class VoiceInteractionManagerService extends SystemService { final long caller = Binder.clearCallingIdentity(); try { mImpl.showSessionLocked(new Bundle() /* sessionArgs */, - VoiceInteractionService.START_SOURCE_ASSIST_GESTURE - | VoiceInteractionService.START_WITH_ASSIST - | VoiceInteractionService.START_WITH_SCREENSHOT, + VoiceInteractionSession.SHOW_SOURCE_ASSIST_GESTURE + | VoiceInteractionSession.SHOW_WITH_ASSIST + | VoiceInteractionSession.SHOW_WITH_SCREENSHOT, showCallback); } finally { Binder.restoreCallingIdentity(caller); diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java index 1117373..b4629f2 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java @@ -40,6 +40,7 @@ import android.provider.Settings; import android.service.voice.IVoiceInteractionSession; import android.service.voice.IVoiceInteractionSessionService; import android.service.voice.VoiceInteractionService; +import android.service.voice.VoiceInteractionSession; import android.util.Slog; import android.view.IWindowManager; import android.view.WindowManager; @@ -180,7 +181,7 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { public boolean showLocked(Bundle args, int flags, IVoiceInteractionSessionShowCallback showCallback) { // For now we never allow screenshots. - flags &= ~VoiceInteractionService.START_WITH_SCREENSHOT; + flags &= ~VoiceInteractionSession.SHOW_WITH_SCREENSHOT; if (mBound) { if (!mFullyBound) { mFullyBound = mContext.bindServiceAsUser(mBindIntent, mFullConnection, @@ -192,7 +193,7 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { mShowArgs = args; mShowFlags = flags; mHaveAssistData = false; - if ((flags&VoiceInteractionService.START_WITH_ASSIST) != 0) { + if ((flags& VoiceInteractionSession.SHOW_WITH_ASSIST) != 0) { if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_STRUCTURE, mCallingUid, mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED && isStructureEnabled()) { @@ -209,7 +210,7 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { mAssistData = null; } mHaveScreenshot = false; - if ((flags&VoiceInteractionService.START_WITH_SCREENSHOT) != 0) { + if ((flags& VoiceInteractionSession.SHOW_WITH_SCREENSHOT) != 0) { if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_SCREENSHOT, mCallingUid, mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED) { try { |