Use AppMsg in edit key

This commit is contained in:
Dominik Schürmann 2014-04-05 23:43:07 +02:00
parent d0c6971273
commit 22a6bfb985

View File

@ -38,7 +38,6 @@ import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.beardedhen.androidbootstrap.BootstrapButton;
import com.devspark.appmsg.AppMsg;
@ -306,7 +305,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
}
} else {
Log.e(Constants.TAG, "Keyring not found with masterKeyId: " + masterKeyId);
Toast.makeText(this, R.string.error_no_secret_key_found, Toast.LENGTH_LONG).show();
AppMsg.makeText(this, R.string.error_no_secret_key_found, AppMsg.STYLE_ALERT).show();
// TODO
}
if (masterKey != null) {
@ -495,8 +494,8 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
checkEmptyIDsWanted();
}
} catch (PgpGeneralException e) {
Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
Toast.LENGTH_SHORT).show();
AppMsg.makeText(this, getString(R.string.error_message, e.getMessage()),
AppMsg.STYLE_ALERT).show();
}
} else {
AppMsg.makeText(this, R.string.error_change_something_first, AppMsg.STYLE_ALERT).show();
@ -541,8 +540,7 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
}
} catch (PgpGeneralException e) {
Log.e(Constants.TAG, getString(R.string.error_message, e.getMessage()));
Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
Toast.LENGTH_SHORT).show();
AppMsg.makeText(this, getString(R.string.error_message, e.getMessage()), AppMsg.STYLE_ALERT).show();
}
finallySaveClicked();
}
@ -618,8 +616,8 @@ public class EditKeyActivity extends ActionBarActivity implements EditorListener
startService(intent);
} catch (PgpGeneralException e) {
Log.e(Constants.TAG, getString(R.string.error_message, e.getMessage()));
Toast.makeText(this, getString(R.string.error_message, e.getMessage()),
Toast.LENGTH_SHORT).show();
AppMsg.makeText(this, getString(R.string.error_message, e.getMessage()),
AppMsg.STYLE_ALERT).show();
}
}