diff --git a/src/org/thoughtcrime/securesms/DeviceListFragment.java b/src/org/thoughtcrime/securesms/DeviceListFragment.java index c7a5bda65d..259c060ab1 100644 --- a/src/org/thoughtcrime/securesms/DeviceListFragment.java +++ b/src/org/thoughtcrime/securesms/DeviceListFragment.java @@ -146,6 +146,20 @@ public class DeviceListFragment extends ListFragment getLoaderManager().initLoader(0, null, DeviceListFragment.this); } }); + + builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + DeviceListFragment.this.getActivity().onBackPressed(); + } + }); + builder.setOnCancelListener(new DialogInterface.OnCancelListener() { + @Override + public void onCancel(DialogInterface dialog) { + DeviceListFragment.this.getActivity().onBackPressed(); + } + }); + builder.show(); }