summaryrefslogtreecommitdiffstats
path: root/tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java')
-rw-r--r--tests/VoiceInteraction/src/com/android/test/voiceinteraction/VoiceInteractionMain.java13
1 files changed, 13 insertions, 0 deletions
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);
+ }
+ }
+ };
}