Merge "Wrap and carry clicked slot information data for restriction page" into sc-dev
diff --git a/src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceController.java b/src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceController.java
index 200c0b9..0eb823b 100644
--- a/src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceController.java
+++ b/src/com/android/settings/biometrics/face/FaceSettingsAttentionPreferenceController.java
@@ -57,15 +57,15 @@
 
     private final GetFeatureCallback mGetFeatureCallback = new GetFeatureCallback() {
         @Override
-        public void onCompleted(boolean success, int feature, boolean value) {
-            if (feature == FaceManager.FEATURE_REQUIRE_ATTENTION && success) {
-                if (!mFaceManager.hasEnrolledTemplates(getUserId())) {
-                    mPreference.setEnabled(false);
-                } else {
-                    mPreference.setEnabled(true);
-                    mPreference.setChecked(value);
+        public void onCompleted(boolean success, int[] features, boolean[] featureState) {
+            boolean requireAttentionEnabled = false;
+            for (int i = 0; i < features.length; i++) {
+                if (features[i] == FaceManager.FEATURE_REQUIRE_ATTENTION) {
+                    requireAttentionEnabled = featureState[i];
                 }
             }
+            mPreference.setEnabled(success);
+            mPreference.setChecked(requireAttentionEnabled);
         }
     };
 
diff --git a/src/com/android/settings/localepicker/LocaleRecyclerView.java b/src/com/android/settings/localepicker/LocaleRecyclerView.java
index e82874d..d32a735 100644
--- a/src/com/android/settings/localepicker/LocaleRecyclerView.java
+++ b/src/com/android/settings/localepicker/LocaleRecyclerView.java
@@ -37,7 +37,7 @@
 
     @Override
     public boolean onTouchEvent(MotionEvent e) {
-        if (e.getAction() == MotionEvent.ACTION_UP) {
+        if (e.getAction() == MotionEvent.ACTION_UP || e.getAction() == MotionEvent.ACTION_CANCEL) {
             LocaleDragAndDropAdapter adapter = (LocaleDragAndDropAdapter) this.getAdapter();
             if (adapter != null) {
                 adapter.doTheUpdate();