Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c86ebfa authored by Annie Chin's avatar Annie Chin
Browse files

Do not hint on alarm button click when in accessibility mode.

Bug: 21144602
Change-Id: I83ef9b322c9927a8cd2343adda301284052e31d3
parent 489cdb01
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -389,8 +389,11 @@ public class AlarmActivity extends AppCompatActivity
                    if (snoozeFraction > 0.0f || dismissFraction > 0.0f) {
                        // Animate back to the initial state.
                        AnimatorUtils.reverse(mAlarmAnimator, mSnoozeAnimator, mDismissAnimator);
                    } else if (mAlarmButton.getTop() <= y && y <= mAlarmButton.getBottom()) {
                        // User touched the alarm button, hint the dismiss action.
                    } else if (mAlarmButton.getTop() <= y && y <= mAlarmButton.getBottom()
                            && mAccessibilityManager == null) {
                        // User touched the alarm button, hint the dismiss action unless in
                        // accessibility mode. In accessibility mode, the click on the dismiss
                        // button triggers dismiss().
                        mDismissButton.performClick();
                    }