diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index f73e1c9..fa351d4 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -29,6 +29,9 @@
+
diff --git a/res/layout/activity_set_password.xml b/res/layout/activity_set_password.xml
new file mode 100644
index 0000000..a0421d1
--- /dev/null
+++ b/res/layout/activity_set_password.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/dialog_password.xml b/res/layout/dialog_password.xml
new file mode 100644
index 0000000..3f4b67a
--- /dev/null
+++ b/res/layout/dialog_password.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 7812ac9..069037c 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -2,4 +2,5 @@
#c31756
#111
+ #f00
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3bb1c54..0cdf02b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -25,6 +25,7 @@
Sent:
Received:
+ Change password
General
Auto-check mail
Check interval
@@ -45,4 +46,8 @@
%s minutes
I2CP host
I2CP port
+
+ Old password:
+ New password:
+ Confirm new password:
diff --git a/res/xml/settings.xml b/res/xml/settings.xml
index 9d5287e..d83acbc 100644
--- a/res/xml/settings.xml
+++ b/res/xml/settings.xml
@@ -1,6 +1,12 @@
+
+
+
+
{
+ private final ProgressDialog dialog = new ProgressDialog(SetPasswordActivity.this);
+
+ protected void onPreExecute() {
+ dialog.setMessage("Changing password...");
+ dialog.setCancelable(false);
+ dialog.show();
+ }
+
+ protected String doInBackground(Void... params) {
+ try {
+ I2PBote.getInstance().waitForPasswordChange();
+ return null;
+ } catch (Throwable e) {
+ cancel(false);
+ return e.getMessage();
+ }
+ }
+
+ protected void onCancelled(String result) {
+ error.setText(result);
+ dialog.dismiss();
+ }
+
+ protected void onPostExecute(String result) {
+ dialog.dismiss();
+ // Password changed successfully
+ finish();
+ }
+ }
+}