Merge changes I74d677dc,I17f4db85 into qt-dev am: 8888d346d1

am: 4fcd3c6056

Change-Id: I37f70f7a3ad57ea9c1dcd1cd73bbcc490abaa937
This commit is contained in:
Kevin Chyn
2019-04-30 00:16:10 -07:00
committed by android-build-merger
4 changed files with 8 additions and 4 deletions

View File

@@ -22,6 +22,8 @@ import android.content.Context;
import android.hardware.face.FaceManager;
import android.provider.Settings;
import com.android.settings.Utils;
import androidx.preference.Preference;
/**
@@ -40,7 +42,7 @@ public class FaceSettingsAppPreferenceController extends FaceSettingsPreferenceC
public FaceSettingsAppPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mFaceManager = context.getSystemService(FaceManager.class);
mFaceManager = Utils.getFaceManagerOrNull(context);
}
public FaceSettingsAppPreferenceController(Context context) {

View File

@@ -24,6 +24,7 @@ import android.provider.Settings;
import androidx.preference.Preference;
import com.android.settings.Utils;
import com.android.settings.core.TogglePreferenceController;
/**
@@ -46,7 +47,7 @@ public class FaceSettingsConfirmPreferenceController extends FaceSettingsPrefere
public FaceSettingsConfirmPreferenceController(Context context,
String preferenceKey) {
super(context, preferenceKey);
mFaceManager = context.getSystemService(FaceManager.class);
mFaceManager = Utils.getFaceManagerOrNull(context);
}
@Override

View File

@@ -26,6 +26,7 @@ import android.provider.Settings;
import androidx.preference.Preference;
import com.android.settings.Utils;
import com.android.settings.core.TogglePreferenceController;
/**
@@ -44,7 +45,7 @@ public class FaceSettingsKeyguardPreferenceController extends FaceSettingsPrefer
public FaceSettingsKeyguardPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mFaceManager = context.getSystemService(FaceManager.class);
mFaceManager = Utils.getFaceManagerOrNull(context);
}
public FaceSettingsKeyguardPreferenceController(Context context) {

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