Add cancel to device management network failure alert dialog

Closes #4844
This commit is contained in:
David Novak 2015-12-14 19:29:39 +01:00 committed by Moxie Marlinspike
parent 7b589c4300
commit 8c36e20681

View File

@ -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();
}