Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -28825,6 +28825,7 @@ package android.service.voice { 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 void onLockscreenShown(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); method public boolean onKeyMultiple(int, int, android.view.KeyEvent); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30977,6 +30977,7 @@ package android.service.voice { 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 void onLockscreenShown(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); method public boolean onKeyMultiple(int, int, android.view.KeyEvent); core/java/android/service/voice/IVoiceInteractionSession.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -35,5 +35,6 @@ oneway interface IVoiceInteractionSession { void taskStarted(in Intent intent, int taskId); void taskFinished(in Intent intent, int taskId); void closeSystemDialogs(); void onLockscreenShown(); void destroy(); } core/java/android/service/voice/VoiceInteractionSession.java +17 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,11 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_CLOSE_SYSTEM_DIALOGS)); } @Override public void onLockscreenShown() { mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_ON_LOCKSCREEN_SHOWN)); } @Override public void destroy() { mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_DESTROY)); Loading Loading @@ -674,6 +679,7 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall static final int MSG_HANDLE_SCREENSHOT = 105; static final int MSG_SHOW = 106; static final int MSG_HIDE = 107; static final int MSG_ON_LOCKSCREEN_SHOWN = 108; class MyCallbacks implements HandlerCaller.Callback, SoftInputWindow.Callback { @Override Loading Loading @@ -752,6 +758,10 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall if (DEBUG) Log.d(TAG, "doHide"); doHide(); break; case MSG_ON_LOCKSCREEN_SHOWN: if (DEBUG) Log.d(TAG, "onLockscreenShown"); onLockscreenShown(); break; } if (args != null) { args.recycle(); Loading Loading @@ -1296,6 +1306,13 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall hide(); } /** * Called when the lockscreen was shown. */ public void onLockscreenShown() { hide(); } @Override public void onConfigurationChanged(Configuration newConfig) { } Loading core/java/com/android/internal/app/AssistUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,16 @@ public class AssistUtils { } } public void onLockscreenShown() { try { if (mVoiceInteractionManagerService != null) { mVoiceInteractionManagerService.onLockscreenShown(); } } catch (RemoteException e) { Log.w(TAG, "Failed to call onLockscreenShown", e); } } public ComponentName getAssistComponentForUser(int userId) { final String setting = Settings.Secure.getStringForUser(mContext.getContentResolver(), Settings.Secure.ASSISTANT, userId); Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -28825,6 +28825,7 @@ package android.service.voice { 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 void onLockscreenShown(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -30977,6 +30977,7 @@ package android.service.voice { 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 void onLockscreenShown(); method public boolean onKeyDown(int, android.view.KeyEvent); method public boolean onKeyLongPress(int, android.view.KeyEvent); method public boolean onKeyMultiple(int, int, android.view.KeyEvent);
core/java/android/service/voice/IVoiceInteractionSession.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -35,5 +35,6 @@ oneway interface IVoiceInteractionSession { void taskStarted(in Intent intent, int taskId); void taskFinished(in Intent intent, int taskId); void closeSystemDialogs(); void onLockscreenShown(); void destroy(); }
core/java/android/service/voice/VoiceInteractionSession.java +17 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,11 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_CLOSE_SYSTEM_DIALOGS)); } @Override public void onLockscreenShown() { mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_ON_LOCKSCREEN_SHOWN)); } @Override public void destroy() { mHandlerCaller.sendMessage(mHandlerCaller.obtainMessage(MSG_DESTROY)); Loading Loading @@ -674,6 +679,7 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall static final int MSG_HANDLE_SCREENSHOT = 105; static final int MSG_SHOW = 106; static final int MSG_HIDE = 107; static final int MSG_ON_LOCKSCREEN_SHOWN = 108; class MyCallbacks implements HandlerCaller.Callback, SoftInputWindow.Callback { @Override Loading Loading @@ -752,6 +758,10 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall if (DEBUG) Log.d(TAG, "doHide"); doHide(); break; case MSG_ON_LOCKSCREEN_SHOWN: if (DEBUG) Log.d(TAG, "onLockscreenShown"); onLockscreenShown(); break; } if (args != null) { args.recycle(); Loading Loading @@ -1296,6 +1306,13 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall hide(); } /** * Called when the lockscreen was shown. */ public void onLockscreenShown() { hide(); } @Override public void onConfigurationChanged(Configuration newConfig) { } Loading
core/java/com/android/internal/app/AssistUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,16 @@ public class AssistUtils { } } public void onLockscreenShown() { try { if (mVoiceInteractionManagerService != null) { mVoiceInteractionManagerService.onLockscreenShown(); } } catch (RemoteException e) { Log.w(TAG, "Failed to call onLockscreenShown", e); } } public ComponentName getAssistComponentForUser(int userId) { final String setting = Settings.Secure.getStringForUser(mContext.getContentResolver(), Settings.Secure.ASSISTANT, userId); Loading