Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28909,6 +28909,7 @@ package android.service.voice { method public void onDestroy(); method public boolean[] onGetSupportedCommands(java.lang.String[]); method public void onHandleAssist(android.os.Bundle, android.app.assist.AssistStructure, android.app.assist.AssistContent); method public void onHandleScreenshot(android.graphics.Bitmap); method public void onHide(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); Loading @@ -28931,6 +28932,7 @@ package android.service.voice { method public void startVoiceActivity(android.content.Intent); field public static final int SHOW_SOURCE_ASSIST_GESTURE = 4; // 0x4 field public static final int SHOW_WITH_ASSIST = 1; // 0x1 field public static final int SHOW_WITH_SCREENSHOT = 2; // 0x2 } public static final class VoiceInteractionSession.AbortVoiceRequest extends android.service.voice.VoiceInteractionSession.Request { api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -31046,6 +31046,7 @@ package android.service.voice { method public void onDestroy(); method public boolean[] onGetSupportedCommands(java.lang.String[]); method public void onHandleAssist(android.os.Bundle, android.app.assist.AssistStructure, android.app.assist.AssistContent); method public void onHandleScreenshot(android.graphics.Bitmap); method public void onHide(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); Loading @@ -31068,6 +31069,7 @@ package android.service.voice { method public void startVoiceActivity(android.content.Intent); field public static final int SHOW_SOURCE_ASSIST_GESTURE = 4; // 0x4 field public static final int SHOW_WITH_ASSIST = 1; // 0x1 field public static final int SHOW_WITH_SCREENSHOT = 2; // 0x2 } public static final class VoiceInteractionSession.AbortVoiceRequest extends android.service.voice.VoiceInteractionSession.Request { core/java/android/service/voice/VoiceInteractionSession.java +0 −2 Original line number Diff line number Diff line Loading @@ -80,7 +80,6 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall public static final int SHOW_WITH_ASSIST = 1<<0; /** * @hide * Flag received in {@link #onShow}: originator requested that the session be started with * a screen shot of the currently focused activity. */ Loading Loading @@ -1162,7 +1161,6 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall onHandleAssist(data); } /** @hide */ public void onHandleScreenshot(Bitmap screenshot) { } Loading services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +5 −9 Original line number Diff line number Diff line Loading @@ -180,8 +180,6 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { public boolean showLocked(Bundle args, int flags, IVoiceInteractionSessionShowCallback showCallback) { // For now we never allow screenshots. flags &= ~VoiceInteractionSession.SHOW_WITH_SCREENSHOT; if (mBound) { if (!mFullyBound) { mFullyBound = mContext.bindServiceAsUser(mBindIntent, mFullConnection, Loading @@ -190,13 +188,15 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { new UserHandle(mUser)); } mShown = true; boolean allDataEnabled = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, mUser) != 0; mShowArgs = args; mShowFlags = flags; mHaveAssistData = false; if ((flags& VoiceInteractionSession.SHOW_WITH_ASSIST) != 0) { if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_STRUCTURE, mCallingUid, mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED && isStructureEnabled()) { && allDataEnabled) { try { mAm.requestAssistContextExtras(ActivityManager.ASSIST_CONTEXT_FULL, mAssistReceiver); Loading @@ -212,7 +212,8 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { mHaveScreenshot = false; if ((flags& VoiceInteractionSession.SHOW_WITH_SCREENSHOT) != 0) { if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_SCREENSHOT, mCallingUid, mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED) { mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED && allDataEnabled) { try { mIWindowManager.requestAssistScreenshot(mScreenshotReceiver); } catch (RemoteException e) { Loading Loading @@ -466,11 +467,6 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { mService = null; } private boolean isStructureEnabled() { return Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, mUser) != 0; } public void dump(String prefix, PrintWriter pw) { pw.print(prefix); pw.print("mToken="); pw.println(mToken); pw.print(prefix); pw.print("mShown="); pw.println(mShown); Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -28909,6 +28909,7 @@ package android.service.voice { method public void onDestroy(); method public boolean[] onGetSupportedCommands(java.lang.String[]); method public void onHandleAssist(android.os.Bundle, android.app.assist.AssistStructure, android.app.assist.AssistContent); method public void onHandleScreenshot(android.graphics.Bitmap); method public void onHide(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); Loading @@ -28931,6 +28932,7 @@ package android.service.voice { method public void startVoiceActivity(android.content.Intent); field public static final int SHOW_SOURCE_ASSIST_GESTURE = 4; // 0x4 field public static final int SHOW_WITH_ASSIST = 1; // 0x1 field public static final int SHOW_WITH_SCREENSHOT = 2; // 0x2 } public static final class VoiceInteractionSession.AbortVoiceRequest extends android.service.voice.VoiceInteractionSession.Request {
api/system-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -31046,6 +31046,7 @@ package android.service.voice { method public void onDestroy(); method public boolean[] onGetSupportedCommands(java.lang.String[]); method public void onHandleAssist(android.os.Bundle, android.app.assist.AssistStructure, android.app.assist.AssistContent); method public void onHandleScreenshot(android.graphics.Bitmap); method public void onHide(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); Loading @@ -31068,6 +31069,7 @@ package android.service.voice { method public void startVoiceActivity(android.content.Intent); field public static final int SHOW_SOURCE_ASSIST_GESTURE = 4; // 0x4 field public static final int SHOW_WITH_ASSIST = 1; // 0x1 field public static final int SHOW_WITH_SCREENSHOT = 2; // 0x2 } public static final class VoiceInteractionSession.AbortVoiceRequest extends android.service.voice.VoiceInteractionSession.Request {
core/java/android/service/voice/VoiceInteractionSession.java +0 −2 Original line number Diff line number Diff line Loading @@ -80,7 +80,6 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall public static final int SHOW_WITH_ASSIST = 1<<0; /** * @hide * Flag received in {@link #onShow}: originator requested that the session be started with * a screen shot of the currently focused activity. */ Loading Loading @@ -1162,7 +1161,6 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall onHandleAssist(data); } /** @hide */ public void onHandleScreenshot(Bitmap screenshot) { } Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +5 −9 Original line number Diff line number Diff line Loading @@ -180,8 +180,6 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { public boolean showLocked(Bundle args, int flags, IVoiceInteractionSessionShowCallback showCallback) { // For now we never allow screenshots. flags &= ~VoiceInteractionSession.SHOW_WITH_SCREENSHOT; if (mBound) { if (!mFullyBound) { mFullyBound = mContext.bindServiceAsUser(mBindIntent, mFullConnection, Loading @@ -190,13 +188,15 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { new UserHandle(mUser)); } mShown = true; boolean allDataEnabled = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, mUser) != 0; mShowArgs = args; mShowFlags = flags; mHaveAssistData = false; if ((flags& VoiceInteractionSession.SHOW_WITH_ASSIST) != 0) { if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_STRUCTURE, mCallingUid, mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED && isStructureEnabled()) { && allDataEnabled) { try { mAm.requestAssistContextExtras(ActivityManager.ASSIST_CONTEXT_FULL, mAssistReceiver); Loading @@ -212,7 +212,8 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { mHaveScreenshot = false; if ((flags& VoiceInteractionSession.SHOW_WITH_SCREENSHOT) != 0) { if (mAppOps.noteOpNoThrow(AppOpsManager.OP_ASSIST_SCREENSHOT, mCallingUid, mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED) { mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED && allDataEnabled) { try { mIWindowManager.requestAssistScreenshot(mScreenshotReceiver); } catch (RemoteException e) { Loading Loading @@ -466,11 +467,6 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { mService = null; } private boolean isStructureEnabled() { return Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, mUser) != 0; } public void dump(String prefix, PrintWriter pw) { pw.print(prefix); pw.print("mToken="); pw.println(mToken); pw.print(prefix); pw.print("mShown="); pw.println(mShown); Loading