OSDN Git Service

Increased toggling area
authorjoshmccloskey <joshmccloskey@google.com>
Sat, 8 Jun 2019 00:23:44 +0000 (17:23 -0700)
committerJoshua Mccloskey <joshmccloskey@google.com>
Wed, 12 Jun 2019 02:57:17 +0000 (02:57 +0000)
Test: Tapping the whole area will now toggle the switch. Note that
it is no longer possible to individually select the title and subtitle during
talkback, but you can select them as a group.
Test: Verified that without talkback the user must actually press
switch.
Fixes: 130398575

Change-Id: I369637f23e41ac6dc4333293b95a5ccae259ee1f

src/com/android/settings/biometrics/face/FaceEnrollEducation.java

index 429d93b..16917c7 100644 (file)
@@ -161,6 +161,10 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
 
         if (accessibilityEnabled) {
             accessibilityButton.callOnClick();
+            mSwitchDiversity.setClickable(true);
+            mSwitchDiversity.setOnClickListener(v -> {
+                mSwitchDiversity.getSwitch().toggle();
+            });
         }
     }