Loading packages/SystemUI/src/com/android/systemui/assist/AssistManager.java +12 −2 Original line number Diff line number Diff line Loading @@ -154,12 +154,12 @@ public class AssistManager { new IVisualQueryDetectionAttentionListener.Stub() { @Override public void onAttentionGained() { mVisualQueryAttentionListeners.forEach(VisualQueryAttentionListener::onAttentionGained); handleVisualAttentionChanged(true); } @Override public void onAttentionLost() { mVisualQueryAttentionListeners.forEach(VisualQueryAttentionListener::onAttentionLost); handleVisualAttentionChanged(false); } }; Loading Loading @@ -433,11 +433,21 @@ public class AssistManager { @Override public void onStopPerceiving() { // Treat this as a signal that attention has been lost (and inform listeners // accordingly). handleVisualAttentionChanged(false); mAssistUtils.disableVisualQueryDetection(); } }); } private void handleVisualAttentionChanged(boolean attentionGained) { mVisualQueryAttentionListeners.forEach( attentionGained ? VisualQueryAttentionListener::onAttentionGained : VisualQueryAttentionListener::onAttentionLost); } public void launchVoiceAssistFromKeyguard() { mAssistUtils.launchVoiceAssistFromKeyguard(); } Loading Loading
packages/SystemUI/src/com/android/systemui/assist/AssistManager.java +12 −2 Original line number Diff line number Diff line Loading @@ -154,12 +154,12 @@ public class AssistManager { new IVisualQueryDetectionAttentionListener.Stub() { @Override public void onAttentionGained() { mVisualQueryAttentionListeners.forEach(VisualQueryAttentionListener::onAttentionGained); handleVisualAttentionChanged(true); } @Override public void onAttentionLost() { mVisualQueryAttentionListeners.forEach(VisualQueryAttentionListener::onAttentionLost); handleVisualAttentionChanged(false); } }; Loading Loading @@ -433,11 +433,21 @@ public class AssistManager { @Override public void onStopPerceiving() { // Treat this as a signal that attention has been lost (and inform listeners // accordingly). handleVisualAttentionChanged(false); mAssistUtils.disableVisualQueryDetection(); } }); } private void handleVisualAttentionChanged(boolean attentionGained) { mVisualQueryAttentionListeners.forEach( attentionGained ? VisualQueryAttentionListener::onAttentionGained : VisualQueryAttentionListener::onAttentionLost); } public void launchVoiceAssistFromKeyguard() { mAssistUtils.launchVoiceAssistFromKeyguard(); } Loading