Only gray out remove button after positive button is pressed

Fixes: 131252811

Test: manual
Change-Id: I74d677dc5608b21045b148020a13d5ea5c1bde20
This commit is contained in:
Kevin Chyn
2019-04-25 12:21:29 -07:00
parent acc340d615
commit f19fb6fa46

View File

@@ -117,6 +117,7 @@ public class FaceSettingsRemoveButtonPreferenceController extends BasePreference
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == DialogInterface.BUTTON_POSITIVE) {
mButton.setEnabled(false);
final List<Face> faces = mFaceManager.getEnrolledFaces(mUserId);
if (faces.isEmpty()) {
Log.e(TAG, "No faces");
@@ -177,7 +178,6 @@ public class FaceSettingsRemoveButtonPreferenceController extends BasePreference
public void onClick(View v) {
if (v == mButton) {
mRemoving = true;
mButton.setEnabled(false);
ConfirmRemoveDialog dialog = new ConfirmRemoveDialog();
dialog.setOnClickListener(mOnClickListener);
dialog.show(mActivity.getSupportFragmentManager(), ConfirmRemoveDialog.class.getName());