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

Commit 59b53924 authored by Annie Chin's avatar Annie Chin
Browse files

Add talkback announcements for alarm deletion/set and timer

deletion/cancel.

Bug: 24963071
Bug: 24929160

Change-Id: I3910eb0b6a0ec718b0fe7b9e5e81cbab327a7fbc
parent c42cfd50
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -528,6 +528,8 @@
    <string name="timer_reset">Reset</string>
    <!-- Describes the purpose of the button to discard the current dialog values. Will also close the dialog if other time's exist -->
    <string name="timer_cancel">Cancel</string>
    <!-- Accessibility announcement when a timer is canceled. -->
    <string name="timer_canceled">Timer canceled</string>
    <!-- Notification content shown when a timer has completed and has no more time remaining -->
    <string name="timer_times_up">Time\'s up</string>
    <!--
+1 −0
Original line number Diff line number Diff line
@@ -99,5 +99,6 @@ public class AlarmUtils {
        final String text = formatElapsedTimeUntilAlarm(
                snackbarAnchor.getContext(), alarmTimeDelta);
        SnackbarManager.show(Snackbar.make(snackbarAnchor, text, Snackbar.LENGTH_SHORT));
        snackbarAnchor.announceForAccessibility(text);
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ public final class ExpandedAlarmViewHolder extends AlarmTimeViewHolder {
            @Override
            public void onClick(View v) {
                alarmTimeClickHandler.onDeleteClicked(mAlarm);
                v.announceForAccessibility(context.getString(R.string.alarm_deleted));
            }
        });
        // Repeat checkbox handler
+2 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ public class TimerFragment extends DeskClockFragment implements OnSharedPreferen
                    };
                    createRotateAnimator(adapter, false).start();
                }
                view.announceForAccessibility(getActivity().getString(R.string.timer_canceled));
            }
        });
        mDeleteTransition = new AutoTransition();
@@ -612,6 +613,7 @@ public class TimerFragment extends DeskClockFragment implements OnSharedPreferen
            TransitionManager.beginDelayedTransition(mContentView, mDeleteTransition);
            deleteTimer(timer);
        }
        view.announceForAccessibility(getActivity().getString(R.string.timer_deleted));
    }

    private void deleteTimer(TimerObj timer) {