aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/org/connectbot/PubkeyListActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/org/connectbot/PubkeyListActivity.java')
-rw-r--r--app/src/main/java/org/connectbot/PubkeyListActivity.java28
1 files changed, 19 insertions, 9 deletions
diff --git a/app/src/main/java/org/connectbot/PubkeyListActivity.java b/app/src/main/java/org/connectbot/PubkeyListActivity.java
index df00333..85ca570 100644
--- a/app/src/main/java/org/connectbot/PubkeyListActivity.java
+++ b/app/src/main/java/org/connectbot/PubkeyListActivity.java
@@ -41,7 +41,6 @@ import com.trilead.ssh2.crypto.Base64;
import com.trilead.ssh2.crypto.PEMDecoder;
import com.trilead.ssh2.crypto.PEMStructure;
-import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
@@ -219,7 +218,8 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
final View view = View.inflate(this, R.layout.dia_password, null);
final EditText passwordField = (EditText) view.findViewById(android.R.id.text1);
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this, R.style.AlertDialogTheme)
.setView(view)
.setPositiveButton(R.string.pubkey_unlock, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
@@ -376,7 +376,8 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
final String state = Environment.getExternalStorageState();
if (!Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)
&& !Environment.MEDIA_MOUNTED.equals(state)) {
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this, R.style.AlertDialogTheme)
.setMessage(R.string.alert_sdcard_absent)
.setNegativeButton(android.R.string.cancel, null).create().show();
return;
@@ -398,7 +399,8 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
Log.d(TAG, names.toString());
// prompt user to select any file from the sdcard root
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this, R.style.AlertDialogTheme)
.setTitle(R.string.pubkey_list_pick)
.setItems(namesList, new OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
@@ -527,7 +529,8 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
View.inflate(PubkeyListActivity.this, R.layout.dia_changepassword, null);
((TableRow) changePasswordView.findViewById(R.id.old_password_prompt))
.setVisibility(pubkey.isEncrypted() ? View.VISIBLE : View.GONE);
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this, R.style.AlertDialogTheme)
.setView(changePasswordView)
.setPositiveButton(R.string.button_change, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
@@ -536,7 +539,9 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
String password2 = ((EditText) changePasswordView.findViewById(R.id.password2)).getText().toString();
if (!password1.equals(password2)) {
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this,
+ R.style.AlertDialogTheme)
.setMessage(R.string.alert_passwords_do_not_match_msg)
.setPositiveButton(android.R.string.ok, null)
.create().show();
@@ -545,7 +550,9 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
try {
if (!pubkey.changePassword(oldPassword, password1))
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this,
+ R.style.AlertDialogTheme)
.setMessage(R.string.alert_wrong_password_msg)
.setPositiveButton(android.R.string.ok, null)
.create().show();
@@ -556,7 +563,9 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
}
} catch (Exception e) {
Log.e(TAG, "Could not change private key password", e);
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this,
+ R.style.AlertDialogTheme)
.setMessage(R.string.alert_key_corrupted_msg)
.setPositiveButton(android.R.string.ok, null)
.create().show();
@@ -587,7 +596,8 @@ public class PubkeyListActivity extends AppCompatListActivity implements EventLi
delete.setOnMenuItemClickListener(new OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {
// prompt user to make sure they really want this
- new AlertDialog.Builder(PubkeyListActivity.this)
+ new android.support.v7.app.AlertDialog.Builder(
+ PubkeyListActivity.this, R.style.AlertDialogTheme)
.setMessage(getString(R.string.delete_message, pubkey.getNickname()))
.setPositiveButton(R.string.delete_pos, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {