Fix notification preferences
- ImportancePreference should not be separately clickable - new strings Bug: 127796543 Fixes: 131060409 Test: make sure talkback doesn't read 'double tap to activate' when the preference is focused Change-Id: I6b6eef0915873b4e0b44c59758e5f4b5a265364b
This commit is contained in:
@@ -91,6 +91,7 @@ public class ImportancePreference extends Preference {
|
||||
@Override
|
||||
public void onBindViewHolder(PreferenceViewHolder holder) {
|
||||
super.onBindViewHolder(holder);
|
||||
holder.itemView.setClickable(false);
|
||||
|
||||
TextView textView = (TextView) holder.findViewById(R.id.description);
|
||||
mSilenceButton = (Button) holder.findViewById(R.id.silence);
|
||||
|
@@ -425,10 +425,12 @@ public class NotificationBackend {
|
||||
return StringUtil.formatRelativeTime(
|
||||
context, System.currentTimeMillis() - state.lastSent, true);
|
||||
} else {
|
||||
if (state.avgSentWeekly > 0) {
|
||||
return context.getString(R.string.notifications_sent_weekly, state.avgSentWeekly);
|
||||
if (state.avgSentDaily > 0) {
|
||||
return context.getResources().getQuantityString(R.plurals.notifications_sent_daily,
|
||||
state.avgSentDaily, state.avgSentDaily);
|
||||
}
|
||||
return context.getString(R.string.notifications_sent_daily, state.avgSentDaily);
|
||||
return context.getResources().getQuantityString(R.plurals.notifications_sent_weekly,
|
||||
state.avgSentWeekly, state.avgSentWeekly);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user