[Android] Tidy up the dialog buttons that don't do anything.

All we want to do with these is dismiss the dialog. The same can be done by simply passing null.
This commit is contained in:
Lioncash 2014-03-09 22:55:41 -04:00
parent 8863eb0671
commit 932e3c1db2
2 changed files with 2 additions and 11 deletions

View File

@ -255,18 +255,13 @@ public final class EmulationActivity extends Activity
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getString(R.string.overlay_exit_emulation));
builder.setMessage(R.string.overlay_exit_emulation_confirm);
builder.setNegativeButton(R.string.no, null);
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
finish();
}
});
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{
// Do nothing. Just makes the No button appear.
}
});
builder.show();
return true;
}

View File

@ -107,11 +107,7 @@ public final class VideoSettingsFragment extends PreferenceFragment
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(R.string.device_compat_warning);
builder.setMessage(R.string.device_gles3compat_warning_msg);
builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Do Nothing. Just create the Yes button
}
});
builder.setPositiveButton(R.string.yes, null);
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which)
{