From afb308d6519c56cf2b8001b33dade35e682ab241 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Fri, 31 Jul 2015 13:10:55 -0700 Subject: Fix issue #21895842: Add is_assist_blocked to assist.ViewNode.NodeProperties Change-Id: I928882d42d0546cc6a12e803d96131beaba76d4e --- tests/VoiceInteraction/res/layout/main.xml | 6 ++++++ tests/VoiceInteraction/res/values/strings.xml | 1 + .../android/test/voiceinteraction/VoiceInteractionMain.java | 13 +++++++++++++ 3 files changed, 20 insertions(+) (limited to 'tests') 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" /> + + Start + Secure Tree Text (Async structure goes here) 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); + } + } + }; } -- cgit v1.1