Browse Source

wpadebug: Add main screen buttons for QR Code operations

These can be used for manual testing of the DPP QR Code functionality.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Jouni Malinen 7 years ago
parent
commit
83565fd21e
2 changed files with 42 additions and 0 deletions
  1. 24 0
      wpadebug/res/layout/main.xml
  2. 18 0
      wpadebug/src/w1/fi/wpadebug/MainActivity.java

+ 24 - 0
wpadebug/res/layout/main.xml

@@ -116,6 +116,30 @@
 		    android:onClick="runCommands"
 		    />
 	</LinearLayout>
+	<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+		      android:layout_width="match_parent"
+		      android:layout_height="wrap_content"
+		      android:orientation="horizontal"
+		      >
+		<Button
+		    android:layout_width="wrap_content"
+		    android:layout_height="wrap_content"
+		    android:text="QR Scan"
+		    android:onClick="runQrScan"
+		    />
+		<Button
+		    android:layout_width="wrap_content"
+		    android:layout_height="wrap_content"
+		    android:text="QR Input"
+		    android:onClick="runQrInput"
+		    />
+		<Button
+		    android:layout_width="wrap_content"
+		    android:layout_height="wrap_content"
+		    android:text="QR Display"
+		    android:onClick="runQrDisplay"
+		    />
+	</LinearLayout>
 	<TextView
 	    android:layout_width="wrap_content"
 	    android:layout_height="wrap_content"

+ 18 - 0
wpadebug/src/w1/fi/wpadebug/MainActivity.java

@@ -47,6 +47,24 @@ public class MainActivity extends Activity
 	startActivity(intent);
     }
 
+    public void runQrScan(View view)
+    {
+	Intent intent = new Intent(this, QrCodeScannerActivity.class);
+	startActivity(intent);
+    }
+
+    public void runQrInput(View view)
+    {
+	Intent intent = new Intent(this, InputUri.class);
+	startActivity(intent);
+    }
+
+    public void runQrDisplay(View view)
+    {
+	Intent intent = new Intent(this, QrCodeDisplayActivity.class);
+	startActivity(intent);
+    }
+
     public void runWpaCommands(View view)
     {
 	Intent intent = new Intent(this, WpaCommandListActivity.class);