2 * wpadebug - wpa_supplicant and Wi-Fi debugging app for Android
3 * Copyright (c) 2013, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
9 package w1.fi.wpadebug;
11 import android.app.Activity;
12 import android.content.Intent;
13 import android.os.Bundle;
14 import android.view.View;
15 import android.widget.EditText;
17 public class WpaCredEditActivity extends Activity
20 public void onCreate(Bundle savedInstanceState)
22 super.onCreate(savedInstanceState);
23 setContentView(R.layout.cred_edit);
26 public void credSave(View view)
28 Intent data = new Intent();
31 edit = (EditText) findViewById(R.id.cred_edit_username);
32 data.putExtra("username", edit.getText().toString());
34 edit = (EditText) findViewById(R.id.cred_edit_realm);
35 data.putExtra("realm", edit.getText().toString());
37 edit = (EditText) findViewById(R.id.cred_edit_password);
38 data.putExtra("password", edit.getText().toString());
40 edit = (EditText) findViewById(R.id.cred_edit_domain);
41 data.putExtra("domain", edit.getText().toString());
43 edit = (EditText) findViewById(R.id.cred_edit_imsi);
44 data.putExtra("imsi", edit.getText().toString());
46 setResult(Activity.RESULT_OK, data);
50 public void credCancel(View view)
52 setResult(Activity.RESULT_CANCELED);