]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpadebug: Add main screen buttons for QR Code operations
authorJouni Malinen <jouni@codeaurora.org>
Thu, 22 Feb 2018 12:20:10 +0000 (14:20 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 22 Feb 2018 12:55:00 +0000 (14:55 +0200)
These can be used for manual testing of the DPP QR Code functionality.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpadebug/res/layout/main.xml
wpadebug/src/w1/fi/wpadebug/MainActivity.java

index 6fdd565bbf3e77fcc66b44d14a7fea704f59efb6..cbdbfb961980152279bbd1372b159ded63b65093 100644 (file)
                    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"
index c5d123e32c33712474be27a9fccef6a01fb05656..4c37b481f1bf6f0c12fa3cab40d91fa4306c6c9b 100644 (file)
@@ -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);