Only gray out remove button after positive button is pressed
Fixes: 131252811 Test: manual Change-Id: I74d677dc5608b21045b148020a13d5ea5c1bde20
This commit is contained in:
@@ -117,6 +117,7 @@ public class FaceSettingsRemoveButtonPreferenceController extends BasePreference
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
if (which == DialogInterface.BUTTON_POSITIVE) {
|
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||||
|
mButton.setEnabled(false);
|
||||||
final List<Face> faces = mFaceManager.getEnrolledFaces(mUserId);
|
final List<Face> faces = mFaceManager.getEnrolledFaces(mUserId);
|
||||||
if (faces.isEmpty()) {
|
if (faces.isEmpty()) {
|
||||||
Log.e(TAG, "No faces");
|
Log.e(TAG, "No faces");
|
||||||
@@ -177,7 +178,6 @@ public class FaceSettingsRemoveButtonPreferenceController extends BasePreference
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v == mButton) {
|
if (v == mButton) {
|
||||||
mRemoving = true;
|
mRemoving = true;
|
||||||
mButton.setEnabled(false);
|
|
||||||
ConfirmRemoveDialog dialog = new ConfirmRemoveDialog();
|
ConfirmRemoveDialog dialog = new ConfirmRemoveDialog();
|
||||||
dialog.setOnClickListener(mOnClickListener);
|
dialog.setOnClickListener(mOnClickListener);
|
||||||
dialog.show(mActivity.getSupportFragmentManager(), ConfirmRemoveDialog.class.getName());
|
dialog.show(mActivity.getSupportFragmentManager(), ConfirmRemoveDialog.class.getName());
|
||||||
|
Reference in New Issue
Block a user