summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2015-07-31 13:10:55 -0700
committerDianne Hackborn <hackbod@google.com>2015-07-31 13:10:55 -0700
commitafb308d6519c56cf2b8001b33dade35e682ab241 (patch)
tree8c898714a4056f385ba8bf6642fa52481e0d01d9 /tests
parent692a244bffea11157c37c8de93482cb912599b98 (diff)
downloadframeworks_base-afb308d6519c56cf2b8001b33dade35e682ab241.zip
frameworks_base-afb308d6519c56cf2b8001b33dade35e682ab241.tar.gz
frameworks_base-afb308d6519c56cf2b8001b33dade35e682ab241.tar.bz2
Fix issue #21895842: Add is_assist_blocked to assist.ViewNode.NodeProperties
Change-Id: I928882d42d0546cc6a12e803d96131beaba76d4e
Diffstat (limited to 'tests')
-rw-r--r--tests/VoiceInteraction/res/layout/main.xml6
-rw-r--r--tests/VoiceInteraction/res/values/strings.xml1
-rw-r--r--tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java13
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/VoiceInteraction/res/layout/main.xml b/tests/VoiceInteraction/res/layout/main.xml
index 0f968eb..a83d02c 100644
--- a/tests/VoiceInteraction/res/layout/main.xml
+++ b/tests/VoiceInteraction/res/layout/main.xml
@@ -26,6 +26,12 @@
android:text="@string/start"
/>
+ <CheckBox android:id="@+id/secure"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/secure"
+ />
+
<com.android.test.voiceinteraction.AsyncStructure
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/tests/VoiceInteraction/res/values/strings.xml b/tests/VoiceInteraction/res/values/strings.xml
index ab39f99..29ffe21 100644
--- a/tests/VoiceInteraction/res/values/strings.xml
+++ b/tests/VoiceInteraction/res/values/strings.xml
@@ -17,6 +17,7 @@
<resources>
<string name="start">Start</string>
+ <string name="secure">Secure</string>
<string name="tree">Tree</string>
<string name="text">Text</string>
<string name="asyncStructure">(Async structure goes here)</string>
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java
index ee75f28..87fa91a 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java
@@ -21,6 +21,8 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
+import android.view.WindowManager;
+import android.widget.CheckBox;
public class VoiceInteractionMain extends Activity {
@@ -30,6 +32,7 @@ public class VoiceInteractionMain extends Activity {
setContentView(R.layout.main);
findViewById(R.id.start).setOnClickListener(mStartListener);
+ findViewById(R.id.secure).setOnClickListener(mSecureListener);
}
@Override
@@ -52,4 +55,14 @@ public class VoiceInteractionMain extends Activity {
showAssist(null);
}
};
+
+ View.OnClickListener mSecureListener = new View.OnClickListener() {
+ public void onClick(View v) {
+ if (((CheckBox)v).isChecked()) {
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
+ } else {
+ getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
+ }
+ }
+ };
}