summaryrefslogtreecommitdiffstats
path: root/services/voiceinteraction
diff options
context:
space:
mode:
authorBenjamin Franz <bfranz@google.com>2015-06-29 10:29:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-29 10:29:23 +0000
commitb6fb3fe8f4fce5fda82a833247bd99ec435815f1 (patch)
treeab4f2c6708aabdbfb070daff81442924a51d633a /services/voiceinteraction
parent1ea7a819315ddaa104099229b2b32f75d08a50be (diff)
parentc200f44c46b7d6ddb104c0f09f2a4c679e218d0b (diff)
downloadframeworks_base-b6fb3fe8f4fce5fda82a833247bd99ec435815f1.zip
frameworks_base-b6fb3fe8f4fce5fda82a833247bd99ec435815f1.tar.gz
frameworks_base-b6fb3fe8f4fce5fda82a833247bd99ec435815f1.tar.bz2
Merge "Block assist when screenshots are disabled by policy" into mnc-dev
Diffstat (limited to 'services/voiceinteraction')
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java10
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;