Merge "[Network Connection] Implement Unavailable callback when the user cancels"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4a6b8a608c
@@ -124,7 +124,7 @@ public class NetworkRequestDialogFragment extends InstrumentedDialogFragment imp
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(context)
|
||||
.setCustomTitle(customTitle)
|
||||
.setAdapter(mDialogAdapter, this)
|
||||
.setNegativeButton(R.string.cancel, (dialog, which) -> getActivity().finish())
|
||||
.setNegativeButton(R.string.cancel, (dialog, which) -> onCancel(dialog))
|
||||
// Do nothings, will replace the onClickListener to avoid auto closing dialog.
|
||||
.setNeutralButton(R.string.network_connection_request_dialog_showall,
|
||||
null /* OnClickListener */);
|
||||
@@ -221,6 +221,9 @@ public class NetworkRequestDialogFragment extends InstrumentedDialogFragment imp
|
||||
if (getActivity() != null) {
|
||||
getActivity().finish();
|
||||
}
|
||||
if (mUserSelectionCallback != null) {
|
||||
mUserSelectionCallback.reject();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user