diff options
Diffstat (limited to 'services/voiceinteraction/java')
-rw-r--r-- | services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java index cc6a9c5..549a511 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java @@ -193,8 +193,14 @@ 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; + boolean isScreenCaptureAllowed = true; + try { + isScreenCaptureAllowed = mAm.isScreenCaptureAllowedOnCurrentActivity(); + } catch (RemoteException e) { + } + boolean allDataEnabled = (Settings.Secure.getIntForUser(mContext.getContentResolver(), + Settings.Secure.ASSIST_STRUCTURE_ENABLED, 1, mUser) != 0) + && isScreenCaptureAllowed; mShowArgs = args; mShowFlags = flags; mHaveAssistData = false; |